summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-02 05:12:55 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-03-02 05:12:55 -0500
commit96f0f6627d3ab20d89dedf244e80bd01de0a78fa (patch)
treec29c9776742f1134716d68128706ea6a065277b4 /packet.c
parent6adb3c4b22a66c9afd2765a709b0f529464ba1c5 (diff)
downloadgpsd-96f0f6627d3ab20d89dedf244e80bd01de0a78fa.tar.gz
Code to accommodate alternat Beidou talker ID of $GB. Also, add a test for it.
All regression tests pass.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index 625e02c6..08e58864 100644
--- a/packet.c
+++ b/packet.c
@@ -95,6 +95,7 @@ PERMISSIONS
* $GL -- GLONASS, according to IEIC 61162-1
* $GN -- Mixed GPS and GLONASS data, according to IEIC 61162-1
* $BD -- Beidou
+ * $GB -- Beidou
* $QZ -- QZSS GPS augmentation system
* $II -- Integrated Instrumentation (Raytheon's SeaTalk system).
* $IN -- Integrated Navigation (Garmin uses this).
@@ -386,8 +387,10 @@ static bool nextstate(struct gps_lexer_t *lexer, unsigned char c)
/*
* $GP == GPS, $GL = GLONASS only, $GN = mixed GPS and GLONASS,
* according to NMEA (IEIC 61162-1) DRAFT 02/06/2009.
+ * We have a log from China with a Beidou device using $GB
+ * rather than $BD.
*/
- if (c == 'P' || c == 'N' || c == 'L')
+ if (c == 'B' || c == 'P' || c == 'N' || c == 'L')
lexer->state = NMEA_LEADER_END;
else
(void) character_pushback(lexer, GROUND_STATE);