[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 2/6] Add new NMEA talker ID (WI, HC and TI)
From: |
chris |
Subject: |
[gpsd-dev] [PATCH 2/6] Add new NMEA talker ID (WI, HC and TI) |
Date: |
Sat, 21 Apr 2012 10:34:18 +0100 |
From: Christian Gagneraud <address@hidden>
WI: Weather instrument
HC: Heading, magnetic compass
TI: Turn rate indicator
Asssociated NMEA sentences:
WIMDA, WIMWD, WIMWV, WIVWR, WIVWT, TIROT, HCHDG, HCHDT
---
packet.c | 27 +++++++++++++++++++++++++++
packet_states.h | 3 +++
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/packet.c b/packet.c
index 938549d..b025cc8 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 79a134e..454f815 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 */
--
1.7.0.4
- [gpsd-dev] [RFC] Add support for Airmar PB200 Weather station, chris, 2012/04/21
- [gpsd-dev] [PATCH 1/6] Add missing attitude field initialisation in NMEA TNTHTM, chris, 2012/04/21
- [gpsd-dev] [PATCH 2/6] Add new NMEA talker ID (WI, HC and TI),
chris <=
- [gpsd-dev] [PATCH 5/6] Add a wind data structure, chris, 2012/04/21
- [gpsd-dev] [PATCH 3/6] Add new fields to the attitude data structure, chris, 2012/04/21
- [gpsd-dev] [PATCH 4/6] Add heading and rate of turn NMEA sentences (HDG, ROT), chris, 2012/04/21
- [gpsd-dev] [PATCH 6/6] Add Wind related NMEA sentence (MWD, MWV, VWR, VWT), chris, 2012/04/21
- Re: [gpsd-dev] [RFC] Add support for Airmar PB200 Weather station, Eric S. Raymond, 2012/04/21
- Re: [gpsd-dev] [RFC] Add support for Airmar PB200 Weather station, address@hidden, 2012/04/21