Hey, quaternion hackers: The distances are all angles multiplied by the same radius, so we can take ratios & get the ratios of the angles. Hamilton found some really cool quaternion formulae for spherical angles, but I don't have his book(s) in front of me right now. Gosper? Salamin? At 03:10 PM 9/26/2018, Keith F. Lynch wrote:
Brent Meeker <meekerdb@verizon.net> wrote:
Keith F. Lynch wrote:
A much easier project is using a table of distances between cities to calculate the radius of the Earth. (Has anyone done that?)
I'm sure it's been done. I've seen it illustrated in textbooks.
I'm curious what the best way is. Here are my first thoughts: The first city can be given any coordinates. The second city can be placed anywhere on a sphere around the first city with a radius equal to their distance. The third city can be placed anywhere on the circle where the spheres of the correct distances from the first two cities intersect. The fourth city can be placed on either of the two points where the three correct-distance spheres intersect. But what about the fifth city? Unless the data are of infinite precision and accuracy, there probably won't be an exact intersection point of the correct-distance spheres around the first four cities. You could do a least-squares fit, but why should all of the error budget go to the fifth city? You could do simulated annealing, or something like it, where all the cities are free to wiggle around by smaller and smaller amounts so as to minimize the sum of the squares of the errors in their pairwise distances.
Anyhow, after you have N cities, you simply find a point equidistant from all of them, or as close to it as possible. That will be the center of the Earth. Again, you'd probably want to do simulated annealing to distribute the error budget. Maybe combine it with the first annealing.
What is wrong with this picture? The main problem is that the distances from the table were never intended to be straight line distances, but distances along the curve of the Earth. You can convert from one to the other easily enough, but only if you already know the Earth's radius, which is what we set out to find out.
Maybe if you repeated the process several times, using the radius from the previous run to get the curvatures for the current run, it would converge to the correct value?
Of course cities which are far from all the others provide better estimates, since the proportional distance error is smaller.
Another approach is to stop with four cities. Which four? As you said, the ones that are furthest from each other. (Assuming all table entries are equally accurate and precise.) But four cities have six mutual distances. Which one(s) should be maximized? The longest? The shortest? The sum of all six? The product of all six? The volume of the resulting tetrahedron?
If I recall correctly, just as any three points (if not all on a line) are on a circle, i.e. are equidistant from a unique point, any four points (if not all on a plane) are on a sphere, i.e. are equidistant from a unique point, the center of that sphere. Of course you'd still need to repeat the process with successive estimates of the curvature. And you'd want to do it for more than one set of four cities.
Then there's the simplest approach of all: Find the maximum distance between any two cities, add a little, and call that half the circumference of the Earth.