Notes
A great circle is the intersection of a sphere with a plane passing
through the center of the sphere. Arcs of great circles represent
the shorest route between two points on the surface of the sphere.
The equator is a great circle as are all meridians of longitude.
The
great circle distance and bearing between two points can be calculated
easily given the latitudes and longitudes of the origin and destination
using the following formula from spherical trigonometry:
cos(D)
= sin(lat_{a})·sin(lat_{b}) + cos(lat_{a})·cos(lat_{b})·cos(lon_{b}
 lon_{a})
cos(C)
= [sin(lat_{b})  sin(lat_{a})·cos(D)] / [cos(lat_{a})·sin(D)]
a  origin
b  destination
D = angular distance along path
C = true bearing from the the origin to the destination measured
from north. If the value for sin(lon_{b}  lon_{a})
is positive; otherwise, the true bearing is 360°  C.
In applying the above formula, south latitudes and west longitudes
are treated as negative angles. Note: When the origin is
exactly at a pole, the bearing or course to the destination cannot
be determined, why?
The
formulas above assume that the earth is spherical. To obtain more
accurate distances, this calculator implements a method shown in
chapter 10 of [1]. I've used the WGS 1984 parameters for the earth's
equatorial radius and ellipsoid flattening given in [2].
Copyright © 2004, Stephen R. Schmitt
