Parse sentences with GNSS identifiers

This commit is contained in:
Jesse Braham 2019-06-14 13:41:25 -07:00
parent c68499182d
commit 85751e96f3
1 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ boolean Adafruit_GPS::parse(char *nmea) {
// look for a few common sentences // look for a few common sentences
char *p = nmea; char *p = nmea;
if (strStartsWith(nmea, "$GPGGA")) { if (strStartsWith(nmea, "$GPGGA") || strStartsWith(nmea, "$GNGGA")) {
// found GGA // found GGA
// get time // get time
p = strchr(p, ',')+1; p = strchr(p, ',')+1;
@ -135,7 +135,7 @@ boolean Adafruit_GPS::parse(char *nmea) {
return true; return true;
} }
if (strStartsWith(nmea, "$GPRMC")) { if (strStartsWith(nmea, "$GPRMC") || strStartsWith(nmea, "$GNRMC")) {
// found RMC // found RMC
// get time // get time
p = strchr(p, ',')+1; p = strchr(p, ',')+1;
@ -183,7 +183,7 @@ boolean Adafruit_GPS::parse(char *nmea) {
return true; return true;
} }
if (strStartsWith(nmea, "$GPGLL")) { if (strStartsWith(nmea, "$GPGLL") || strStartsWith(nmea, "$GNGLL")) {
// found GLL // found GLL
// parse out latitude // parse out latitude
p = strchr(p, ',')+1; p = strchr(p, ',')+1;