summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packet.c27
-rw-r--r--packet_states.h3
2 files changed, 30 insertions, 0 deletions
diff --git a/packet.c b/packet.c
index 938549da..b025cc8f 100644
--- a/packet.c
+++ b/packet.c
@@ -95,6 +95,9 @@ PERMISSIONS
* GN -- Mixed GPS and GLONASS data, according to IEIC 61162-1
* II -- Integrated Instrumentation (Raytheon's SeaTalk system).
* IN -- Integrated Navigation (Garmin uses this).
+ * WI -- Weather instrument (Airmar PB200, Radio Ocean ROWIND, Vaisala WXT520).
+ * HC -- Heading/compass (Airmar PB200).
+ * TI -- Turn indicator (Airmar PB200).
* EC -- Electronic Chart Display & Information System (ECDIS)
* SD -- Depth Sounder
* P -- Vendor-specific sentence
@@ -324,6 +327,12 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c)
lexer->state = NMEA_VENDOR_LEAD;
else if (c == 'I') /* Seatalk */
lexer->state = SEATALK_LEAD_1;
+ else if (c == 'W') /* Weather instrument */
+ lexer->state = WEATHER_LEAD_1;
+ else if (c == 'H') /* Heading/compass */
+ lexer->state = HEADCOMP_LEAD_1;
+ else if (c == 'T') /* Turn indicator */
+ lexer->state = TURN_LEAD_1;
else if (c == 'A') /* SiRF Ack */
lexer->state = SIRF_ACK_LEAD_1;
else if (c == 'E') /* ECDIS */
@@ -500,6 +509,24 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c)
else
lexer->state = GROUND_STATE;
break;
+ case WEATHER_LEAD_1:
+ if (c == 'I') /* Weather instrument leader accepted */
+ lexer->state = NMEA_LEADER_END;
+ else
+ lexer->state = GROUND_STATE;
+ break;
+ case HEADCOMP_LEAD_1:
+ if (c == 'C') /* Heading/compass leader accepted */
+ lexer->state = NMEA_LEADER_END;
+ else
+ lexer->state = GROUND_STATE;
+ break;
+ case TURN_LEAD_1:
+ if (c == 'I') /* Turn indicator leader accepted */
+ lexer->state = NMEA_LEADER_END;
+ else
+ lexer->state = GROUND_STATE;
+ break;
case ECDIS_LEAD_1:
if (c == 'C') /* ECDIS leader accepted */
lexer->state = NMEA_LEADER_END;
diff --git a/packet_states.h b/packet_states.h
index 79a134e8..454f815f 100644
--- a/packet_states.h
+++ b/packet_states.h
@@ -25,6 +25,9 @@
AIS_LEAD_2, /* seen I of possible marine AIS message */
SEATALK_LEAD_1, /* SeaTalk/Garmin packet leader 'I' */
+ WEATHER_LEAD_1, /* Weather instrument packet leader 'W' */
+ HEADCOMP_LEAD_1, /* Heading/compass packet leader 'H' */
+ TURN_LEAD_1, /* Turn indicator packet leader 'T' */
ECDIS_LEAD_1, /* ECDIS packet leader 'E' */
SOUNDER_LEAD_1, /* Depth sounder packet leader 'S' */
#endif /* NMEA_ENABLE */