Class TLcdARINCEnrouteAirwayHandler

java.lang.Object
com.luciad.format.arinc.decoder.TLcdARINCEnrouteAirwayHandler
All Implemented Interfaces:
ILcdARINCHandler

public class TLcdARINCEnrouteAirwayHandler extends Object
This extension of the ALcdARINCHandler interface deals with enroute airway records (Enroute Airways Records, section code E, subsection code R). Decoded models have as model descriptor an instance of TLcdARINCEnrouteAirwayModelDescriptor.

The objects in decoded models are based on the AIS domain objects available in com.luciad.ais.model, which all implement ILcdDataObject. This interface provides a generic and format-independent way of accessing the type and properties (features) of a domain object.

For this handler, the type of the decoded objects is TLcdARINCDataTypes.ATSRoute, which can also be retrieved through ILcdDataObject.getDataType(). The available properties of the objects are defined in TLcdARINCATSRouteDataProperties. The values for these properties can be retrieved through ILcdDataObject.getValue(com.luciad.datamodel.TLcdDataProperty).

Next to ILcdDataObject, the objects in decoded models also implement ILcdFeatured, the former interface to access the properties (features) of a domain object. This is still fully supported, and explained in the following comments.

The setAirwayFeatureNamesToBeDecoded method and the setAirwaySegmentFeatureNamesToBeDecoded method allow the user to specify which ARINC features are decoded into the featured model objects.

If no feature names to be decoded are specified, all features will be decoded.

The following fields (taken from the ARINC specification 424) are supported by the decoder. The list indicates into which feature the fields are decoded. It also indicates from which ARINC version on they are available.

  • Version 15 :
    • Route Identifier: ILcdATSRouteFeature.IDENTIFIER
    • ICAO Code: ILcdARINCATSRouteSegmentFeature.ICAO_REGION
    • Route Type: ILcdATSRouteSegmentFeature.TYPE
    • Level: ILcdATSRouteSegmentFeature.LEVEL
    • Direction Restriction: ILcdARINCATSRouteSegmentFeature.DIRECTION_RESTRICTION
    • Cruise Table Indicator: ILcdARINCATSRouteSegmentFeature.CRUISE_LEVEL
    • RNP: ILcdATSRouteSegmentFeature.REQUIRED_NAVIGATION_PERFORMANCE
    • Outbound Magnetic Course: ILcdARINCATSRouteSegmentFeature.OUTBOUND_MAGNETIC_COURSE, ILcdARINCATSRouteSegmentFeature.OUTBOUND_MAGNETIC_COURSE_TYPE
    • Route Distance From: ILcdATSRouteSegmentFeature.DISTANCE, ILcdATSRouteSegmentFeature.DISTANCE_UNIT
    • Inbound Magnetic Course: ILcdARINCATSRouteSegmentFeature.INBOUND_MAGNETIC_COURSE, ILcdARINCATSRouteSegmentFeature.INBOUND_MAGNETIC_COURSE_TYPE
    • Minimum Altitude: ILcdARINCATSRouteSegmentFeature.MINIMUM_ALTITUDE_1, ILcdARINCATSRouteSegmentFeature.MINIMUM_ALTITUDE_1_UNIT
    • Minimum Altitude: ILcdARINCATSRouteSegmentFeature.MINIMUM_ALTITUDE_2, ILcdARINCATSRouteSegmentFeature.MINIMUM_ALTITUDE_2_UNIT
    • Maximum Altitude: ILcdARINCATSRouteSegmentFeature.MAXIMUM_ALTITUDE, ILcdARINCATSRouteSegmentFeature.MAXIMUM_ALTITUDE_UNIT
    • Cycle Date: ILcdARINCATSRouteSegmentFeature.CYCLE_DATE
  • Version 17 :
    • Fixed radius transition indicator: ILcdARINCATSRouteSegmentFeature.FIXED_RADIUS_TRANSITION_INDICATOR
  • Version 18 :
    • Sequence Number: ILcdARINCATSRouteSegmentFeature.SEQUENCE_NUMBER
    • Fix Identifier: ILcdARINCATSRouteSegmentFeature.FIX_IDENTIFIER
    • Waypoint Description Code: ILcdARINCATSRouteSegmentFeature.WAYPOINT_DESCRIPTION_CODE

