Class TLcdARINCProcedureHandler
- All Implemented Interfaces:
ILcdARINCHandler
ALcdARINCHandler
interface deals
with airport SID, STAR, Approach (IAP) procedures (Airport SID/STAR/Approach Records, section and subsection codes PD, PE and PF).
Decoded models have as model descriptor an instance of TLcdARINCProcedureTrajectoryModelDescriptor
.
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.Procedure
,
which can also be retrieved through ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdARINCProcedureDataProperties
.
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 setProcedureFeatureNamesToBeDecoded
method
allows 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 :
- Section and Subsection Code (PD, PE and PF): ILcdARINCProcedureFeature.TYPE
- SID/STAR/Approach Identifier: ILcdProcedureFeature.DESIGNATOR
- Airport Identifier: ILcdARINCProcedureFeature.AERODROME_IDENTIFIER
- Cycle Date: ILcdARINCProcedureFeature.CYCLE_DATE
- Version 17 : no extra fields added.
- Version 18 :
- Transition Identifier: ILcdARINCProcedureFeature.TRANSITION_IDENTIFIER
- Route Type: ILcdARINCProcedureFeature.SUB_TYPE
- Route Type Qualifier 1: ILcdARINCProcedureFeature.SUB_TYPE_QUALIFIER1
- Route Type Qualifier 2: ILcdARINCProcedureFeature.SUB_TYPE_QUALIFIER2
- GNSS/FMS Identifier: ILcdARINCProcedureFeature.GNSS_FMS_INDICATOR
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 procedures the key features are:
Procedures are based on a fix and on other significant points, which may be a navaid, a localizer / glide slope,
a marker, a waypoint, a runway or an airport.
The TLcdARINCProcedureHandler
class does not decode the model objects necessary
to construct the procedures. The models should be specified using the setAirportModel
method,
the setWaypointModel
method, the setNDBModel
method,
the setDMEModel
method, the setVORModel
method,
the setTACANModel
method, the setRunwayModel
method,
the setLocalizerGlideSlopeModel
method and
the setMarkerModel
.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
A constant to set the preferred departure position to the end of the runway.static final int
A constant to set the preferred departure position to the start of the runway. -
Constructor Summary
ConstructorDescriptionConstructs a newTLcdARINCProcedureHandler
object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the (geodetic) bounds that will be used as a filter on the model created by this handler.Returns the factory to be used to create domain objects.Deprecated.Returns the bounds to be used as initial bounds for the model created by this handler.protected ILcdGeodeticDatum
getLocalHorizontalDatum
(String aGeodeticDatumCode) Returns an instance of an implementation of theILcdGeodeticDatum
interface according to the given geodetic datum code.getModel()
Returns the model build by this handler.String[]
Returns the features that will be stored in the procedures created by this handler.void
handleRecord
(char[] aRecord) Deals with one record of ARINC data.boolean
If true, the decoder will store the original geodetic datum of each domain object in a feature.boolean
Deprecated.This method has been deprecated.void
newModel
(String aSource, ILcdARINCErrorMessageSupport aErrorMessage) Resets the internal state of this handler so that it is ready to handle a new data source from scratch.protected String
read
(char[] aRecord, int aStart, int aLength) Reads from aRecord from position aStart to aStart + aLength - 1, trims the resultingString
object and returns it.protected char
readSectionCode
(char[] aRecord) Reads the section code of an ARINC record.void
setAirportModel
(ILcdModel aAirportModel) Specifies a model containing aerodrome objects.void
setARINCModelFilter
(ILcdARINCModelFilter aFilter) Specifies a filter to be used while creating the model.void
setBoundsToFilterOn
(ILcdBounds aBoundsToFilterOn) Specifies (geodetic) bounds that will be used as a filter on the model created by this handler.static void
setClassTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.void
setDataObjectFactory
(TLcdAISDataObjectFactory aFactory) Specifies the factory to be used to create domain objects.void
setDefaultGeodeticDatum
(ILcdGeodeticDatum aDefaultGeodeticDatum) Sets the default geodetic datum code.void
setDMEModel
(ILcdModel aDMEModel) Specifies a model containing DME objects.void
setDomainFactory
(ALcdAISObjectFactory aDomainFactory) Deprecated.void
setInitialBounds
(ILcdBounds aInitialBounds) Specifies a bounds to be used as initial bounds for the model created by this handler.void
setLocalizerGlideSlopeModel
(ILcdModel aLocalizerGlideSlopeModel) Specifies a model containing Localizer/Glide slope objects.void
setMarkerModel
(ILcdModel aMarkerModel) Specifies a model containing Marker objects.void
setNDBModel
(ILcdModel aNDBModel) Specifies a model containing NDB objects.void
setPreferredDeparturePosition
(int aPreferredDeparturePosition) Sets the preferred departure position which should be used by SID procedures.void
setProcedureFeatureNamesToBeDecoded
(String[] aProcedureFeatureNamesToBeDecoded) Specifies which features should be stored in the procedures created by this handler.void
setRunwayModel
(ILcdModel aRunwayModel) Specifies a model containing runway objects.void
setStoreOriginalReference
(boolean aStoreRef) If true, the decoder will store the original geodetic datum of each domain object in a feature.void
setTACANModel
(ILcdModel aTACANModel) Specifies a model containing TACAN objects.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.void
setVORModel
(ILcdModel aVORModel) Specifies a model containing VOR objects.void
setWaypointModel
(ILcdModel aWaypointModel) Specifies a model containing waypoints.
-
Field Details
-
RUNWAY_START
public static final int RUNWAY_STARTA constant to set the preferred departure position to the start of the runway.- See Also:
-
RUNWAY_END
public static final int RUNWAY_ENDA constant to set the preferred departure position to the end of the runway.- See Also:
-
-
Constructor Details
-
TLcdARINCProcedureHandler
public TLcdARINCProcedureHandler()Constructs a newTLcdARINCProcedureHandler
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
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 interfaceILcdARINCHandler
- Parameters:
aSource
- the name of the source that will be handledaErrorMessage
- for each irregular situation during the decoding, a report should be added to this object
-
setAirportModel
Specifies a model containing aerodrome objects. These aerodromes will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of aerodromes must not be null when the decoding process is started.- Parameters:
aAirportModel
- a model containing aerodromes.
-
setRunwayModel
Specifies a model containing runway objects. These runways will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of runways must not be null when the decoding process is started.- Parameters:
aRunwayModel
- a model containing runways.
-
setWaypointModel
Specifies a model containing waypoints. These waypoints will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of waypoints must not be null when the decoding process is started.- Parameters:
aWaypointModel
- a model containing waypoints.
-
setLocalizerGlideSlopeModel
Specifies a model containing Localizer/Glide slope objects. These Localizer/Glide slopes will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of Localizer/Glide slopes must not be null when the decoding process is started.- Parameters:
aLocalizerGlideSlopeModel
- a model containing Localizer/Glide slope objects.
-
setMarkerModel
Specifies a model containing Marker objects. These Markers will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of Markers must not be null when the decoding process is started.- Parameters:
aMarkerModel
- a model containing Marker objects.
-
setDMEModel
Specifies a model containing DME objects. These DMEs be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of DMEs must not be null when the decoding process is started.- Parameters:
aDMEModel
- a model containing DME objects.
-
setTACANModel
Specifies a model containing TACAN objects. These TACANs will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of TACANs must not be null when the decoding process is started.- Parameters:
aTACANModel
- a model containing TACAN objects.
-
setVORModel
Specifies a model containing VOR objects. These VORs will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of VORs must not be null when the decoding process is started.- Parameters:
aVORModel
- a model containing VOR objects.
-
setNDBModel
Specifies a model containing NDB objects. These NDBs will be used to build the procedures. The supplied model must be anILcdFeatureIndexedAnd2DBoundsIndexedModel
. The model of NDBs must not be null when the decoding process is started.- Parameters:
aNDBModel
- a model containing NDB objects.
-
getProcedureFeatureNamesToBeDecoded
Returns the features that will be stored in the procedures created by this handler.- Returns:
- an array containing the names of the features to be stored in the procedures created by this handler
- See Also:
-
setProcedureFeatureNamesToBeDecoded
Specifies which features should be stored in the procedures created by this handler.- Parameters:
aProcedureFeatureNamesToBeDecoded
- an array containing the names of the features to be stored in the procedures created by this handler. Feature names should be taken from theILcdARINCProcedureFeature
interface.- See Also:
-
setPreferredDeparturePosition
public void setPreferredDeparturePosition(int aPreferredDeparturePosition) Sets the preferred departure position which should be used by SID procedures. The departure position influences the visualization of procedures in certain cases. By default this is set toRUNWAY_END
. The decoder will try to set the procedure start to this position if it is available, and if the procedure does not specify its own start point. Possible values are:RUNWAY_START
- Start the procedure at the beginning of the runway.RUNWAY_END
- Start the procedure at the end of the runway.
- Parameters:
aPreferredDeparturePosition
- The preferred departure position. Valid values are the constants listed above.
-
setDomainFactory
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 interfaceILcdARINCHandler
- Parameters:
aDomainFactory
- the domainFactory to be used to create domain objects- See Also:
-
getDomainFactory
Deprecated.Description copied from interface:ILcdARINCHandler
Returns the domainFactory to be used to create domain objects.- Specified by:
getDomainFactory
in interfaceILcdARINCHandler
- Returns:
- the domainFactory to be used to create domain objects
- See Also:
-
setDataObjectFactory
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 interfaceILcdARINCHandler
- Parameters:
aFactory
- the domainFactory to be used to create domain objects- See Also:
-
getDataObjectFactory
Description copied from interface:ILcdARINCHandler
Returns the factory to be used to create domain objects.- Specified by:
getDataObjectFactory
in interfaceILcdARINCHandler
- Returns:
- the factory to be used to create domain objects
- See Also:
-
setDefaultGeodeticDatum
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 thatnull
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 interfaceILcdARINCHandler
- Returns:
- the model build by this handler
- the
-
setBoundsToFilterOn
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 interfaceILcdARINCHandler
- Parameters:
aBoundsToFilterOn
- the bounds to be used as a filter
-
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 interfaceILcdARINCHandler
- Returns:
- the bounds that will be used as a filter on the model created by this handler
- See Also:
-
setInitialBounds
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 interfaceILcdARINCHandler
- Parameters:
aInitialBounds
- the initial bounds for the model created by this handler
-
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 interfaceILcdARINCHandler
- Returns:
- bounds to be used as initial bounds for the model created by this handler
- See Also:
-
setARINCModelFilter
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 interfaceILcdARINCHandler
- Parameters:
aFilter
- anILcdARINCModelFilter
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.Returnstrue
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 istrue
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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
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
Reads from aRecord from position aStart to aStart + aLength - 1, trims the resultingString
object and returns it.- Parameters:
aRecord
- the record to be read ofaStart
- the start position for readingaLength
- the length of theString
to be read- Returns:
- a trimmed
String
object
-
getLocalHorizontalDatum
Returns an instance of an implementation of theILcdGeodeticDatum
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 throughsetDefaultGeodeticDatum
. 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 interfaceILcdARINCHandler
- 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 interfaceILcdARINCHandler
- Returns:
- whether the decoder will store the original geodetic datum of each domain object in a feature.
-