Latitude and Longitude Distances Routine
CSGNetwork FREE Source Code, Javascript Source, and Code Snippets!
CSGNetwork Custom Search
     Bookmark and Share
Top Free Apps

Right click this window and select "view source" in order to copy the source for this script.

Input Location Points
Latitude 1   Longitude 1
Latitude 2   Longitude 2

Latitude and Longitude Distances Routine

View the source...

This script determines the distance between two points defined by latitude and longitude, in miles, statute miles or kilometers. This is a very intense subject and due to the curvature of the Earth, there are slight variations closer to the poles. Input locations as positive values in decimal degrees. The NS and EW selections change them to negative if needed. All 9 variables must be passed to the function. Sample data is for Palm Springs and Thermal airports; psp and ktrm. You may use other data. This is a fully functional routine.

Bookmark and Share
Registered® Trademark™ and Copyrightę 1973 - CSG, Computer Support Group, Inc. and CSGNetwork.Com All Rights Reserved