Go Back  PPRuNe Forums > Flight Deck Forums > Tech Log
Reload this Page >

Distance between 2 points


Notices
Tech Log The very best in practical technical discussion on the web

Distance between 2 points

Old 18th February 2004 | 06:09
  #1 (permalink)  
Thread Starter
 
Joined: Jan 2004
Posts: 431
Likes: 0
From: LPPT
Lightbulb Distance between 2 points

Hi All

I'm seeking a valid formula for calculating the distance between 2 points on the earth globe, giving the Lat's / Lon's from both places.

I've tried two or three formulas but when comparing results with actual charts, I always get different distances.

Can someone give me a hand here?
Thanks in advance.
GearDown&Locked is offline  
Old 18th February 2004 | 09:57
  #2 (permalink)  
 
Joined: Nov 2001
Posts: 214
Likes: 0
From: KUL
try
http://williams.best.vwh.net/avform.htm
SuperRanger is offline  
Old 18th February 2004 | 11:40
  #3 (permalink)  
 
Joined: May 2003
Posts: 177
Likes: 0
From: I'm the asshole next door
http://gc.kls2.com/
flynverted is offline  
Old 18th February 2004 | 19:41
  #4 (permalink)  
25 Anniversary
 
Joined: Apr 2000
Posts: 294
Likes: 0
From: West Midlands, UK.
Departure (n.m.) = Ch.Long (min) x cos.lat

1 A flight is to be made along the parallel of latitude from A at 48 °00N 04°00'W to B at 48°00N 02°27E. Calculate the distance. (259nm)
Cron is offline  
Old 18th February 2004 | 21:10
  #5 (permalink)  
 
Joined: Feb 2002
Posts: 247
Likes: 0
From: oxford
Rhumb Line or Great Circle distance?

It makes a big difference.
oxford blue is offline  
Old 18th February 2004 | 22:03
  #6 (permalink)  
 
Joined: Apr 2002
Posts: 150
Likes: 0
From: Bohol, Philippines
The great circle distance d between two points with coordinates {lat1,lon1} and {lat2,lon2} is given by:

Dist=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))
SFI145 is offline  
Old 19th February 2004 | 01:22
  #7 (permalink)  
20 Anniversary
 
Joined: Aug 2003
Posts: 240
Likes: 0
From: Scotland
A small clarification to the last...

SFI145's formula is completely correct, but for the benefit of those at the back of the maths class who may not have been keeping up, I'd add a small word about units, especially for those of you typing the formula into your favourite spreadsheet.

Your favourite spreadsheet probably does sines and cosines of angles in radians, and the formula shown works great if your Lat and Long pairs are in radians, at which point it also gives you the answer in Great Circle radians.

For those of you who started with Lat/Long in degrees, and wanted the answer in nautical miles - first convert your degrees into radians by multiplying by (pi/180), and convert the radian answer back into degrees by using the opposite (180/pi). Finally, to get from great circle degrees to nautical miles, multiply by 60.
CJ Driver is offline  
Old 19th February 2004 | 08:08
  #8 (permalink)  
Thread Starter
 
Joined: Jan 2004
Posts: 431
Likes: 0
From: LPPT
Many thanks for all the helpfull replies.

Best Regards

GDL
GearDown&Locked is offline  
Old 19th February 2004 | 09:25
  #9 (permalink)  
swh

Eidolon
25 Anniversary
 
Joined: May 2001
Posts: 2,244
Likes: 62
From: Some hole
The formulas above will be slightly different to charts as charts are projected onto a spheriod, normally the WGS84 ellipsopid.

The formula results above will agree directly with unprojected data, or an unprojected map.

The WGS84 ellipsoid is flatter at the poles than a perfect sphere, hence the spherical geometry answers you received above will have a small error as a result of the projection.
swh is offline  
Old 19th February 2004 | 15:49
  #10 (permalink)  


PPRuNeaholic
 
Joined: Jun 2000
Posts: 3,255
Likes: 0
From: Cairns FNQ
Lightbulb

To add just a little to the post by CJ Driver... if you're starting with latitude and longitude in the standard format of degrees, minutes and seconds (to however many decimals), first convert it all to degrees. Then convert to radians in the way that he (or she) has described.

The conversion is simple enough, just divide the minutes by 60, then divide the seconds by 3600, then add the lot to the degrees.

If you've started with the coordinate format on a chart, it will be in degrees and minutes (to a couple of decimal places). The conversion for this is even simpler because you only have to contend with the minutes.

You might still end up with an error of a mile or more, depending on the datum used in the chart. The formula for deriving distance, as posted by SFI145 is a catch-all that should work pretty well for the WGS-84 datum, but not be all that great with any of the myriad of other datums that are available.

In any event, you might end up with a slightly different answer to that shown on a chart. This will be due to factors such as the way the distance is rounded for chart use. Also, on whether the chart distance was calculated using the actual coordinates, or the decimalised version of the same.
OzExpat is offline  
Old 28th February 2004 | 07:41
  #11 (permalink)  
 
Joined: Mar 2000
Posts: 100
Likes: 1
From: Oakland CA USA
In case it's not yet clear

First caveat: lat-lons don't come scribed on stone tablets. The lat-lon of a given point in the US or Europe (or most anywhere else, probably) has changed over the last few decades, not because the point has moved but because we're now calculating it differently. Some places have "moved" a few hundred meters on that account. (Or farther?)

So if you want accuracy to better than, say, 10 meters you need to know which system of lat-lons you're using. Then:

Next you decide what accuracy you need. SFI145 gave the usual formula for a spherical earth, which in extreme cases will be off by twenty miles or so (since the earth isn't spherical). If that's not good enough, you can choose between (among others)

Lambert's formulas, which are fairly simple and accurate to 5-10? meters over almost any distance

Bowring's short-distance formulas, which are fairly simple and accurate to a few millimeters for points up to 100 km apart

More complicated iterative formulas that are accurate to a millimeter for points less than 19500 km apart.

You can program any of them into your pocket calculator. Or, if you just want the answer, you can use Ed Williams' site linked above, or the NGS website, which will do the iterative calculation for you, accurate to a millimeter. I think they both fail if the two points are too close to antipodal.
Tim Zukas is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.