mikalhart / TinyGPSPlus

A new, customizable Arduino NMEA parsing library
http://arduiniana.org
1.11k stars 494 forks source link

wrong coordinates from GPGGA? #25

Closed holgerkoch closed 7 years ago

holgerkoch commented 7 years ago

Hello,

i read the gps string from a Sim808. Here is a example:

$GPGGA,104108.000,0050.9686,N,00011.0508,E,1,6,1.31,207.2,M,47.6,M,,*5e

and feed with this the gps.encode function. After this, i read the position:

Serial.print(F("Location: ")); if (gps.location.isValid()) { Serial.print(gps.location.lat(), 6); Serial.print(F(",")); Serial.print(gps.location.lng(), 6); }

But i think, i got a strange answer:

Location: 0.849477,0.184180

If i read the location string in an other format, it seems to work. $GPRMC,105059.000,A,5058.1122,N,01103.0505,E,2.722,183.48,090317,,,A*52

Location: 50.968525,11.050855

Can you tell me, is there something strange? Is the format of the GPGGA string korrekt?

best regargs

Holger Koch

mikalhart commented 7 years ago

Holger, the checksum for that $GPGGA sentence is correct, but if it was generated at the same time as the $GPRMC sentence I have to say that the module must just be wrong.