diff options
author | Jon Schlueter <jschlueter@redhat.com> | 2015-10-07 20:47:31 -0400 |
---|---|---|
committer | Jon Schlueter <jschlueter@redhat.com> | 2015-10-07 21:13:15 -0400 |
commit | ac257bab48e1dc29a3a837286fb4fcfd71e02aaf (patch) | |
tree | a5a391c01013c7db514d752e382e53d37700e8ed /driver_ais.c | |
parent | 858296bb928370c4ec074e4844cd85cf95aa2cb0 (diff) | |
download | gpsd-ac257bab48e1dc29a3a837286fb4fcfd71e02aaf.tar.gz |
better handling of type 6 unhandled FID entries
When there are unknown FID values in type 6 messages for DAC values that
have some known FIDs (DAC 200, 235 and 250), the data is not read (and
thus printed as all zeros). I have added some example AIVDM messages
which exhibit this problem, some that did not have the problem in the
existing version and a patch for the problem.
Added sample
!AIVDM,1,1,,A,601uEPprEH2@<P<j00,4*32
-{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":2053507,"scaled":true,"seqno":2,"dest_mmsi":244670500,"retransmit":false,"dac":200,"fid":3,"data":"16:0000"}
+{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":2053507,"scaled":true,"seqno":2,"dest_mmsi":244670500,"retransmit":false,"dac":200,"fid":3,"data":"16:3200"}
adjusted loop logic to allow it to continue to process other types
Identified by: Stefan Roels <sroels-gpsd-dev@42solutions.nl>
Diffstat (limited to 'driver_ais.c')
-rw-r--r-- | driver_ais.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/driver_ais.c b/driver_ais.c index 1942ef77..535a420f 100644 --- a/driver_ais.c +++ b/driver_ais.c @@ -240,7 +240,6 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout, ais->type6.structured = true; break; } - break; } /* UK and Republic Of Ireland */ else if (ais->type6.dac == 235 || ais->type6.dac == 250) { @@ -260,7 +259,6 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout, ais->type6.structured = true; break; } - break; } /* International */ else if (ais->type6.dac == 1) |