How were the ratios of distances between planets and the Sun first calculated? I was reading some literature and I found that long before the actual distances between other planets and Earth or distance between Sun and Earth were known, physicists had calculated the ratios between these distances. Can anybody tell me the technique used at that time to measure these ratio? This must have been done before 1650.
 A: The relative distances of the earth, sun and moon were determined by Aristarchus. See my summary here. By measuring the size of the earth (as e.g. Eratosthenes did) these can be turned into absolute distances.
Once heliocentrism was introduced the planetary distances could be determined as follows:
Distance from Venus (or Mercury) to the sun: continually measure the angle VES; when it is at a maximum the angle EVS will be right, and we know ES so we can find VS. (Since Venus and Mercury move much faster than the earth, the earth can be considered stationary for the purposes of this demonstration.)
Distance from an outer planet P to the sun. Note when P is in opposition, i.e., when SEP is a straight line. Then wait for the earth and planet to move until the angle SE'P' becomes a right angle. Since we know the orbital times of E and P we know the angles ESE' and PSP' (assuming the orbits to be circles centred at the sun). The angle P'SE' follows, and we already know angle SE'P' and length ES so we can compute SP'.
A: 
Can anybody tell me the technique used at that time to measure these ratios? This must have been done before 1650.

I assume you chose 1650 because of Newton. Newton did not need to know distances to develop his law of gravitation. Ratios work just fine; in fact, if you read Newton's Principia you'll notice that he worked with ratios of distances rather than distances. The astronomical unit had just been measured in Newton's time, and it's accuracy was rather low. The ratios of the distance at which other planets orbits the Sun to the distance at which the Earth orbits the Sun were much better known.
Tycho Brahe
Tycho Brahe had made a very large number of observations of Mars over the course of several years. One reason Brahe looked to Mars because he thought Mars would provide a good test of the old Ptolemaic model versus the new Copernican model. The two models predict very different Earth-Mars distances at opposition. By observing Mars apparent position at opposition just as it rose and about 12 hours later just as it set, Brahe thought that there would have enough of an angular separation so as to use parallax to compute distance between the Earth and Mars in terms of the distance between the Earth and the Sun.
Two problems got in Brahe's way. One was atmospheric refraction. The atmosphere acts a bit like a lens, curving the path of light of objects near the horizon. After correcting for this (but using an erroneous value of the Earth-Sun distance), Brahe found a negative parallax. Mars was apparently further than infinity! The other problem was that erroneous value of the Earth-Sun distance. The value Brahe used was essentially one derived by Ptolemy, and is off by a factor of about twenty. Brahe's approach couldn't have worked with his pre-telescopic measurements. The measurement errors would have swamped the observable parallax, even with a correct value for atmospheric refraction.
Johannes Kepler
Tycho Brahe had assigned his young but brilliant assistant Johannes Kepler to the task of determining the behavior of Mars. Mars was a notoriously nasty case. Mars, along with Mercury, did not nicely fit any of the extant models (Ptolemaic, Copernican, or Brahe's composite system). This nasty assignment was perhaps fortuitous. It is what led to Kepler's formulation of his three laws of planetary motion.
Kepler also used parallax to estimate the distance between the Sun and Mars, in ratio to the distance between the Sun and the Earth. Kepler looked for sets of observations of Mars separated by 687 day intervals in Brahe's massive collection of observations. This is the period of Mars' sidereal orbit. If Copernicus's model was basically correct, then Mars would be in the same position with respect to the Sun at each of these observations. It would not however have been in the same position as observed from the Earth because of the Earth's own orbit about the Sun. After a lot more work on Earth's own orbit about the Sun, these observations of Mars let Kepler triangulate on that singular position of Mars.
Kepler used a number of other geometrical tricks to lead to his laws of planetary motion. Determining when Mars was closest to and furthest from the Sun was key in developing the equal area law (Kepler's second law). This in turn was key in determining the shape of the orbit (Kepler's first law). Kepler developed his first two laws in the early 1600s and published them in 1609 in Astronomia Nova (New Astronomy). Kepler's third law would have to wait another decade. He didn't yet have the mathematical tools needed to develop that third law. The development of logarithms provided Kepler with the tool needed to develop that final law. Kepler published his third law in 1619 in Harmonices Mundi (Harmonies of the World).
Isaac Newton
Kepler had wanted to add physics to his astronomical model of the solar system. (Astronomy and physics were very distinct subjects in Kepler's time.) It was Isaac Newton who finally achieved that goal with his Principia. If you read the Principia, you will not find Newton's laws of motion or his law of gravitation in anything close to the algebraic forms currently used to express those ideas. That came after Newton. Newton intentionally eschewed algebra (and even his own calculus) in his Principia. He instead used a synthetic geometry, with ratios playing a dominant role.
The Astronomical Unit
Using ratios as opposed to absolute measures was essential to astronomy for a long time. Kepler, Newton, along with many others who followed, worked in terms of astronomical units. This is a ratio scale rather than an absolute scale. Absolute distances are hard to measure in space. Solar system dynamics work just fine using this ratio scale without knowing the length of the astronomical unit.
The first "accurate" measurement of the astronomical unit was made in 1672 based on a parallax measurement of Mars performed by Richer and Cassini. With this measurement, the AU had been established to one significant digit. Transits of Venus would later yield better values, but only slightly better. Scientists didn't have a good (multiple significant digits) handle on astronomical distances until the 1960s. Being able to ping Venus and Mars with radar finally yielded highly accurate measurements of distances in the solar system.
