We know the relative orbital distances of each planet to the Sun (for example, Jupiter's average orbital distance is 3.41418... that of Mars, or almost exactly 2+√2); in this way, once we have the real distance from Earth to many of these other objects, we know all distances, including the distance to the Sun.
All NASA has been doing is contributing to make that measurement more precise by making its data available to others (and vice versa).
-
Angela D say: like anybody else: parallax and radar.
this was a major goal when people started predicting and observing transits in the 18th century. by careful observation they could determine the distance to venus or mercury. with kepler's third law if you have the size of one planet's orbit you have them all.
-
quantumclaustrophobe say: From How Things Work:
Short version: What we actually measure is the distance from the Earth to some other body, such as Venus. Then we use what we know about the relations between interplanetary distances to scale that to the Earth-Sun distance. Since 1961, we have been able to use radar to measure interplanetary distances - we transmit a radar signal at another planet (or moon or asteroid) and measure how long it takes for the radar echo to return. Before radar, astronomers had to rely on other (less direct) geometric methods.
-