Advanced Search
Home New             
About us    
GPS / GALILEO Products New 
GPS Technology
A-GPS Services New 
Support, Tools and Help
u-blox 5 Products
ANTARIS 4 Products
ANTARIS Products
u-center    
u-center mobile
FAQ              
FAQ about GPS
u-blox 5 FAQ
ANTARIS FAQ
Legacy Products FAQ
GPS Tutorial
GPS Links  
Investor Relations
Media Relations, News New 
Careers      
Buy Samples 

Frequently Asked Questions: FAQ about GPS

Topic

 8Distance between two positions

Distance between two positions


Question:

I have two positions in Lat and Lon, and want to find out the distance between them.

Answer:

For short distances, one can take the line of sight between the two points:

Say you have two points: (Lat1, Lon1) and (Lat2 and Lon2) which are not too far (kilometers) from each other.

- Take the differences:

---------------------------
dLat = Lat1 - Lat2
dLon = Lon1 - Lon2
---------------------------

- Convert these to meters:

   One degree of Latitude has 111'199.233 Meters:

-------------------------------------
dMLat = dLat * 111'199.233
-------------------------------------

One degree of Longitude is dependent on the Latitude. One degree Longitude has 111'199.233 * cosine ( Latitude ) Meters. Please note that usually, the cosine library function expects it argument in radians, rather than degrees, so conversion might be necessary.

------------------------------------------------------------------------
dMLon = dLon * ( 111'199.233 * cos ( Lat * PI / 180 ) )
------------------------------------------------------------------------

- We now have the differences in meters in north/south direction dMLat, and in east/west direction dMLon. Using Pythagoras, we get the true distance

--------------------------------------------------
D = square_root( dMLon2 + dMLat2 )
--------------------------------------------------

Keep in mind that this is only true for relatively short distances. For longer distances, the "Great Circle" algorithm can be used, which is documented in literature.

 
Further Information
FAQ about GPS
 
Previous EntryPrevious Entry
Next EntryNext Entry
 
 
/customersupport/faq_generic/d...
last modified: 06.10.2004

Important legal information - please read the disclaimer before proceeding.

© u-blox ag, 1997-2008