View Single Post
  #37   Report Post  
Rob Overton
 
Posts: n/a
Default Calculating distance from Lat/Long

"H. Chris Spreckley" wrote in message ...
Dear Lloyd,

I've picked this up rather late. If you still require the answer[s] then get
back to me including telling me whether you have a book of tables known as
"Norries Tables". If not I can give you an arithmetic method by calculator.
Basically you work out the D'Lat [difference in minutes of latitude] and
Dep(arture), then converting Dep into D'Long [differnce in minutes of
Longitude]. From which can be determined Dist(ance) and Co(arse) made good,
or of course the reverse having only course and distance find the rest.

Chris Spreckley



"Lloyd Sumpter" wrote in message
news
Hi,

I'm writing a program for Linux that displays position (from GPS) on a
scanned-in chart, and would like it to calculate distance from current
position to the cursor.

How do you calculate distance between two points using lat/long? If
they're due North/South, I can do it ( 1 minute of lat = 1 NM) but how do
you calculate distance from longitude? Perhaps some formula based on the
circumfrence of the Earth at the equator and the latitude?

Lloyd Sumpter


How come nobody has suggesed the simple midlatitude estimate? If all
you want is the distance from a point (lat0, lon0) on your chart and
the cursor, and you're only planning to use this over short distances
(say, less than 100 NM) AND lat0 is between 60°N and 60°S or so, a
good estimate of distance, which can even be done on a hand
calculator, is

D = K * SQRT((lat - lat0)^2 + cos(lat0)*(lon - lon0)^2)

where

D = desired distance
K = 60 (approx) = conversion factor from degrees of latitude to
nautical miles
(lat,lon) = cursor position (deg)
(lat0, lon0) = point on chart from which distance is desired (deg)

This easy estimate uses a tangent-plane approximation to a round-earth
model and relies on the fact that lines of longitude (meridians) are
approximately parallel in the mid latitudes. Under the indicated
conditions it's accurate to dozens of feet, and for short distances
(under a mile, say), to within a foot or two.