For 2D or 3D Cartesian coordinate systems, there are simple formulas based on the Pythagorean theorem that allow one to calculate distance between two points. But what if the surface is curved, like that of the Earth? In other words, how do you get the shortest distance between two cities ?

Instead of x and y coordinates, the only inputs needed are the cities’ latitudes and longitudes *in radians*.

If city A has (latitude, longitude) of (*Φ _{1}* , λ

_{1}

_{ }) while city B is

(** Φ_{2} , λ_{2}**), the distance, c , between them is given by:

where r = radius of the Earth = an average of 6371 km. (The latitudes and longitudes are normally given in degrees but they can be easily converted by multiplying each by (**π**/180).)

If there is a third city, how do we get the area of a triangle on a spherical surface?

This involves a few steps. (1) First calculate a and b in the same way we got c by using the appropriate latitudes and longitudes. (2) For each of the three arc lengths, a, b and c—they are arcs effectively because they are on a curved surface—get corresponding central angles in radians. How? If you imagine the vertex of an angle, θ, at a center of the earth, that angle is the same fraction of 2**π** radians as the arc length is of the circumference. Thus for example, θ_{c}/(2**π**) = c/(2**π**r), which simplifies to θ_{c} = c/r.

(3) Use the following formulas to get the triangle’s angles A , B and C.

(4) The sum of the triangle’s angles on a spherical surface exceeds 180 degrees or **π** radians. And it turns out that the triangle’s area, T, is directly proportional to the excess, E:

E = A + B + C – **π**

and T = Er^{2}

We can try an example with Miami=A= (25.76^{o}, 80.19^{o}) = (0.4496^{R}, 1.400^{R}) Montreal = B = ( 45.50^{o},73.57^{o}) = (0.794, 1.284) , and Rome = (41.90^{o}, -12.50^{o}) = (0.731, -0.2182).

The Montreal-Miami distance =

a = Montreal-Rome distance = 6582 km and b = Rome-Miami distance = 8340 km

θ_{a} = a/r = 6582 km/6371 km = 1.033;

θ_{b} = b/r = 8340 km/6371 km = 1.309;

θ_{c} = c/r = 2273 km/6371 km = 0.35677.

similarly B = 2.40 and C = 0.2469.

E = A + B + C – **π** = 0.14957

area =T = 0.14957( 6371 km)^{2} = 6 070 884 km^{2}

There are online apps which do all this for you automatically. I checked the above numbers and they agree closely with those of https://app.measuremaponline.com/ as can be seen from this screen capture:

The area is about 14% bigger than if one assumed that the triangle was on a flat surface, in which case Hero’s formula would apply.

## Leave a Reply