summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-01-31 05:02:01 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-01-31 05:02:01 -0500
commitd9bc023dfa2e870320b2cdbf2f8b5cb1c225ce72 (patch)
tree8e49435fd2c20f38816a6336ee6447d03e892f16 /www
parent5a173b2b4631b27ca0348444161be77320218566 (diff)
downloadgpsd-d9bc023dfa2e870320b2cdbf2f8b5cb1c225ce72.tar.gz
Be explicit about message preambles.
Diffstat (limited to 'www')
-rw-r--r--www/AIVDM.txt140
1 files changed, 101 insertions, 39 deletions
diff --git a/www/AIVDM.txt b/www/AIVDM.txt
index 107d3666..63290585 100644
--- a/www/AIVDM.txt
+++ b/www/AIVDM.txt
@@ -1,6 +1,6 @@
= AIVDM/AIVDO protocol decoding =
Eric S. Raymond <esr@thyrsus.com>
-v1.28, Jan 2011
+v1.28+, Jan 2011
This document is mastered in asciidoc format. If you are reading it in HTML,
you can find the original at http://gpsd.berlios.de/AIVDM.txt[]
@@ -836,23 +836,53 @@ DAC/FID pairs are assigned separately per message type.
A list of binary layouts for selected subtypes of message 6 follows.
(These are not yet implemented by GPSD.)
-==== Number of persons on board ====
+==== Number of persons on board (IMO236) ====
-A message 6 subtype. DAC = 001 FID = 16 in <<IMO236>>, DAC = 001 FID = 23
-in <<IMO289>>. The versions describe trailing padding and length differently,
-but the same 13-bit payload field.
+A message 6 subtype. DAC = 001 FID = 16 in <<IMO236>>. Fixed length, 72 bits.
[frame="topbot",options="header"]
|==============================================================================
|Field |Len |Description |Member |Units
+|0-5 | 6 |Message Type |type |Unsigned integer: 8
+|6-7 | 2 |Repeat Indicator |repeat |As in Common Navigation Block
+|8-37 | 30 |Source MMSI |mmsi |Unsigned integer: 9 digits
+|38-39 | 2 |Spare | |Not used
+|40-55 | 16 |DAC/FID | |DAC = 001 FID = 16
+|55-69 | 13 |# persons on board |persons |Unsigned integer
+| | | | |0 = N/A (default)
+| | | | |8191 = >= 8191 persons.
+|70-71 | 2 |Spare | |Not used
+|==============================================================================
+
+Note that though this is a message 6 subtype, there is no destination address.
+A strikeout in <<IMO236>> suggests that this was originally a subtype of 8.
+It would be good defensive implementation for a decode to accept either.
+
+==== Number of persons on board (IMO289) ====
+
+A message 6 subtype. DAC = 001 FID = 23 in <<IMO289>>. Fixed length, 146 bits.
+
+[frame="topbot",options="header"]
+|==============================================================================
+|Field |Len |Description |Member |Units
+|0-5 | 6 |Message Type |type |Unsigned integer: 8
+|6-7 | 2 |Repeat Indicator |repeat |As in Common Navigation Block
+|8-37 | 30 |Source MMSI |mmsi |Unsigned integer: 9 digits
+|38-39 | 2 |Sequence Number |seqno |Unsigned integer 0-3
+|40-69 | 30 |Destination MMSI |dest_mmsi |Unsigned integer: 9 digits
+|70-70 | 1 |Retransmit flag |retransmit|0 = no retransmission (default)
+| | | | |1 = retransmitted
+|71-71 | 1 |Spare | |Not used
|72-87 | 16 |DAC/FID | |DAC = 001 FID = 16
|88-110 | 13 |# persons on board |persons |Unsigned integer
+| | | | |0 = N/A (default)
+| | | | |8191 = >= 8191 persons.
+|111-146 | 35 |Spare | |Not used
|==============================================================================
-FID type 16 is in use; FID23 is a proposed update for it in <<IMO289>>.
-
-The value 0 (the default) means the information is not available. The value
-8191 indicates 8191 or more persons.
+<<IMO289>> claims this message is 136 bits long, but the field lengths
+sum to 146. It would be good practice to accept either length and
+ignore trailing padding.
==== Dangerous Cargo Indication ====
@@ -863,6 +893,14 @@ with a different layout, not reported in use and deprecated in <<IMO289>>.
[frame="topbot",options="header"]
|==============================================================================
|Field |Len |Description |Member |Units
+|0-5 | 6 |Message Type |type |Unsigned integer: 8
+|6-7 | 2 |Repeat Indicator |repeat |As in Common Navigation Block
+|8-37 | 30 |Source MMSI |mmsi |Unsigned integer: 9 digits
+|38-39 | 2 |Sequence Number |seqno |Unsigned integer 0-3
+|40-69 | 30 |Destination MMSI |dest_mmsi |Unsigned integer: 9 digits
+|70-70 | 1 |Retransmit flag |retransmit|0 = no retransmission (default)
+| | | | |1 = retransmitted
+|71-71 | 1 |Spare | |Not used
|72-87 | 16 |DAC/FID | |DAC = 001 FID = 25
|88-89 | 2 |Unit of Quantity |unit |cargounit
|90-99 | 10 |Amount of Cargo |amount |Unsigned integer
@@ -913,7 +951,15 @@ via the Message Linkage ID field.
[frame="topbot",options="header"]
|==============================================================================
-|Field |Len |Description |Member |Units
+|Field |Len |Description |Member |Units
+|0-5 | 6 |Message Type |type |Unsigned integer: 8
+|6-7 | 2 |Repeat Indicator |repeat |As in Common Navigation Block
+|8-37 | 30 |Source MMSI |mmsi |Unsigned integer: 9 digits
+|38-39 | 2 |Sequence Number |seqno |Unsigned integer 0-3
+|40-69 | 30 |Destination MMSI |dest_mmsi |Unsigned integer: 9 digits
+|70-70 | 1 |Retransmit flag |retransmit|0 = no retransmission (default)
+| | | | |1 = retransmitted
+|71-71 | 1 |Spare | |Not used
|72-87 | 16 |DAC/FID | |DAC = 001 FID = 30
|88-97 | 10 |Message Linkage ID |linkage |Unsigned integer
|98-? | 6-930 |Description |description |String
@@ -927,22 +973,30 @@ A message 6 subtype. DAC = 001 FID = 32. Fixed length: 350 bits.
[frame="topbot",options="header"]
|==============================================================================
-|Field |Len |Description |Member |Units
-|72-87 | 16 |DAC/FID | |DAC = 001 FID = 32
-|88-91 | 4 |Month |month |1-12; 0 = N/A (default)
-|92-96 | 5 |Day |day |1-31; 0 = N/A (default)
-|97-121 | 25 |Longitude |lon |Signed: unit minutes * 0.001
-| | | | |181000 = N/A (default)
-|122-145 | 24 |Latitude |lat |Signed: unit minutes * 0.001
-| | | | |91000 = N/A (default)
-|146-150 | 5 |From UTC Hour |from_hour|0-23, 24 = N/A (default)
-|151-156 | 6 |From UTC Minute |from_min |0-59, 60 = N/A (default)
-|157-161 | 5 |To UTC Hour |to_hour |0-23, 24 = N/A (default)
-|162-167 | 6 |To UTC Minute |to_min |0-59, 60 = N/A (default)
-|168-176 | 9 |Current Dir. Predicted |cdir |0-359 deg, 360-N/A (default)
-|177-186 | 9 |Current Speed Predicted|cspeed |0-250, uniits of 0.1 knots.
-| | | | |251 = speed >= 25.1 knots
-| | | | |255 = N/A (default)
+|Field |Len |Description |Member |Units
+|0-5 | 6 |Message Type |type |Unsigned integer: 8
+|6-7 | 2 |Repeat Indicator |repeat |As in Common Navigation Block
+|8-37 | 30 |Source MMSI |mmsi |Unsigned integer: 9 digits
+|38-39 | 2 |Sequence Number |seqno |Unsigned integer 0-3
+|40-69 | 30 |Destination MMSI |dest_mmsi |Unsigned integer: 9 digits
+|70-70 | 1 |Retransmit flag |retransmit|0 = no retransmission (default)
+| | | | |1 = retransmitted
+|71-71 | 1 |Spare | |Not used
+|72-87 | 16 |DAC/FID | |DAC = 001 FID = 32
+|88-91 | 4 |Month |month |1-12; 0 = N/A (default)
+|92-96 | 5 |Day |day |1-31; 0 = N/A (default)
+|97-121 | 25 |Longitude |lon |Signed: unit minutes * 0.001
+| | | | |181000 = N/A (default)
+|122-145 | 24 |Latitude |lat |Signed: unit minutes * 0.001
+| | | | |91000 = N/A (default)
+|146-150 | 5 |From UTC Hour |from_hour |0-23, 24 = N/A (default)
+|151-156 | 6 |From UTC Minute |from_min |0-59, 60 = N/A (default)
+|157-161 | 5 |To UTC Hour |to_hour |0-23, 24 = N/A (default)
+|162-167 | 6 |To UTC Minute |to_min |0-59, 60 = N/A (default)
+|168-176 | 9 |Current Dir. Predicted |cdir |0-359 deg, 360-N/A (default)
+|177-186 | 9 |Current Speed Predicted|cspeed |0-250, uniits of 0.1 knots.
+| | | | |251 = speed >= 25.1 knots
+| | | | |255 = N/A (default)
|=============================================================================
The group of fields from longitude on may repeat twice more to convey up to
@@ -1035,7 +1089,7 @@ under type 6.
FID types 11-15 are being phased out and are not to be used after 1
Jan 2013.The deprecated IMO236 1/11 has a different binary layout from
the IMO289 1/31. FID type 17 is in use; there is a proposed
-updates for tit in <<IMO289>>.
+update for it in <<IMO289>>.
Breakdowns of selected Message 8 subtypes from <<IMO289>> follow.
(These are not yet implemented by GPSD.)
@@ -1050,14 +1104,18 @@ it is titled "Pseudo-AIS Targets".
[frame="topbot",options="header"]
|==============================================================================
-|Field |Len |Description |Member |Units
-|72-87 | 16 |DAC/FID | |DAC = 001 FID = 17
-|88-89 | 2 |Identifier type |idtype |0 = id is the MMSI number
-| | | | |1 = id is the IMO number
-| | | | |2 = id is the call sign
-| | | | |3 = Other (default)
-|90-151 | 42 |Target identifier |See below |Target ID data.
-|152-155 | 4 |Spare | |Not used
+|Field |Len |Description |Member |Units
+|0-5 | 6 |Message Type |type |Unsigned integer: 8
+|6-7 | 2 |Repeat Indicator |repeat |As in Common Navigation Block
+|8-37 | 30 |Source MMSI |mmsi |Unsigned integer: 9 digits
+|38-39 | 2 |Spare | |Not used
+|40-55 | 16 |DAC/FID | |DAC = 001 FID = 17
+|56-57 | 2 |Identifier type |idtype |0 = id is the MMSI number
+| | | | |1 = id is the IMO number
+| | | | |2 = id is the call sign
+| | | | |3 = Other (default)
+|58-99 | 42 |Target identifier |See below |Target ID data.
+|100-103 | 4 |Spare | |Not used
|==============================================================================
The interpretation of the target idenifier field depends on the ppreceding type
@@ -1076,7 +1134,7 @@ field groups) to represent up to 4 targets.
==== Text description (broadcast) ====
-A message 8 subtype. DAC = 001 FID = 29. Variable length: 104-1028 bits.
+A message 8 subtype. DAC = 001 FID = 29. Variable length: 72-1034 bits.
Intended to be used to associate a text annotation with another message
via the Message Linkage ID field.
@@ -1084,9 +1142,13 @@ via the Message Linkage ID field.
[frame="topbot",options="header"]
|==============================================================================
|Field |Len |Description |Member |Units
-|72-87 | 16 |DAC/FID | |DAC = 001 FID = 29
-|88-97 | 10 |Message Linkage ID |linkage |Unsigned integer
-|98-? | 6-930 |Description |description |String
+|0-5 | 6 |Message Type |type |Unsigned integer: 8
+|6-7 | 2 |Repeat Indicator |repeat |As in Common Navigation Block
+|8-37 | 30 |Source MMSI |mmsi |Unsigned integer: 9 digits
+|38-39 | 2 |Spare | |Not used
+|40-55 | 16 |DAC/FID | |DAC = 001 FID = 29
+|56-65 | 10 |Message Linkage ID |linkage |Unsigned integer
+|66-? | 6-930 |Description |description |String
|==============================================================================
There is an equivalent subtype of message 6 that is an addressed description.