From a450f4ae94b6c266f8062c2a9544479aecda1ac3 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 22 Sep 2009 23:10:08 +0000 Subject: Fully support AIS type 22 and 23 messages. All regression tests pass. Codebase splints clean. --- gpsdecode.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gpsdecode.c') diff --git a/gpsdecode.c b/gpsdecode.c index eccfb045..406f651c 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -280,7 +280,7 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen) "%u,%u,%u,%u,%d,%d,%d,%d,%u,%u,%u,%u", ais->type22.channel_a, ais->type22.channel_b, - ais->type22.mode, + ais->type22.txrx, (uint)ais->type22.power, ais->type22.ne_lon, ais->type22.ne_lat, @@ -291,6 +291,19 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen) (uint)ais->type22.band_b, ais->type22.zonesize); break; + case 23: /* Group Management Command*/ + (void)snprintf(buf+strlen(buf), buflen-strlen(buf), + "%d,%d,%d,%d,%u,%u,%u,%u,%u", + ais->type23.ne_lon, + ais->type23.ne_lat, + ais->type23.sw_lon, + ais->type23.sw_lat, + ais->type23.stationtype, + ais->type23.shiptype, + ais->type23.txrx, + ais->type23.interval, + ais->type23.quiet); + break; case 24: /* Class B CS Static Data Report */ (void)snprintf(buf+strlen(buf), buflen-strlen(buf), "%s,", -- cgit v1.2.1