|
From: | Ellon Paiva |
Subject: | Re: [gpsd-users] Communicating NMEA to gpsd as if my software was a GPS device |
Date: | Thu, 5 Sep 2019 14:25:48 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
Yo Gary! On 9/4/19 9:09 PM, Gary E. Miller wrote:
I looked at your sample file some more. I thought you would like to know how wrong some of your "NMEA" is.
Yes!
For example: $GPGGA,103642.879013,4850.432180742773,N,226.381659556439,E,7,08,,0,M,0,M,,*73 Field 1, time of measurement: 103642.879013 NMEA only allows 2 digits past the decimal point. Some GPS use 3. Field 2, latitude: 4850.432180742773 NMEA only allows 2 digits past the decimal point. Some GPS use 3 or 4. Field 4, longitude: 226.381659556439 Seriously, 226 degrees east? NMEA range is +/- 180.
Oops, thanks for spotting this!
NMEA only allows 2 digits past the decimal point. Some GPS use 3 or 4.
OK, thanks for the info about the number of digits past the decimal point.
Field 10, HDOP. Missing.
This was in purpose, as I am not really simulating localization from satellites. Should I put a value, like one of this table here ? https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)#Meaning_of_DOP_Values[citation_needed]
Field 11, altitude: 0 Missing decimal point.
Thanks!
Field 13, geoid separation: 0 Zero? Really???
Yeah, Really. :-) I based myself in the formula h = H + N, and that altitude means H and geoid separation means N. Since I only have z height ("h" in the formula), I thought it was doable to leave geoid separation as zero and set altitude to my z height. It seems I got the right value on the gpsd json output.
Maybe I could try to use proj4 to recover the undulation given a certain lat/lon and fill this field properly?
Missing decimal point. Other sentences similarly non-compliant... These will make a good example of things gpsd should detect and complain about.
Thanks for looking at these logs!At the end I'm not sure these would disturb gpsd. The safe_atof() on gpsutils.c seems to handle many decimal digits (I think it accepts a number to up 18 digits). About the missing fields, it seems that they are just not informed to gpsd clients, which would be a problem if the clients expect them, but I think that's not my case...
Best, Ellon
[Prev in Thread] | Current Thread | [Next in Thread] |