You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 getNACp method returns the field value. The field value is set by the state-ful decoder upon reception of an AirborneOperationalStatusMsg
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.
The text was updated successfully, but these errors were encountered:
fixje
changed the title
NACp in v2 airborne positions
NACp in v1 and v2 airborne positions
Jan 30, 2023
The method
public byte getNACp()
is available inAirbornePositionV1Msg
andAirbornePositionV2Msg
through inheritance. Semantically, this is not correct as stated in the Javadoc:Maybe we should make this more explicit?
Alternatives that come to my mind, both overriding the method in
AirbornePositionV1Msg
andAirbornePositionV1Msg
:getNACp
method returns the field value. The field value is set by the state-ful decoder upon reception of anAirborneOperationalStatusMsg
In solution (2), the method will only be used when the
AirbornePositionMsg
is created by an instance ofDecoder
. Note that we have similar behavior already withgetNIC
, where supplements need to be set.The text was updated successfully, but these errors were encountered: