Closed wiseman closed 5 years ago
The decoder aims for compliance with the latest ADS-B standard DO-260B where a value for the version other than 0, 1 and 2 are not allowed (reserved). To the best of my knowledge there isn't even a draft of DO-260C.
If a transponder obviously violates the standard we can not be sure if other bits in the message still have the same semantics.
Sounds reasonable.
I have observed multiple aircraft send several hundred operational status messages (tc=31) with a version number of 3. In the current code this causes a
BadFormatException
.Since messages with an unexpected version number are observed in the wild and don't seem to be the result of garbled reception, I think the strategy of throwing an exception should be reconsidered. Instead of providing different classes for each version of message, perhaps it would work better to have a single class that would provide whatever information was available in the message, possibly in the form of key/value pairs.
E.g., instead of decoding as an
AirborneOperationalStatusV1Msg
withhasOperationalTCAS
andhas1090ESIn
methods, a message would decode as anAirborneOperationalStatusMsg
, and users would callgetProperty(HAS_OPERATIONAL_TCAS)
andgetProperty(HAS_1090_ES_IN)
.More information is available in this post: https://aviation.stackexchange.com/questions/60182/received-ads-b-tc-31-message-with-non-existent-version-3