In this module we develop simplified formulas for finding the distance between two points on the earth. The coordinates of each of the two points are given in the form

This is the form used by many ** Global Positioning Systems**. We use
a simplified model of the earth. In this model the earth is a sphere whose
radius is ** 6367 kilometers**. Because the earth is not a sphere this
model is somewhat inaccurate. For our purposes, it is a good first
approximation. See the module ** The Earth
is Round -- Most Maps are Flat ** for more details.

The first step is to convert the measurements of latitude and longitude into a more usable form. Since there are 60 minutes in a degree, the number of degrees is given by

We use spherical coordinates in this module. The figure below compares spherical
coordinates (in degrees) with latitude coordinates. In spherical coordinates
we measure the angle ** phi ** from the north pole. Thus, the north pole
corresponds to ** phi = 0**; the equator to ** phi = 90 degrees**; and
the south pole to ** phi = 180 degrees**.

/ 90 - latitude if latitude is North phi = { \ 90 + latitude if latitude is South

In spherical coordinates we measure the angle ** theta ** starting at the prime
meridian (longitude 0) and moving east. Thus

/ longitude if longitude is East theta = { \ -longitude if longitude is West

Both ** phi ** and ** theta ** as described above are measured in
** degrees**. It is mathematically much better to measure angles in
** radians**. The conversion formula is

angle in degrees * 2 * Pi angle in radians = --------------------------- 360

We want to express the location of a point in Cartesian coordinates with the origin at the center of the earth, the north pole at the point

and the positive **x**-axis going through the prime meridian. The conversion
formulas are:

x = 6367 (cos theta) (sin phi) y = 6367 (sin theta) (sin phi) z = 6367 (cos phi)

Using these formulas we can determine the Cartesian coordinates of any point from its latitude and longitude. For example, I was recently in San Luis Opisbo, California and my trusty GPS told me the location of my hotel was

The location of the Carroll College Fountain in Helena, Montana is

The Cartesian coordinates of San Luis Opisbo, CA and Helena, MT are

--------------------------------------- San Luis Opisbo, CA Helena, MT --------------------------------------- x = -2650 -1641 y = -4471 -4055 z = 3678 4626 ---------------------------------------

The distance between these two points is ** 1,446 kilometers** or
** 897 miles**, but this distance is the straight line distance through the
earth.

-1 straight line distance surface distance = 2 R sin (------------------------) 2 R

where ** R ** is the radius of the earth. ** Verify this formula. **

Using this formula, we see that the surface distance between Helena, Montana
and San Luis Opisbo, California is ** 1449 kilometers ** or ** 898 miles**.

This work is copyrighted c 1996 by Carroll College, Helena, MT 59625.

Click on the appropriate name(s) below to send email to any of the authors.

Department of Mathematics, Engineering, Computer Science, and Physics

Carroll College, 1601 N. Benton Avenue, Helena, MT 59625