10075

Theory:

Distance

This uses the ‘haversine’ formula to calculate the great-circle distance between two points – that is, the shortest distance over the earth’s surface – giving an ‘as-the-crow-flies’ distance between the points (ignoring any hills they fly over, of course!).

Haversine
formula:
a = sin²(Δφ/2) + cos φ1 * cos φ2 * sin²(Δλ/2)
c = 2 * atan2( √a, √(1−a) )
d = R * c

R = Radius ; // km    φ1 = lat1 (in radian);    φ2 = lat2 (in radian);    Δφ = (lat2lat1)(in radian);    Δλ = (lon2lon1)(in radian);

a = sin(Δφ/2) * sin(Δφ/2) + cos1) * cos2) * sin(Δλ/2) * sin(Δλ/2);    c = 2 * atan2(sqrt(a), sqrt(1a));     d = R * c;

Click here for more information

 

Leave a Reply

Your email address will not be published. Required fields are marked *