# Converting Lat-Long Coordinates to Absolute Distance - Flat Earth

Hello All,
Can somebody help me out, please?
I need to convert two lat-long coordinates to straight line distances (feet or meters is fine). For the distances involved, I can assume a
"flat earth". :-)
I started Google searching but stumbled into some lengthy curved earth math. Just looking for something orthogonally simple.
TIA, Andy
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Andy,
Try this great circle calculator.
http://williams.best.vwh.net/gccalc.htm
Mario
Andy Eng wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Hi Andy: If the latitude is low you can use the Pythagorean Theorem: distance= sqrt( (lat1-lat2)^2 + (lon1-lon2)^2 ) to get the separation in degrees. At the equator a degree is a nautical mile, so you're done. A nautical mile is about 6076 feet.
But remember that while a degree of longitude is a nautical mile at the equator, it is zero miles at the pole. You'll only be off by about 40% with the longitude portion at 38 degrees latitude.
If you just want to do this one time you should download a flight planning tool from the web. Those will give you a "great circle" distance.     Will
Andy Eng wrote:

--
Will Marchant, NAR 13356, Tripoli 10125 L2
snipped-for-privacy@amsat.org http://www.spaceflightsoftware.com/will /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

CHAD solution: enter both sets of coordinates into a hand held GPS, and let the GPS figure out the distance between the points!
--
Bob Kaplow NAR # 18L >>> To reply, there's no internet on Mars (yet)! <<<
Kaplow Klips & Baffle: http://nira-rocketry.org/Document/MayJun00.pdf
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Or plug the coord's into a mapping program like Streets and Trips, most can give a straight line distance, as well as driving directions.
On 10 Oct 2005 11:49:19 -0500, kaplow snipped-for-privacy@encompasserve.org.mars (Bob Kaplow) wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Here's some code, if you do that:
'/* compute inner product on unit sphere */ slInner = Sin(slLat1) * Sin(slLat2) + Cos(slLat1) * Cos(slLat2) * Cos(slLon1 - slLon2)
'/* compute arc cosine of that inner product, avoiding possible ' computational inaccuracies that would induce overflow */ If slInner >= 1 Then slArc = 0 ElseIf slInner <= -1 Then slArc = PI Else slArc = Acos(slInner) End If
'/* rescale from unit sphere to sphere of earth_radius */ GeoDistance1 = slArc * EARTH_RADIUS
earth radius = 3963.202 miles

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
wrote:

Why would we add that error checking?
sin * sin + cos* cos cannot exceed 1, or -1 and cos(L1-L2) also cannot exceed 1 or -1
methinks, for now.
Just searching for may pocket calc... :-)
w.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Not all computers/languages play nice that way...
"Helmut Wabnig" <EmailAddress> wrote in message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Here's something I was reading this weekend that might help: http://www.charlespetzold.com/etc/AvenuesOfManhattan/index.html
Also, there's Google Earth. http://earth.google.com . Get the free version, and you can use ctrl-6 to measure. Not quite as easy as just entering two coordinates, but almost.
Roy nar12605

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

## Site Timeline

• ### rec.models.rockets FAQ Part 00 - Introduction and TOC

• - next thread in Model rockets forum

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.