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
(The original Great Circle Mapper used a modified version of the geod program from the PROJ.4 cartography tools. This program uses an older, less-sophisticated algorithm developed by Paul Thomas of the USGS.)
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-2018
Karl L. Swartz.
All rights reserved.