bugGPSD - Bugs: bug #40297, AIS type 19 decoding bug

 
 

bug #40297: AIS type 19 decoding bug

Submitted by:  Marius Kintel <kintel>
Submitted on:  Fri 18 Oct 2013 06:30:54 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 18 Oct 2013 06:30:54 AM UTC, original submission:

In driver_ais.c, type 19 messages have a few decoding bugs:

ais->type19.epfd = UBITS(299, 4);
ais->type19.raim = UBITS(302, 1)!=0;
ais->type19.dte = UBITS(305, 1)!=0;
ais->type19.assigned = UBITS(306, 1)!=0;

The correct code should be:

ais->type19.epfd = UBITS(301, 4);
ais->type19.raim = UBITS(305, 1)!=0;
ais->type19.dte = UBITS(306, 1)!=0;
ais->type19.assigned = UBITS(307, 1)!=0;

Here's a test string I pulled off an online data source:
!AIVDM,1,1,,B,C69>7mh0>r<9vD5Auh;PcwVPHc0TNL?0jc1WQkR00000?1@5222P,0*52

The above message should yield the following fields:

to_port: 4,
to_stern: 10,
course: 359.4,
to_starboard: 4,
speed: 5.9,
raim: false,
epfd: 1,
to_bow: 20,
dte: 1,
repeat: false,
assigned: false,
accuracy: true,
lon: 122.47004,
regional: 0,
lat: 36.91477666666667,
second: 13,
shipname: "LU RONG YU 3091",
shiptype: 30,
mmsi: 412321751

Marius Kintel <kintel>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by esr (Updated the item)
  • -unavailable- added by kintel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Nov 2013 01:45:04 PM UTCesrOpen/ClosedOpen=>Closed
    Fri 18 Oct 2013 02:24:44 PM UTCesrStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1