gpsd-dev
[Top][All Lists]
Advanced

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

[gpsd-dev] devtools/ais.py type25 parsing bug


From: KIU Shueng Chuan
Subject: [gpsd-dev] devtools/ais.py type25 parsing bug
Date: Fri, 27 Jul 2012 11:29:10 +0800

Hi,

In devtools/ais.py from gpsd release 3.7, the bitfield definition of
"type25" is causing a TypeError exception in aivdm_unpack().

type25 = {
    bitfield("addressed", ...),
    bitfield("structured", ..."Dimension to Bow"),     # legend field
should be "Binary Data Flag"
    ...
    bitfield("data", None, ...)                                 #
width field set to None causes the exception
}

One of the last few lines of aivdm_unpack() does
offset += inst.width
which chokes on width==None

Changing None to 0 in the bitfield definition makes it work.



For reference, the following was the sentence that triggered it:
!AIVDM,1,1,,B,I9NS<Lh01dWK:UN0bOM2MR2d0<<K,0*58



reply via email to

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