summaryrefslogtreecommitdiff
path: root/driver_ais.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-02 16:44:54 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-02 16:44:54 -0400
commit466a626ed1bda0680da82d21cbb31f637efa9a3e (patch)
tree5dbdefb3c12d02ad02e801a531c5b2fa96d6f308 /driver_ais.c
parent0f0b771836516a762bc0a1649cd378c371bad36c (diff)
downloadgpsd-466a626ed1bda0680da82d21cbb31f637efa9a3e.tar.gz
Support Inland AIS ship static and voyage-related data.
Diffstat (limited to 'driver_ais.c')
-rw-r--r--driver_ais.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/driver_ais.c b/driver_ais.c
index da78f657..4e566749 100644
--- a/driver_ais.c
+++ b/driver_ais.c
@@ -639,6 +639,23 @@ bool ais_binary_decode(const int debug,
imo = true;
break;
}
+ else if (ais->type8.dac == 200) {
+ switch (ais->type8.fid) {
+ case 21: /* Inland ship static and voyage related data */
+ UCHARS(56, ais->type8.dac200fid10.vin);
+ ais->type8.dac200fid10.length = UBITS(104, 13);
+ ais->type8.dac200fid10.beam = UBITS(117, 10);
+ ais->type8.dac200fid10.type = UBITS(127, 14);
+ ais->type8.dac200fid10.hazard = UBITS(141, 3);
+ ais->type8.dac200fid10.draught = UBITS(144, 11);
+ ais->type8.dac200fid10.loaded = UBITS(155, 2);
+ ais->type8.dac200fid10.speed_q = (bool)UBITS(157, 1);
+ ais->type8.dac200fid10.course_q = (bool)UBITS(158, 1);
+ ais->type8.dac200fid10.heading_q = (bool)UBITS(159, 1);
+ /* skip 8 bits */
+ break;
+ }
+ }
/* land here if we failed to match a known DAC/FID */
if (!imo)
(void)memcpy(ais->type8.bitdata,