Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Haversine formula:
R = earths radius (mean radius = 6,371km)
”lat = lat2 lat1
”long = long2 long1
a = sin²(”lat/2) + cos(lat1).cos(lat2).sin²(”long/2)
c = 2.atan2(a, (1a))
d = R.c
(Note that angles need to be in radians to pass to trig functions).
Spherical law
of cosines: d = acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat2).cos(long2long1)).R
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.