theta = lon2 - lon1The resulting distance is in kilometers.
dist = acos(sin(lat1) × sin(lat2) + cos(lat1) × cos(lat2) × cos(theta))
if (dist < 0) dist = dist + pi
dist = dist × 6371.2
First, in the example the locations for LAX and JFK are rounded to the nearest arc-minute of longitude and latitude, or 1/60th of a degree. The Great Circle Mapper uses data from the FAA which is accurate to 0.000001 degree.
Second, the formulae used in the example assume that Earth is a sphere.
|
Information on this site may not be accurate or current
and is not valid for flight planning or navigation.
No warranty of fitness for any purpose is made or implied.
Flight planning and navigation should only be done using official charts.
Copyright © 1996-2012
Karl L. Swartz.
All rights reserved.
|