summaryrefslogtreecommitdiff
path: root/test/sample.aivdm.js.chk
diff options
context:
space:
mode:
authorChristian Gagneraud <cgagneraud@techworks.ie>2012-06-04 01:14:27 +0100
committerChristian Gagneraud <chris@techworks.ie>2012-06-20 10:05:41 +0100
commit5214d309cf07b428ccfac647f7ac9ed8d597186f (patch)
tree672ecb9d61a1973252be347eb5b1bf13b7dfe7d1 /test/sample.aivdm.js.chk
parent9e6cdcb27d6af143721bb27bd886fc43d1214626 (diff)
downloadgpsd-5214d309cf07b428ccfac647f7ac9ed8d597186f.tar.gz
[AIS] Fix plenty of small bugs unveiled by aishub test campaign.
A test campaign was run with live data from aishub.net (ca. 25 millions sentence, 1.2 GB of logs), the goal was to check the decoding and the JSON parsing and dumping code. On all the AIS data, the following tests were done: - AIVDM decoding - JSON scaled dump - JSON validity check on scaled dump. - JSON unscaled dump - JSON validity check on unscaled dump - JSON unscaled idempotency check - JSON unscaled/scaled idempotency check The last check consisted of: - parsing the unscaled dump - dumping it back in scaled mode - compare it with the original scaled dump. This test campaign has unveiled plenty of small bugs all around the AIS code. This patch fixes all of them and adds new sentences in the regression tests.
Diffstat (limited to 'test/sample.aivdm.js.chk')
-rw-r--r--test/sample.aivdm.js.chk26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/sample.aivdm.js.chk b/test/sample.aivdm.js.chk
index edaf887b..ff61c1b5 100644
--- a/test/sample.aivdm.js.chk
+++ b/test/sample.aivdm.js.chk
@@ -5,8 +5,11 @@
{"class":"AIS","device":"stdin","type":4,"repeat":0,"mmsi":3669702,"scaled":true,"timestamp":"2007-05-14T19:57:39Z","accuracy":true,"lon":-76.3524,"lat":36.8838,"epfd":"Surveyed","raim":false,"radio":67039}
{"class":"AIS","device":"stdin","type":5,"repeat":0,"mmsi":351759000,"scaled":true,"imo":9134270,"ais_version":0,"callsign":"3FOF8","shipname":"EVER DIADEM","shiptype":"Cargo - all ships of this type","to_bow":225,"to_stern":70,"to_port":1,"to_starboard":31,"epfd":"GPS","eta":"05-15T14:00Z","draught":12.2,"destination":"NEW YORK","dte":0}
{"class":"AIS","device":"stdin","type":6,"repeat":1,"mmsi":150834090,"scaled":true,"seqno":3,"dest_mmsi":313240222,"retransmit":false,"dac":669,"fid":11,"data":"48:eb2f118f7ff1"}
-{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":992509976,"scaled":true,"seqno":0,"dest_mmsi":2500912,"retransmit":false,"dac":235,"fid":10,"off_pos":false,"alarm":false,"stat_ext":0,"ana_int":13.70,"ana_ext1":0.05,"ana_ext2":0.05,"racon":"RACON operational","light":"No RACON installed"}
+{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":992509976,"scaled":true,"seqno":0,"dest_mmsi":2500912,"retransmit":false,"dac":235,"fid":10,"off_pos":false,"alarm":false,"stat_ext":0,"ana_int":13.70,"ana_ext1":0.05,"ana_ext2":0.05,"racon":"RACON operational","light":"Light OFF"}
{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":265538450,"scaled":true,"seqno":0,"dest_mmsi":2655651,"retransmit":false,"dac":1,"fid":40,"data":"16:0000"}
+{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":230986000,"scaled":true,"seqno":2,"dest_mmsi":970110950,"retransmit":true,"dac":1,"fid":12,"lastport":"0CTES","departure":"05-04T00:60Z","nextport":",","eta":"00-00T00:00Z","dangerous":"","imdcat":"","unid":0,"amount":0,"unit":0}
+{"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2443808,"scaled":true,"seqno":0,"dest_mmsi":329176500,"retransmit":true,"dac":1,"fid":14,"month":0,"day":0,"tidals":[{"lon":279.339,"lat":-406.323,"from_hour":1,"from_min":5,"to_hour":29,"to_min":0,"cdir":0,"cspeed":0.0}]}
+{"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442101,"scaled":true,"seqno":1,"dest_mmsi":244615956,"retransmit":true,"dac":1,"fid":18,"linkage":1,"arrival":"00-00T00:00Z","portname":"","destination":"","lon":0.000,"lat":0.000}
{"class":"AIS","device":"stdin","type":7,"repeat":0,"mmsi":2655651,"scaled":true,"mmsi1":265538450,"mmsi2":0,"mmsi3":0,"mmsi4":0}
{"class":"AIS","device":"stdin","type":7,"repeat":1,"mmsi":655901842,"scaled":true,"mmsi1":158483613,"mmsi2":321823389,"mmsi3":836359488,"mmsi4":0}
{"class":"AIS","device":"stdin","type":7,"repeat":2,"mmsi":537411077,"scaled":true,"mmsi1":43101326,"mmsi2":717096664,"mmsi3":76161024,"mmsi4":0}
@@ -32,6 +35,7 @@
{"class":"AIS","device":"stdin","type":14,"repeat":0,"mmsi":311764000,"scaled":true,"text":"TEST"}
{"class":"AIS","device":"stdin","type":15,"repeat":0,"mmsi":368578000,"scaled":true,"mmsi1":5158,"type1_1":5,"offset1_1":0,"type1_2":0,"offset1_2":0,"mmsi2":0,"type2_1":0,"offset2_1":0}
{"class":"AIS","device":"stdin","type":15,"repeat":3,"mmsi":3669720,"scaled":true,"mmsi1":367014320,"type1_1":3,"offset1_1":516,"type1_2":5,"offset1_2":617,"mmsi2":0,"type2_1":0,"offset2_1":0}
+{"class":"AIS","device":"stdin","type":15,"repeat":0,"mmsi":211439370,"scaled":true,"mmsi1":211507560,"type1_1":5,"offset1_1":0,"type1_2":55,"offset1_2":663,"mmsi2":605843451,"type2_1":32,"offset2_1":560}
{"class":"AIS","device":"stdin","type":16,"repeat":0,"mmsi":2053501,"scaled":true,"mmsi1":224251000,"offset1":200,"increment1":0,"mmsi2":0,"offset2":0,"increment2":0}
{"class":"AIS","device":"stdin","type":17,"repeat":0,"mmsi":2734450,"scaled":true,"lon":29.1,"lat":60.0,"data":"376:7c0556c07031febbf52924fe33fa2933ffa0fd2932fdb7062922fe3809292afde9122929fcf7002923ffd20c29aaaa"}
{"class":"AIS","device":"stdin","type":18,"repeat":0,"mmsi":338087471,"scaled":true,"reserved":0,"speed":0.1,"accuracy":false,"lon":-74.0721,"lat":40.6845,"course":79.6,"heading":511,"second":49,"regional":0,"cs":true,"display":false,"dsc":true,"band":true,"msg22":true,"raim":true,"radio":917510}
@@ -42,8 +46,28 @@
{"class":"AIS","device":"stdin","type":20,"repeat":0,"mmsi":3160097,"scaled":true,"offset1":47,"number1":1,"timeout1":7,"increment1":250,"offset2":2250,"number2":1,"timeout2":7,"increment2":1125,"offset3":856,"number3":5,"timeout3":7,"increment3":1125,"offset4":0,"number4":0,"timeout4":0,"increment4":0}
{"class":"AIS","device":"stdin","type":21,"repeat":0,"mmsi":123456789,"scaled":true,"aid_type":"INVALID NAVAID TYPE","name":"CHINA ROSE MURPHY EXPRESS ALERT","lon":-122.6986,"lat":47.9206,"accuracy":false,"to_bow":5,"to_stern":5,"to_port":5,"to_starboard":5,"epfd":"GPS","second":50,"regional":165,"off_position":false,"raim":false,"virtual_aid":false}
{"class":"AIS","device":"stdin","type":22,"repeat":0,"mmsi":3160048,"scaled":true,"channel_a":2087,"channel_b":2088,"txrx":0,"power":false,"ne_lon":"-73.500000","ne_lat":"45.550000","sw_lon":"-80.166667","sw_lat":"42.333333","addressed":false,"band_a":false,"band_b":false,"zonesize":4}
+{"class":"AIS","device":"stdin","type":22,"repeat":1,"mmsi":17419965,"scaled":true,"channel_a":3584,"channel_b":8,"txrx":1,"power":true,"dest1":28144881,"dest2":268435519,"addressed":true,"band_a":false,"band_b":false,"zonesize":4}
{"class":"AIS","device":"stdin","type":23,"repeat":0,"mmsi":2268120,"scaled":true,"ne_lon":"2.630000","ne_lat":"51.070000","sw_lon":"1.826667","sw_lat":"50.680000","stationtype":"Regional use and inland waterways","shiptype":"Not available","interval":9,"quiet":0}
{"class":"AIS","device":"stdin","type":24,"repeat":0,"mmsi":271041815,"scaled":true,"shipname":"PROGUY","shiptype":"Passenger - all ships of this type","vendorid":"1D00014","callsign":"TC6163","to_bow":0,"to_stern":15,"to_port":0,"to_starboard":5}
+{"class":"AIS","device":"stdin","type":26,"repeat":1,"mmsi":137920605,"scaled":true,"addressed":true,"structured":true,"dest_mmsi":838351848,"app_id":23587,"data":"180:efa1708f32fc0a85c39e2c007006cf026c0f4882faad00","radio":0}
+{"class":"AIS","device":"stdin","type":25,"repeat":0,"mmsi":440006460,"scaled":true,"addressed":true,"structured":false,"dest_mmsi":134218384,"app_id":0,"data":"128:20000a4381be156d59b200ff9e80c185"}
+{"class":"AIS","device":"stdin","type":25,"repeat":0,"mmsi":563648328,"scaled":true,"addressed":false,"structured":true,"dest_mmsi":0,"app_id":134,"data":"112:082900a31880a2a636fffe034108"}
+{"class":"AIS","device":"stdin","type":25,"repeat":0,"mmsi":440002170,"scaled":true,"addressed":false,"structured":false,"dest_mmsi":0,"app_id":0,"data":"128:00001a438085956deb8d86a0100008c8"}
+{"class":"AIS","device":"stdin","type":26,"repeat":1,"mmsi":137920605,"scaled":true,"addressed":true,"structured":true,"dest_mmsi":838351848,"app_id":23587,"data":"180:efa1708f32fc0a85c39e2c007006cf026c0f4882faad00","radio":0}
+{"class":"AIS","device":"stdin","type":26,"repeat":0,"mmsi":84148325,"scaled":true,"addressed":true,"structured":false,"dest_mmsi":834699643,"app_id":0,"data":"228:q","radio":0}
+{"class":"AIS","device":"stdin","type":26,"repeat":2,"mmsi":633353704,"scaled":true,"addressed":false,"structured":true,"dest_mmsi":0,"app_id":24576,"data":"92:0014f2251db2ce9000ff9600","radio":0}
+{"class":"AIS","device":"stdin","type":26,"repeat":0,"mmsi":16777280,"scaled":true,"addressed":false,"structured":false,"dest_mmsi":0,"app_id":0,"data":"116:","radio":0}
+{"class":"AIS","device":"stdin","type":27,"repeat":1,"mmsi":236091959,"scaled":true,"status":"Restricted manoeuverability","accuracy":false,"lon":-154.2,"lat":87.1,"speed":0,"course":0,"raim":false,"gnss":false}
{"class":"AIS","device":"stdin","type":24,"repeat":0,"mmsi":271040660,"scaled":true,"shipname":"GOZDEM-1","shiptype":"Pleasure Craft","vendorid":"1C00045","callsign":"YM5504","to_bow":0,"to_stern":24,"to_port":0,"to_starboard":6}
{"class":"AIS","device":"stdin","type":5,"repeat":0,"mmsi":271010059,"scaled":true,"imo":0,"ais_version":0,"callsign":"TCA2350","shipname":"HEALTH CONTROL 13","shiptype":"Law Enforcement","to_bow":6,"to_stern":10,"to_port":2,"to_starboard":2,"epfd":"GPS","eta":"00-00T24:60Z","draught":2.0,"destination":"","dte":0}
{"class":"AIS","device":"stdin","type":5,"repeat":0,"mmsi":271010059,"scaled":true,"imo":0,"ais_version":0,"callsign":"TCA2350","shipname":"HEALTH CONTROL 13","shiptype":"Law Enforcement","to_bow":6,"to_stern":10,"to_port":2,"to_starboard":2,"epfd":"GPS","eta":"00-00T24:60Z","draught":2.0,"destination":"","dte":0}
+{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":276747000,"scaled":true,"seqno":0,"dest_mmsi":2766160,"retransmit":false,"dac":1,"fid":40,"data":"16:\t8"}
+{"class":"AIS","device":"stdin","type":4,"repeat":0,"mmsi":2470052,"scaled":true,"timestamp":"0-00-00T24:60:60Z","accuracy":false,"lon":181.0000,"lat":91.0000,"epfd":"Undefined","raim":false,"radio":180352}
+{"class":"AIS","device":"stdin","type":4,"repeat":0,"mmsi":2242115,"scaled":true,"timestamp":"2012-06-01T24:60:60Z","accuracy":true,"lon":-8.3852,"lat":43.3690,"epfd":"Surveyed","raim":false,"radio":133322}
+{"class":"AIS","device":"stdin","type":4,"repeat":0,"mmsi":972158237,"scaled":true,"timestamp":"10196-00-24T09:57:37Z","accuracy":true,"lon":205.1169,"lat":109.3321,"epfd":"(null)","raim":true,"radio":2248}
+{"class":"AIS","device":"stdin","type":22,"repeat":2,"mmsi":875794037,"scaled":true,"channel_a":3396,"channel_b":373,"txrx":1,"power":false,"dest1":837968222,"dest2":254804543,"addressed":true,"band_a":false,"band_b":true,"zonesize":7}
+{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":2444012,"scaled":true,"seqno":0,"dest_mmsi":255803540,"retransmit":true,"dac":1,"fid":18,"linkage":1,"arrival":"00-00T00:00Z","portname":"","destination":"","lon":0.000,"lat":0.000}
+{"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442102,"scaled":true,"seqno":0,"dest_mmsi":244100055,"retransmit":true,"dac":1,"fid":30,"linkage":1,"text":"("}
+{"class":"AIS","device":"stdin","type":6,"repeat":0,"mmsi":2444012,"scaled":true,"seqno":0,"dest_mmsi":255803540,"retransmit":true,"dac":1,"fid":18,"linkage":1,"arrival":"00-00T00:00Z","portname":"","destination":"","lon":0.000,"lat":0.000}
+{"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442101,"scaled":true,"seqno":2,"dest_mmsi":246351000,"retransmit":false,"dac":1,"fid":32,"month":0,"day":0,"tidals":[{"lon":-279.620,"lat":0.000,"from_hour":0,"from_min":0,"to_hour":0,"to_min":0,"cdir":0,"cspeed":0.0}]}
+{"class":"AIS","device":"stdin","type":6,"repeat":3,"mmsi":2442104,"scaled":true,"seqno":0,"dest_mmsi":245679000,"retransmit":false,"dac":1,"fid":32,"month":0,"day":0,"tidals":[{"lon":-104.858,"lat":0.000,"from_hour":0,"from_min":0,"to_hour":0,"to_min":0,"cdir":0,"cspeed":0.0}]}