8000 NACp in v1 and v2 airborne positions · Issue #11 · SeRoSystems/lib1090 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
NACp in v1 and v2 airborne positions #11
Open
@fixje

Description

@fixje

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:

  1. Throw an Exception
  2. 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
  3. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0