Thread: GPS coordinates
View Single Post

  #2 (permalink)  
Old 02-08-2007
Wilfried Wilfried is offline
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: GPS coordinates

Hi,

This is NMEA0183 format. To compute it into the format mappoint need is very simple. I explain:

The format you have is for latitude:
ddmm.ffff
and for longitude:
dddmm.ffff
and N/S, E/W is the hemishpere.
dd(d) are the degrees
mm are the minutes
ffff are the fractions of the minutes

So you exctract the degrees (2 char's for latitude, 3 for longitude) and add them to a double. Then you thake the minutes including fractions (watch that the decimal separator mach your computer's locales or workaround it), divide it by 60 and add it to the degrees.

Then check the hemishpere. S - beyond equator so latitude = -latitude, and W is left of meridiane, so longitude = - longitude.
Reply With Quote