summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-28 09:03:49 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-28 09:03:49 -0500
commit094c2c7bd7e4ebbbdabf3d448829523553d78b0f (patch)
treee71d1a93cccc3e69654435acd1d134c1435d4e04 /packet.c
parentb6e4309ac133d6afa54602dd32b5c95ffcd37310 (diff)
downloadgpsd-094c2c7bd7e4ebbbdabf3d448829523553d78b0f.tar.gz
Full support for Beido and QZSS constellations in NMEA0183 skyviews.
All regression tests pass. Required one test rebuild for QZNSS; Beidou test added.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/packet.c b/packet.c
index 82bd2343..7575f042 100644
--- a/packet.c
+++ b/packet.c
@@ -94,6 +94,7 @@ PERMISSIONS
* $GP -- Global Positioning System.
* $GL -- GLONASS, according to IEIC 61162-1
* $GN -- Mixed GPS and GLONASS data, according to IEIC 61162-1
+ * $BD -- Beidou
* $II -- Integrated Instrumentation (Raytheon's SeaTalk system).
* $IN -- Integrated Navigation (Garmin uses this).
* $WI -- Weather instrument (Airmar PB200, Radio Ocean ROWIND, Vaisala WXT520).
@@ -369,6 +370,10 @@ static bool nextstate(struct gps_lexer_t *lexer, unsigned char c)
lexer->state = SOUNDER_LEAD_1;
else if (c == 'Y')
lexer->state = TRANSDUCER_LEAD_1;
+ else if (c == 'B')
+ lexer->state = BEIDOU_LEAD_1;
+ else if (c == 'Q')
+ lexer->state = QZSS_LEAD_1;
#ifdef OCEANSERVER_ENABLE
else if (c == 'C')
lexer->state = NMEA_LEADER_END;
@@ -604,6 +609,18 @@ static bool nextstate(struct gps_lexer_t *lexer, unsigned char c)
else
return character_pushback(lexer, GROUND_STATE);
break;
+ case BEIDOU_LEAD_1:
+ if (c == 'D') /* Beidou leader accepted */
+ lexer->state = NMEA_LEADER_END;
+ else
+ return character_pushback(lexer, GROUND_STATE);
+ break;
+ case QZSS_LEAD_1:
+ if (c == 'Z') /* QZSS leader accepted */
+ lexer->state = NMEA_LEADER_END;
+ else
+ return character_pushback(lexer, GROUND_STATE);
+ break;
#ifdef TRIPMATE_ENABLE
case ASTRAL_1:
if (c == 'S') {