Google
  Web www.gpspassion.com


GpsPasSion LIVE!
www.flickr.com
This is a Flickr badge showing public photos from GpsPasSion Live !. Make your own badge here.

www.NaviBlog.com



Versions

Links/Liens




Portal/Portail
Rechercher

- -

Polls/Sondages
Sondage
Pour vous guider sur la Route :
GPS Mobile (SEM)
GPS Intégré
Smartphone
Autre
Voter  -  Résultat des votes
Votes : 1355




Club GpsPasSion
Soutenez le site!

USA: (US$)
EUROPE: (€)
Guide Paypal


GpsPasSion Forums
Home | Profile | Register/Enregist. | Active Topics | Search/Recherche | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Advanced Topics
 General Technical Discussions
 Distance calculation using latitude and longitude
 New Topic  Reply/Répondre
 Printer Friendly
Author Previous Topic Topic Next Topic  

admin_0

1 Posts

Posted - 13 mai 2004 :  22:59:19  Show Profile  Reply with Quote
Somebody know the formula by obtain the distance between two waypoints. Only you know :
c1= Lat 19.49914N, Lon 99.23689W
c2= Lat 19.51251N, Lon 99.23513W

It's Alt necesary?



vic

Ads


rwcx183

81 Posts

Posted - 20 mai 2004 :  04:34:21  Show Profile  Reply with Quote
Vic,

For short distances such as these, you can do a pretty simple calculation as follows:

delta_lat=111117*(lat1 - lat2)
delta_lon=111117*cos(lat1)*(lon1 - lon2)

distance = sqrt(delta_lat^2 + delta_lon^2)

That will give you the distance in meters, to a first order. It works ok for short distances, but error does creep in for longer distances, where a MUCH more complicated formula is needed.

J.G.


Go to Top of Page

paulkbiba

USA
5064 Posts

Posted - 20 mai 2004 :  05:03:33  Show Profile  Reply with Quote
Suggestion to gpspassion: could you make this sticky?

Moderator
Don't forget the GPSPassion Club!
Go to Top of Page

dcrochet

USA
1044 Posts

Posted - 27 mai 2004 :  05:52:27  Show Profile  Reply with Quote
I would use the ellipsoid model and define your datum as WGS-84. The basic equations and code can be found here:
http://www.codeguru.com/Cpp/Cpp/algorithms/article.php/c5115


Dell Axim X5 400MHz A04, PPC2002 OS, Mapopolis 4.xx, Fortuna PocketXTrack CF GPS
Go to Top of Page

cp

USA
28 Posts

Posted - 01 juin 2004 :  03:29:15  Show Profile  Reply with Quote
Vic,
this freebie may be helpful..
http://www.mentorsoftwareinc.com/PRODUCTS/FWDINV.HTM
Go to Top of Page

jmenezes

Brazil
7 Posts

Posted - 05 oct. 2004 :  16:04:31  Show Profile  Visit jmenezes's Homepage  Reply with Quote
I wrote some C routines for this.
If you like I will send to you.

[]s
julio menezes
Go to Top of Page

VoodooKiss

Italy
11 Posts

Posted - 28 avr. 2005 :  15:58:02  Show Profile  Reply with Quote
I've got a Matlab routine if you like...

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply/Répondre
 Printer Friendly
Jump To:
GpsPasSion Forums © 2002-2013_GpsPasSion/Manzanite Go To Top Of Page
This page was generated in 0,38 seconds. Powered By: Snitz Forums 2000 Version 3.4.05