AIS Sentence Sequential Message ID Usage

1.3k Views Asked by At

Here explained that the field 4 is a sequential message ID for multi-sentence messages. What does it means? What is the difference between field 4 and field 3?

2

There are 2 best solutions below

3
On BEST ANSWER

From the website:

Field 2 (1 in this example) is the count of fragments in the currently accumulating message. The payload size of each sentence is limited by NMEA 0183’s 82-character maximum, so it is sometimes required to split a payload over several fragment sentences.

Field 3 (1 in this example) is the fragment number of this sentence. It will be one-based. A sentence with a fragment count of 1 and a fragment number of 1 is complete in itself.

Field 4 (empty in this example) is a sequential message ID for multi-sentence messages.

Consider a message sent using 2 fragments:

  • Field 2 will be 2, the number of fragments.
  • Field 3 will be 1 for the first fragment, and 2 for the second
  • Field 4 can be any digit between 0 and 9, but will be common for both messages. This number is incremented for each new multi-fragment message sent by a vessel. It allows the decoding program to match together fragments that belong to the same message.

Here's one other example:

!AIVDM,2,1,8,A,56;OaD02B8EL990b221`P4v1T4pN0HDpN2222216HHN>B6U30A2hCDhD`888,0*4D
!AIVDM,2,2,8,A,88888888880,2*2C

The message has 2 parts (from field #2), we can see fragments 1 and 2 (from field #3), and the message_id for both fragments of this message is 8 (from field #4).

From the same vessels, I had previously received message ID 7, and right before this message ID 6, etc.

1
On

maybe it's to late for answer this now, but it could help others... This field 4, the sequential message id, runs from 0 to 9 and then start over 0. It's incremented each time a new multi-sentence message is generated, this is why the vessel A is seq 0, vessel B seq 1, etc because the receiver creates the NMEA messages and each multi-sentence message outputted increases this number no matter the transmitter (the Vessel)