ARINC handlers rely on a specific set of key features that uniquely define an object. This set of features must always be included in the set of features to be decoded. For enroute airways the key features are:

Enroute airways are composed of navaids and waypoints. The TLcdARINCEnrouteAirwayHandler class does not decode the navaids and waypoints necessary to construct the enroute airways. The waypoint and navaid models should be specified using the setWaypointModel method, the setDMEModel method, the setNDBModel method, the setVORModel method and the setTACANModel method.

See Also:
  • Constructor Details

    • TLcdARINCEnrouteAirwayHandler

      public TLcdARINCEnrouteAirwayHandler()
      Constructs a new TLcdARINCEnrouteAirwayHandler object.
  • Method Details

    • handleRecord

      public void handleRecord(char[] aRecord)
      Description copied from interface: ILcdARINCHandler
      Deals with one record of ARINC data.

      Each implementation of the ILcdARINCHandler interface decides by itself whether to use the information found in the given record to create or modify a domain object, or to do nothing at all.

      Typically, this method will be called when looping through the records of a data source.

      The domain objects created or modified when calling this method will be stored in a model. The user can obtain this model by calling the getModel method.

      Parameters:
      aRecord - the record to deal with created with data from the given record in
      See Also:
    • newModel

      public void newModel(String aSource, ILcdARINCErrorMessageSupport aErrorMessage)
      Description copied from interface: ILcdARINCHandler
      Resets the internal state of this handler so that it is ready to handle a new data source from scratch.

      The user should call this method before using this handler in a decoding process.

      Specified by:
      newModel in interface ILcdARINCHandler
      Parameters:
      aSource - the name of the source that will be handled
      aErrorMessage - for each irregular situation during the decoding, a report should be added to this object
    • getWaypointModel

      public ILcdModel getWaypointModel()
      Returns the waypoint model that is set on this handler.
      Returns:
      the waypoint model that is set on this handler.
      See Also:
    • setWaypointModel

      public void setWaypointModel(ILcdModel aWaypointModel)
      Specifies a model containing waypoints. These waypoints will be used to build the enroute airways.

      The supplied model must be an ILcdFeatureIndexedAnd2DBoundsIndexedModel. The model of waypoints must not be null when the decoding process is started.

      Parameters:
      aWaypointModel - a model containing waypoints.
      See Also:
    • getDMEModel

      public ILcdModel getDMEModel()
      Returns the DME model that is set on this handler.
      Returns:
      the DME model that is set on this handler.
      See Also:
    • setDMEModel

      public void setDMEModel(ILcdModel aDMEModel)
      Specifies a model containing DME objects. These DMEs be used to build the enroute airways.

      The supplied model must be an ILcdFeatureIndexedAnd2DBoundsIndexedModel. The model of DMEs must not be null when the decoding process is started.

      Parameters:
      aDMEModel - a model containing DME objects.
      See Also:
    • getTACANModel

      public ILcdModel getTACANModel()
      Returns the TACAN model that is set on this handler.
      Returns:
      the TACAN model that is set on this handler.
      See Also:
    • setTACANModel

      public void setTACANModel(ILcdModel aTACANModel)
      Specifies a model containing TACAN objects. These TACANs will be used to build the enroute airways.

      The supplied model must be an ILcdFeatureIndexedAnd2DBoundsIndexedModel. The model of TACANs must not be null when the decoding process is started.

      Parameters:
      aTACANModel - a model containing TACAN objects.
      See Also:
    • getVORModel

      public ILcdModel getVORModel()
      Returns the VOR model that is set on this handler.
      Returns:
      the VOR model that is set on this handler.
      See Also:
    • setVORModel

      public void setVORModel(ILcdModel aVORModel)
      Specifies a model containing VOR objects. These VORs will be used to build the enroute airways.

      The supplied model must be an ILcdFeatureIndexedAnd2DBoundsIndexedModel. The model of VORs must not be null when the decoding process is started.

      Parameters:
      aVORModel - a model containing VOR objects.
      See Also:
    • getNDBModel

      public ILcdModel getNDBModel()
      Returns the NDB model that is set on this handler.
      Returns:
      the NDB model that is set on this handler.
      See Also:
    • setNDBModel

      public void setNDBModel(ILcdModel aNDBModel)
      Specifies a model containing NDB objects. These NDBs will be used to build the enroute airways.

      The supplied model must be an ILcdFeatureIndexedAnd2DBoundsIndexedModel. The model of NDBs must not be null when the decoding process is started.

      Parameters:
      aNDBModel - a model containing NDB objects.
      See Also:
    • getAirwayFeatureNamesToBeDecoded

      public String[] getAirwayFeatureNamesToBeDecoded()
      Returns the features that will be stored in the airways created by this handler.
      Returns:
      the features to be stored in the airways created by this handler
      See Also:
    • setAirwayFeatureNamesToBeDecoded

      public void setAirwayFeatureNamesToBeDecoded(String[] aAirwayFeatureNamesToBeDecoded)
      Specifies which features should be stored in the airways created by this handler.
      Parameters:
      aAirwayFeatureNamesToBeDecoded - the features to be stored in the airways created by this handler. Feature names should be taken from the ILcdATSRouteFeature interface.
      See Also:
    • getAirwaySegmentFeatureNamesToBeDecoded

      public String[] getAirwaySegmentFeatureNamesToBeDecoded()
      Returns the features that will be stored in the airway segments created by this handler.
      Returns:
      the features to be stored in the airway segments created by this handler
      See Also:
    • setAirwaySegmentFeatureNamesToBeDecoded

      public void setAirwaySegmentFeatureNamesToBeDecoded(String[] aAirwaySegmentFeatureNamesToBeDecoded)
      Specifies which features should be stored in the airway segments created by this handler.
      Parameters:
      aAirwaySegmentFeatureNamesToBeDecoded - the features to be stored in the airway segments created by this handler. Feature names should be taken from the ILcdARINCATSRouteSegmentFeature interface.
      See Also:
    • setDomainFactory

      @Deprecated public void setDomainFactory(ALcdAISObjectFactory aDomainFactory)
      Deprecated.
      Description copied from interface: ILcdARINCHandler
      Specifies the domainFactory to be used to create domain objects.

      The given domainFactory must not be null.

      Specified by:
      setDomainFactory in interface ILcdARINCHandler
      Parameters:
      aDomainFactory - the domainFactory to be used to create domain objects
      See Also:
    • getDomainFactory

      @Deprecated public ALcdAISObjectFactory getDomainFactory()
      Deprecated.
      Description copied from interface: ILcdARINCHandler
      Returns the domainFactory to be used to create domain objects.
      Specified by:
      getDomainFactory in interface ILcdARINCHandler
      Returns:
      the domainFactory to be used to create domain objects
      See Also:
    • setDataObjectFactory

      public void setDataObjectFactory(TLcdAISDataObjectFactory aFactory)
      Description copied from interface: ILcdARINCHandler
      Specifies the factory to be used to create domain objects.

      The given factory must not be null.

      Specified by:
      setDataObjectFactory in interface ILcdARINCHandler
      Parameters:
      aFactory - the domainFactory to be used to create domain objects
      See Also:
    • getDataObjectFactory

      public TLcdAISDataObjectFactory getDataObjectFactory()
      Description copied from interface: ILcdARINCHandler
      Returns the factory to be used to create domain objects.
      Specified by:
      getDataObjectFactory in interface ILcdARINCHandler
      Returns:
      the factory to be used to create domain objects
      See Also:
    • setDefaultGeodeticDatum

      public void setDefaultGeodeticDatum(ILcdGeodeticDatum aDefaultGeodeticDatum)
      Sets the default geodetic datum code. This is used for records which do not mention an explicit geodetic datum.

      By default, this is WGS 84. Note that null can also be provided: in that case, records which do not mention a geodetic datum will be ignored.

      Parameters:
      aDefaultGeodeticDatum - The default geodetic datum.
    • getModel

      Description copied from interface: ILcdARINCHandler
      Returns the model build by this handler.

      Please remark that this handler is only capable of creating the expected model if the user calls

      • the newModel method to reset the internal state before he or she starts the decoding process,
      • the handleRecord method each time a new record in the data source is accessed.
      Specified by:
      getModel in interface ILcdARINCHandler
      Returns:
      the model build by this handler
    • setBoundsToFilterOn

      public void setBoundsToFilterOn(ILcdBounds aBoundsToFilterOn)
      Description copied from interface: ILcdARINCHandler
      Specifies (geodetic) bounds that will be used as a filter on the model created by this handler.

      If this bounds is null, all objects found in the data source will be inserted into the model. If this bounds is not null, only the objects whose bounds interact with the specified bounds will be inserted into the model.

      Specified by:
      setBoundsToFilterOn in interface ILcdARINCHandler
      Parameters:
      aBoundsToFilterOn - the bounds to be used as a filter
    • getBoundsToFilterOn

      public ILcdBounds getBoundsToFilterOn()
      Description copied from interface: ILcdARINCHandler
      Returns the (geodetic) bounds that will be used as a filter on the model created by this handler.
      Specified by:
      getBoundsToFilterOn in interface ILcdARINCHandler
      Returns:
      the bounds that will be used as a filter on the model created by this handler
      See Also:
    • setInitialBounds

      public void setInitialBounds(ILcdBounds aInitialBounds)
      Description copied from interface: ILcdARINCHandler
      Specifies a bounds to be used as initial bounds for the model created by this handler.

      This bounds should be large enough to enclose (most of) the model objects. This option is used to avoid to many expansions of the model bounds.

      This parameter may be null.

      Note: This bounds is not a filter! If a model objects bounds does not interact with aInitialBounds, aInitialBounds will be enlarged to enclose the object.

      Specified by:
      setInitialBounds in interface ILcdARINCHandler
      Parameters:
      aInitialBounds - the initial bounds for the model created by this handler
    • getInitialBounds

      public ILcdBounds getInitialBounds()
      Description copied from interface: ILcdARINCHandler
      Returns the bounds to be used as initial bounds for the model created by this handler.
      Specified by:
      getInitialBounds in interface ILcdARINCHandler
      Returns:
      bounds to be used as initial bounds for the model created by this handler
      See Also:
    • setARINCModelFilter

      public void setARINCModelFilter(ILcdARINCModelFilter aFilter)
      Description copied from interface: ILcdARINCHandler
      Specifies a filter to be used while creating the model. Only model objects that pass through the filter will be in the resulting model.
      Specified by:
      setARINCModelFilter in interface ILcdARINCHandler
      Parameters:
      aFilter - an ILcdARINCModelFilter to filter the model objects
    • isTraceOn

      public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • setClassTraceOn

      public static void setClassTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • setTraceOn

      public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      Parameters:
      aTraceOn - if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
    • readSectionCode

      protected char readSectionCode(char[] aRecord)
      Reads the section code of an ARINC record.
      Parameters:
      aRecord - the record to read of
      Returns:
      the section code of the record
    • read

      protected String read(char[] aRecord, int aStart, int aLength)
      Reads from aRecord from position aStart to aStart + aLength - 1, trims the resulting String object and returns it.
      Parameters:
      aRecord - the record to be read of
      aStart - the start position for reading
      aLength - the length of the String to be read
      Returns:
      a trimmed String object
    • getLocalHorizontalDatum

      protected ILcdGeodeticDatum getLocalHorizontalDatum(String aGeodeticDatumCode)
      Returns an instance of an implementation of the ILcdGeodeticDatum interface according to the given geodetic datum code. The datum code is expected to be specified by their three character representation, as it is used in the ARINC specification.

      The full list of supported geodetic datum codes can be found in the ARINC Developer's Guide.

      If the supplied code is null or empty, the default geodetic datum is returned. This is WGS 84 by default, but it can be configured through setDefaultGeodeticDatum. If no geodetic datum can be found, null is returned.

      Parameters:
      aGeodeticDatumCode - the code for the geodetic datum to be returned
      Returns:
      the geodetic datum according to the given code
    • setStoreOriginalReference

      public void setStoreOriginalReference(boolean aStoreRef)
      Description copied from interface: ILcdARINCHandler
      If true, the decoder will store the original geodetic datum of each domain object in a feature.
      Specified by:
      setStoreOriginalReference in interface ILcdARINCHandler
      Parameters:
      aStoreRef - specifies if the decoder must store the original geodetic datum of each domain object in a feature.
    • isStoreOriginalReference

      public boolean isStoreOriginalReference()
      Description copied from interface: ILcdARINCHandler
      If true, the decoder will store the original geodetic datum of each domain object in a feature.
      Specified by:
      isStoreOriginalReference in interface ILcdARINCHandler
      Returns:
      whether the decoder will store the original geodetic datum of each domain object in a feature.