Re: Diference in km between two GPS cordinates.



Hello Will,
Thanks for the education. Your responses have been very informative.
What are your thoughts on using the UTM coordinate system?
My interest in maps and gps is strictly recreational. I use National
Geographic's Trails Illustrated maps with UTM grids for parts of
Colorado and Utah and find UTM much easier to use for finding my
location on a map.
Jerry

On Sat, 20 Oct 2007 10:28:32 -0400, WillR
<willrNo.Spam.pmccl.noSpam.com> wrote:

David Ninnes wrote:
Marcello Dias wrote:
Hi,

Thank you all that replied I write my own sql function (derivide from
a Clipper Function I found in Google)
CREATE FUNCTION DistanciaKM (@lat1 FLOAT, @lon1 FLOAT, @lat2 FLOAT,
@lon2 FLOAT)
RETURNS FLOAT
AS BEGIN Declare @Radians FLOAT
SET @Radians=180/3.14159265;

SET @lat1=@lat1/@Radians SET @lon1=@lon1/@Radians
SET @lat2=@lat2/@Radians
SET @lon2=@lon2/@Radians Return (6367
*ACOS(SIN(@lat1)*SIN(@lat2)+COS(@lat1)*COS(@lat2 )*COS(@lon2-@lon1))) END

Regards,
Marcello



Hi Marcello,

This, I think, assumes a sphere, it looks like the haversine formula,
GPS co-ords are WGS84 usually afaik, this uses a flattened ellipsoid, as
mentioned by other ops, the vincenty formula will give you a more
accurate result, if you're only looking at 10km += 1 km it probably
doesn't matter, but if you want to calculate down to 10's or 100's of
meters then it does.

The different values of the flattening depend on the particular
co-ordinate system you use. Also the centre is a little bit off too, it
moves depending on the co-ordinate system you use.

Check which system you use and google "distance between two coordinates
wgs84" one of these should help, or your GPS manufacturer can probably
tell you.

cheers,
Dave

This link is interesting and makes some intelligent comments about the
ellipsoids. Hopefully the fellow will check back in and look at your
suggestion.

I think this one is a good first crack at it. Glad you found the link
for everyone.
http://www.movable-type.co.uk/scripts/latlong-vincenty.html


And yes, you do have to think about the usage of the number -- thank you
for reinforcing the idea. :-)

.



Relevant Pages

  • Re: TR - Expedition (longish)
    ... really should have put in a few more waypoints). ... I'm not sure if the wind was affecting my GPS altimeter but the ... Well after a couple of tiny ascents on the ridge anyway. ... I think we had plenty of maps between us, but most didn't bother to get them ...
    (uk.rec.walking)
  • Re: Diference in km between two GPS cordinates.
    ... What are your thoughts on using the UTM coordinate system? ... My interest in maps and gps is strictly recreational. ... This is a projection based on Transverse Mercator -- it attempts to make squares of squashed flat sections of the spheroid It's pretty successful too. ... CREATE FUNCTION DistanciaKM (@lat1 FLOAT, @lon1 FLOAT, @lat2 FLOAT, @lon2 FLOAT) ...
    (borland.public.delphi.non-technical)
  • Re: gps software for walking
    ... So my requirement, to find my rocks in a featureless moor, should now read ... grid references, if only because the will me using OS Explorer maps. ... |!any good reputable walking/hiking GPS will do. ...
    (uk.rec.walking)
  • Re: GPS Greece
    ... would like to use a GPS but it appears that GPS systems don't have ... maps available for anything but Athens. ... I've driven to Greece a few times now and always take a GPS to help us ... and all accurate maps have been controlled by them. ...
    (rec.travel.europe)
  • Re: iPad anyone?
    ... will doubtless appear for the iPad, as they are now on the iPhone. ... have pre-loaded maps like a standalone GPS and do not depend on any kind ... (in three apps covering US west, US east and Canada, but you can get ... has a free one (not offline maps, ...
    (misc.transport.road)