Spherical Earth and Great-Circle Distance
Model the Earth as a sphere with mean radius R ≈ 6371 km, represent surface points by latitude/longitude or unit position vectors, and compute great-circle (shortest-path) distances between points using the spherical law of cosines.
Tutorial
The Spherical Earth Model
For routing purposes, Earth is treated as a sphere. Although it bulges slightly at the equator, using the mean radius
is accurate to well under 1% — more than good enough for flight planning.
A surface point is specified by two angles:
- Latitude : angle north (+) or south (−) of the equator, with .
- Longitude : angle east (+) or west (−) of the prime meridian, with .
A great circle is the intersection of the sphere with a plane through its center. Every great circle has the same radius as the sphere. The shortest path on the surface between two points lies along the unique great circle through them, so we call its arc length the great-circle distance.
If two points subtend a central angle at Earth's center, then the great-circle distance is
with expressed in radians. To convert from degrees to radians, multiply by