Open robertforbes opened 6 years ago
There is a note in the reference page that
Bit lengths and length ranges are given because decoders should check them against the message type. Messages with correct checksums but the wrong payload length for their type occur with about 0.3% frequency on AISHub; if you don’t reject these, your clients will see spurious zeros or garbage.
The log file ais_squeensferry_advansea_rx_100_20170205.log contains the sentence "!AIVDM,1,1,,B,EvjFM;0Q2PVR@97QUP00000000?p<6v@1NSH?1skhGP10,4*4B\n"
which breaks the decoder. It is being interpreted as an aid to navigation report but the size of the payload (at the point where it is handed to decode_aid_to_navigation_report/1) is only 266 rather than the more common 272 bits.