summaryrefslogtreecommitdiff
path: root/gpsdecode.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-05-10 17:29:13 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-05-10 17:29:13 -0400
commit521f76730e5879831bea76d9123dc0c2c7354349 (patch)
tree2c63c4fac20de6a82fc4280d68e8ac69f3f37c59 /gpsdecode.c
parentc348dbdb04843b452664427c36e666997d0e0dcd (diff)
downloadgpsd-521f76730e5879831bea76d9123dc0c2c7354349.tar.gz
In AIS message types 6 and 8, split app_id into DAC and FID per ITU-1371.
Wire protocol and API minor versions get bumped. All changes are as documented in AIVDM.txt, which now describes known message 6 and 8 subtypes. Involved rebuilding a couple of AIS regression tests. All regression tests pass. Also includes various typo fixes for AIVDM.txt discovered by Baylink while we were reviewing these changes.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r--gpsdecode.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gpsdecode.c b/gpsdecode.c
index e70c325e..08ef0ad6 100644
--- a/gpsdecode.c
+++ b/gpsdecode.c
@@ -104,11 +104,12 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen)
break;
case 6: /* Binary Message */
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
- "%u,%u,%u,%u,%zd:%s",
+ "%u,%u,%u,%u,%u,%zd:%s",
ais->type6.seqno,
ais->type6.dest_mmsi,
(uint) ais->type6.retransmit,
- ais->type6.app_id,
+ ais->type6.dac,
+ ais->type6.fid,
ais->type6.bitcount,
gpsd_hexdump(ais->type6.bitdata,
(ais->type6.bitcount + 7) / 8));
@@ -122,8 +123,9 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen)
break;
case 8: /* Binary Broadcast Message */
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
- "%u,%zd:%s",
- ais->type8.app_id,
+ "%u,%u,%zd:%s",
+ ais->type8.dac,
+ ais->type8.fid,
ais->type8.bitcount,
gpsd_hexdump(ais->type8.bitdata,
(ais->type8.bitcount + 7) / 8));