From 780c8a9c6bcdd1f8c904eaf28c11ceb317a0a2f7 Mon Sep 17 00:00:00 2001 From: Jon Schlueter Date: Tue, 6 Oct 2015 03:26:00 -0400 Subject: AIS:refine parsing of type 8 DAC 1 FID 16 messages - Type 8, DAC = 1 FID = 16: This should only be decoded as "Persons on board" if the message length is either 72 or 136 bits long (if even then). - Type 8, DAC = 1 FID = 16: If decoded, the json output should use the ais->type8.dac1fid16.persons field and not the type6 field Was not able to locate entry that had persons actually populated in AISHub sample data file added sample data that should not be decoded to sample.aivdm had to regenerate large sample file as it had multiple entries for this Identified by: Stefan Roels type 8 dac 1 fid 16 can have either data or persons had to add logic to detect structured vs not structured for type 8 FID 16 messages --- test/sample.aivdm.js.chk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/sample.aivdm.js.chk') diff --git a/test/sample.aivdm.js.chk b/test/sample.aivdm.js.chk index 4d6b80cb..eb6a1a21 100644 --- a/test/sample.aivdm.js.chk +++ b/test/sample.aivdm.js.chk @@ -86,3 +86,5 @@ {"class":"AIS","device":"stdin","type":8,"repeat":0,"mmsi":2766080,"scaled":true,"dac":1,"fid":11,"lat":58.867,"lon":23.047,"timestamp":"20T18:30Z","wspeed":0,"wgust":0,"wdir":0,"wgustdir":0,"humidity":0,"airtemp":-60.0,"dewpoint":-20.0,"pressure":800,"pressuretend":"steady","visibility":0.0,"waterlevel":-10.0,"leveltrend":"steady","cspeed":25.5,"cdir":0,"cspeed2":0.0,"cdir2":0,"cdepth2":0,"cspeed3":0.0,"cdir3":0,"cdepth3":0,"waveheight":0.0,"waveperiod":3,"wavedir":0,"swellheight":0.0,"swellperiod":0,"swelldir":0,"seastate":0,"watertemp":-9.9,"preciptype":0,"preciptype_text":"reserved","salinity":0.0,"ice":0,"ice_text":"no"} {"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"} {"class":"AIS","device":"stdin","type":8,"repeat":0,"mmsi":366999607,"scaled":true,"dac":366,"fid":57,"data":"510:7ffdef068fbded3c0a1943dfb997b4a10fadec21e6e0a6608f0f44b686a8747ff71e595dcb5ec5b4e05221d886233d2e4916f6eb6fe8ecd38d69792816f3a2d0"} +{"class":"AIS","device":"stdin","type":8,"repeat":0,"mmsi":2391100,"scaled":true,"dac":1,"fid":16,"data":"240:0000e56a780022b4440a903c3bbf00000130ac568022bab80ad35f803f00"} +{"class":"AIS","device":"stdin","type":8,"repeat":0,"mmsi":2711009,"scaled":true,"dac":1,"fid":16,"data":"720:00025e8d136025bd890d5520b2ff0ac000000070202580430d4bbf003f000001027cc3302597b60d4b15003f000000c5c4a9802584cf0d3f45803f000000f47ba58025cdf40d4391003f0000010272bb00258e5f0d44f7c9ff0a"} -- cgit v1.2.1