tbsalling / aismessages

AISmessages is a Java-based light-weight, zero-dependency, and ultra-efficient message decoder for maritime navigation and safety messages compliant with ITU 1371 (NMEA armoured AIS messages). A live demo of AISmessages is available on http://ais.tbsalling.dk.
https://github.com/tbsalling/aismessages/wiki
Other
156 stars 66 forks source link

Course Over Ground valued 511 #46

Closed panoet closed 2 years ago

panoet commented 2 years ago

Is it possible that this library produce Course Over Ground with value 511?

I found that values in my application, checked all logic and found nothing incorect in my code.

As far as I know, value 511 is only valid in Heading Sensor (true heading) data, which mean "no heading sensor". It is not applied to course over ground. CMIIW

tbsalling commented 2 years ago

Yes, that is possible. AISmessages is a protocol-level library, it does not assume anything about the data it decodes or how the application will interprete them.

You are right about the ITU-1371 spec. It does not mention 511 as a special meaning for COG. But in real life, in my experience, you can expect to see all sort of strange things. Do not expect all real-life AIS messages to be in strict compliance with the specification - because they are not. Far from actually.

If you have a valid AIS message, with validated checksum, then yes - you can see COG 511 even if that is not mentioned in the specification. 511 is what was sent.