diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-09-15 11:47:33 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-09-15 11:47:33 -0400 |
commit | 795a00d7598541e59d36eb865cc14eedf1d0f628 (patch) | |
tree | 65b9a1b202c4fdac127200b8b2a1d0d5305a5014 /jsongen.py.in | |
parent | 205add74159c5056972932e31ce873e73477dcc8 (diff) | |
download | gpsd-795a00d7598541e59d36eb865cc14eedf1d0f628.tar.gz |
Extract ITU-R 1371-4 model and serial fields from AIS Type24 messages.
In ITU-R 1371-4, there are new model and serial fields carved out of
the right-hand end of vendorid, which is reduced from 7 chars to 3.
It is not clear in which minor revision this change took place. To
cope with older AIS implementations, unpack the trailing bits *both*
ways; truly revision-4-conformant implementations will have up to four
characters of trailing garbage on the vendorid, and older
implementations will have garbafe in the model and serial fields.
This commit also reverts the change to copy only 20 characters rather
than 21 when analyzing the name field in a type21. There's some mystery
about why this didn't break the rgression tests sooner.
Diffstat (limited to 'jsongen.py.in')
-rw-r--r-- | jsongen.py.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jsongen.py.in b/jsongen.py.in index 82d165d3..74fa23a4 100644 --- a/jsongen.py.in +++ b/jsongen.py.in @@ -717,6 +717,8 @@ ais_specs = ( ('shipname', 'string', None), # Part A ('shiptype', 'uinteger', '0'), # Part B ('vendorid', 'string', None), # Part B + ('model', 'uinteger', '0'), # Part B + ('serial', 'uinteger', '0'), # Part B ('callsign', 'string', None), # Part B ('mothership_mmsi', 'uinteger', '0'), # Part B ('dim.to_bow', 'uinteger', '0'), # Part B |