gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Type 6 unstructured data missing


From: Stefan Roels
Subject: [gpsd-dev] Type 6 unstructured data missing
Date: Wed, 07 Oct 2015 13:59:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi All,

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.


Regards,
Stefan Roels

!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"}
!AIVDM,1,1,,2,69NRm4h0UBf206P0T66kCC,0*5D
{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":636007699,"scaled":true,"seqno":0,"dest_mmsi":2444000,"retransmit":true,"dac":1,"fid":40,"data":"44:009061b34d30"}
!AIVDM,1,1,,2,601uEOprGPwJ04<address@hidden,0*4D
{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":2053503,"scaled":true,"seqno":2,"dest_mmsi":244810742,"retransmit":true,"dac":1,"fid":3,"data":"80:00400000000000000000"}
!AIVDM,1,1,,A,6>jCJdkfJjOt>db;address@hidden,2*79
{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":992271027,"scaled":true,"seqno":0,"dest_mmsi":999999999,"retransmit":false,"dac":235,"fid":10,"off_pos":false,"alarm":false,"stat_ext":1,"ana_int":27.80,"ana_ext1":0.05,"ana_ext2":0.05,"racon":0,"racon_text":"No
RACON installed","light":1,"light_text":"Light ON"}



diff --git a/driver_ais.c b/driver_ais.c
index 561bbf0..0cd50bf 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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]