Merge pull request #92 from jessebraham/gnss

Parse sentences with GNSS identifiers
This commit is contained in:
Limor "Ladyada" Fried 2019-06-14 17:13:34 -04:00 committed by GitHub
commit 2072e40b6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;