[Gpsd-dev] Re: [Xastir] SiRF GPRMC bug? and GPGGA format

Henk de Groot henk.de.groot at hetnet.nl
Tue May 17 15:29:39 EDT 2005


Tapio Sokura schreef:
> No I don't have a copy of the standard. I should have said second hand 
> knowledge, as all receivers I have examined (about dozen different 
> models) have zero padded the degrees and minutes parts in the NMEA 
> output. Two digits for latitude degrees, three digits for longitude 
> degrees and two digits for (whole) minutes. The amount of minute 
> decimals varies; my first GPS outputs only two decimals, more recent 
> "normal" GPSes output three and many OEM units output four decimals.

 From the parts I've seen of the standard the only thing that is realy 
defined is that fields are comma separated. I think it is dangerous to 
assume any format. Kenwood did with their first TH-D7 and now that one 
doesn't work with more accurate GPSses anymore...

The best free source I found is the NMEA FAQ (for example 
<http://vancouver-webpages.com/peter/nmeafaq.txt>). It doesn't say 
anything about percision or the need to zero pad the output.

The way I parse GPS sentences in DIGI_NED is just to tokenize on the 
comma's and then interpret the values as a float (scanf it) - regardless 
of leading zeros and decimal percision. This should work for all different 
ways to present the degrees, zero padded on not and with 1 or 10 digits 
behind the point.

Assuming anything that is not explictly stated in the standard will soon 
or later backfire.

Kind regards,

Henk.




More information about the Xastir mailing list