Calculating spherical distance between two geo-locations

665 Views Asked by At

I wanted to show my nephew(16) a simple approach to calculate the distance between two geo-locations. The mathematical knowledge of a 16-year old boy is limited to simple geometrical shapes like triangle, circles, etc.

My approach bases on the assumption that you can draw the two locations as two points (A and C) in a trapezoid like in this drawing.

drawing

The distance $\overline{AD}$ is an arc with radius of earth and the angle between the two longitudes.

$$\alpha = (\operatorname{Longitude}_2 - \operatorname{Longitude}_1) \cdot \frac{\pi}{180}$$ $$\overline{AD} = r_{Earth} \cdot \alpha$$

The distance $\overline{CD}$ is an arc with a radius s and the angle between the two latitides. Where "s" is the radius of the longitude at the location with the highest latitude.

$$s = r_{Earth} \cdot \cos \operatorname{Long}_{high}$$ $$\beta = (\operatorname{Latitude}_2 - \operatorname{Latitude}_1) \cdot \frac{\pi}{180}$$ $$\overline{CD} = s \cdot \beta$$

When I calculate the diagonal $\overline{AC}$ of the trapezoid my result is far away from the correct value. I know that my calculation is not accurate (I gave me an abberation of $\pm$100km), but it is for a 16 year old boy not for a mathematician. However, where is my mistake? I can't figure it out.

Here is my calculation sheet.

2

There are 2 best solutions below

1
On BEST ANSWER

The first bells started ringing around the word "trapezoid". Trapezoids are objects on a Euclidean plane, and we are on a sphere. So, technically, $ABCD$ is not a trapezoid but something else. I am not just being picky here, this is exactly where the first pitfall is hidden.

You see, in your case $ABCD$ is some sort of a quadrilateral-like shape on a sphere. It is more or less clear what $AD$ and $CB$ are. I assume they are arcs of the meridians. But what is $CD$, for instance? I see at least two possibilities here: (i) $CD$ can be an arc of a parallel, i.e. all the points of this arc have the same latitude, or (ii) $CD$ can be an arc of a great circle.

From your calculation it seems that you treat $AB$ and $CD$ as if they were arcs of parallels. But you should know that arcs on parallels are not shortest paths between points on a parallel. Shortest paths are arcs of great circles. So, if you want to find the shortest route from $C$ to $D$, this route is not along a parallel.

This is also why I hesitate to call $ABCD$ a spherical quadrilateral. You see, great circles in spherical geometry play a role similar to that of straight lines in Euclidean geometry, so I would only call $ABCD$ a spherical quadrilateral if all the four edges of it were arcs of great circles.

The second problem is how you calculate $AC$ in your final step. You use the law of cosines from Euclidean geometry, and it is simply not applicable on a sphere.

For a way to calculate distances between cities, you should have a look at the spherical law of cosines. It looks like exactly the tool that you need. Or you can use three-dimensional Cartesian coordinates, you should get the same answer either way.

0
On

Let $p(\theta, \phi) = r(\cos \phi \cos \theta, -\cos \phi \sin \theta,\sin \phi)$ (latitude is $\phi$ measured north, longitude is $\theta$ measured west, the point $0°$, $0 °$ corresponds to $(r,0,0)$, the north pole is $(0,0,r)$).

Then the Euclidean distance is $d=\|p(\theta_1,\phi_1)-p(\theta_2,\phi_2)\|_2$, and the Great circle distance is $2r \arcsin \frac{d}{2r}$, which can be computed by drawing an isoceles triangle of sides $r,r,d$, computing the (half) angle and then the arc length.