Closed prefixFelix closed 4 months ago
The length of the UTC hour and minute field of the sub message must be increased from 4 bits to 5 bits, otherwise an incorrect time will be output. This is always the case if the hour of a message is greater than 15. An example:
decoded = pyais.decode('!AIVDM,1,1,,B,133ga6PP0lPPE>4M3G@DpOwTR61p,0*33') com = decoded.get_communication_state() print(f"Time: {com['utc_hour']}:{com['utc_minute']}") # Outputs: Time: 0:30
The actual output should be 16:30. This can also be cross-checked with online AIS decoders such as the Maritec one.
@prefixFelix That looks correct. Good catch!
No problem. Thanks for the great project! It saved me a lot of time and hassle on my own project.
@prefixFelix That is nice to hear. Thank you!
The length of the UTC hour and minute field of the sub message must be increased from 4 bits to 5 bits, otherwise an incorrect time will be output. This is always the case if the hour of a message is greater than 15. An example:
The actual output should be 16:30. This can also be cross-checked with online AIS decoders such as the Maritec one.