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

Reply to
Andy Eng
Loading thread data ...

Andy,

Try this great circle calculator.

formatting link
Mario

Andy Eng wrote:

Reply to
Mario Perdue

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 > Hello All,

Reply to
Will Marchant

CHAD solution: enter both sets of coordinates into a hand held GPS, and let the GPS figure out the distance between the points!

Reply to
Bob Kaplow

Reply to
Bob n Robin

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

Reply to
Greg Deputy

Here's something I was reading this weekend that might help:

formatting link
Also, there's Google Earth.
formatting link
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

Reply to
Roy Green

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.

Reply to
Helmut Wabnig

Not all computers/languages play nice that way...

Reply to
Greg Deputy

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.