PPRuNe Forums - View Single Post - Excel Distance Calculator Formulae
View Single Post
Old 5th Oct 2006, 11:32
  #3 (permalink)  
Groundgripper
 
Join Date: Aug 1999
Location: In the pension queue, Lancashire, UK
Age: 80
Posts: 208
Received 3 Likes on 2 Posts
Not familiar with WGS84 co-ordinates, but that looks like the calculation I use:

=SUM(60*ACOS((SIN(Lat1*PI()/180)*SIN(Lat2*PI()/180)+COS(Lat1*PI()/180)*COS(Lat2*PI()/180)*COS((Long2-Long1)*PI()/180)))*180/PI())

(which you can cut and paste directly into a cell) where one point is at Lat1, Long1 and the other is at Lat2, Long2. The result is in nautical miles.


As the comment in the reference says, you have to convert degrees, minutes and seconds to decimals of degrees, although there is probably a quick way around this that I haven't bothered with. You also have to be careful when the points are on opposite sides of 0 or 180 degrees longitude or of the equator - in each case one set of numbers has to be negative, the other positive. For example, taking west of the Greenich meridian and south of the equator as negative;
Manchester is +53.50, -2.25
Kuala Lumpur is +3.13, +101.70
Santiago de Chile is -33.50, -70.67

If I remember correctly, I got that out of the instruction book for a Hewlett Packard HP35 calculator in the 1980s!

GG

Last edited by Groundgripper; 5th Oct 2006 at 11:51. Reason: Edited for clarity (and history!)
Groundgripper is offline