BoatBanter.com

BoatBanter.com (https://www.boatbanter.com/)
-   Electronics (https://www.boatbanter.com/electronics/)
-   -   What is the sequence field in AIS messages? (https://www.boatbanter.com/electronics/153222-what-sequence-field-ais-messages.html)

Larry Tonnade August 24th 12 10:04 PM

What is the sequence field in AIS messages?
 
Hello all,
I'm trying to understand AIS messages that are passed around between boats.
My sotware job is requiring I write or reuse a parser.
I've read some documentation by Eric S Raymond but he's not all that clear for a beginner like me.
Now to begin with the messages are typically in a NMEA0183 format, which I wont explain here. In the case of AIS they begin with
AIVDM or AIVDO, then there are three fields:
1) a number that indicates the number of NMEA messages that are used to send one AIS message
2) a number that indicates the message number (must be less or equal to the previous)
3) a sequence number for multi-sentence messages.
This 3rd number is the mysterious one: from the description it looks like it's exactly the same as the second. But they would not have made it up if it was that. So just what is the difference? Am I misinterpreting something in my description?
And and by the way the next fields are "channel number" and the AIS payload, and some more we won't go into
Thankyou for your attention
Larry

Meindert Sprang August 27th 12 01:07 PM

What is the sequence field in AIS messages?
 
"Larry Tonnade" JUNK wrote in message
...

Hello all,
I'm trying to understand AIS messages that are passed around between
boats.
My sotware job is requiring I write or reuse a parser.
I've read some documentation by Eric S Raymond but he's not all that
clear for a beginner like me.
Now to begin with the messages are typically in a NMEA0183 format, which
I wont explain here. In the case of AIS they begin with
AIVDM or AIVDO, then there are three fields:
1) a number that indicates the number of NMEA messages that are used to
send one AIS message


No, it is the number of NMEA *sentences* to send one message

2) a number that indicates the message number (must be less or equal to
the previous)


Again, the *sentence* number

3) a sequence number for multi-sentence messages.


This is indeed the *message* number.

An AIS message can be spread over more than one sentence, this is taken case
of with the first to fields and an AIS message can also have a sequence
number, which is represented by the third field.

From the top down:
You can have message 0 to 9 (rolling over) and each message can have up to 9
sentences.

Meindert



Larry Tonnade August 30th 12 08:25 PM

Quote:

Originally Posted by Meindert Sprang (Post 937203)
"Larry Tonnade" JUNK wrote in message
...

Hello all,
I'm trying to understand AIS messages that are passed around between
boats.
My sotware job is requiring I write or reuse a parser.
I've read some documentation by Eric S Raymond but he's not all that
clear for a beginner like me.
Now to begin with the messages are typically in a NMEA0183 format, which
I wont explain here. In the case of AIS they begin with
AIVDM or AIVDO, then there are three fields:
1) a number that indicates the number of NMEA messages that are used to
send one AIS message


No, it is the number of NMEA *sentences* to send one message

2) a number that indicates the message number (must be less or equal to
the previous)


Again, the *sentence* number

3) a sequence number for multi-sentence messages.


This is indeed the *message* number.

An AIS message can be spread over more than one sentence, this is taken case
of with the first to fields and an AIS message can also have a sequence
number, which is represented by the third field.

From the top down:
You can have message 0 to 9 (rolling over) and each message can have up to 9
sentences.

Meindert

Thankyou for driving the point home, Meindert.
Now if only I could have an idea why there might be a sequence number for AIS
messages. You see with the possibly incorrect sample AIS data I got there was a sequence number that was 9 in a sentence, preceded by a message of another type with no sequence number.
Larry

Larry Tonnade August 31st 12 08:44 PM

Now I think I have found the appropriate explanation here :

Quote:

The "message sequential identifier" is a number from 0 to 9 that is sequentially assigned as needed. This identifier is incremented for each new multi-sentence message. The count resets to 0, after 9 is used. For radio broadcast messages requiring multiple sentences, each sentence of the message contains the same sequential identification number. The purpose of this number is to link the separate sentences containing portions of the same radio message. This allows for the possibility that other sentences might be interleaved with the message sentences that contain the complete message contents. This number also links an ABK-sentence acknowledgement to the appropriate BBM-sentence.
I havent seen anything as clear elsewhere.
My source:http://www.pamguard.org/devDocs/AIS/AISDataUnit.html


All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 BoatBanter.com