-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The method public byte getNACp() is available in AirbornePositionV1Msg and AirbornePositionV2Msg through inheritance. Semantically, this is not correct as stated in the Javadoc:
In ADS-B version 1+ this information is contained in the operational status message. For version 0 it is derived from the format type code.
Maybe we should make this more explicit?
Alternatives that come to my mind, both overriding the method in AirbornePositionV1Msg and AirbornePositionV1Msg:
- Throw an Exception
- Introduce a field to the V1 and V2 airborne position messages. The overridden
getNACpmethod returns the field value. The field value is set by the state-ful decoder upon reception of anAirborneOperationalStatusMsg - Major refactoring: remove inheritance relationship and replace with appropriate interfaces
In solution (2), the method will only be used when the AirbornePositionMsg is created by an instance of Decoder. Note that we have similar behavior already with getNIC, where supplements need to be set.
Metadata
Metadata
Assignees
Labels
No labels