Merge pull request #92 from jessebraham/gnss
Parse sentences with GNSS identifiers
This commit is contained in:
commit
2072e40b6b
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue