diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-05-28 08:46:52 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-05-28 08:46:52 +0000 |
commit | 88c1095700fefac22d1db3ac7b11d551d992142b (patch) | |
tree | e7b223f26e271b0187267ecfa4542959a0bfeb10 /gps.h | |
parent | 4841c90d028c3124487aeb7c1075edd7642e1698 (diff) | |
download | gpsd-88c1095700fefac22d1db3ac7b11d551d992142b.tar.gz |
Correct the test for auxiliary-craft MMSI.
Diffstat (limited to 'gps.h')
-rw-r--r-- | gps.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -446,8 +446,14 @@ struct rtcm3_t { typedef /*@unsignedintegraltype@*/ unsigned int gps_mask_t; -/* Is an MMSI number that of an auxiliary associated with a mother ship? */ -#define AIS_AUXILIARY_MMSI(n) ((n) / 100000 == 98) +/* + * Is an MMSI number that of an auxiliary associated with a mother ship? + * We need to be able to test this for decoding AIS Type 24 messages. + * According to <http://www.navcen.uscg.gov/marcomms/gmdss/mmsi.htm#format>, + * auxiliary-craft MMSIs have the form 98MIDXXXX, where MID is a country + * code and XXXX the vessel ID. + */ +#define AIS_AUXILIARY_MMSI(n) ((n) / 10000000 == 98) struct ais_t { |