Class TLcdARINCTACANHandler
- All Implemented Interfaces:
ILcdARINCHandler
ALcdARINCVHFNavaidHandler class deals
with TACAN records (VHF Navaid Primary Records, section code D subsection code T). Decoded models have
as model descriptor an instance of TLcdARINCTACANModelDescriptor.
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.TACAN,
which can also be retrieved through ILcdDataObject.getDataType().
The available properties of the objects are defined in TLcdARINCTACANDataProperties.
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 setTACANFeatureNamesToBeDecoded 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 or attribute the fields are decoded. It also indicates from which ARINC version on they are available.
- Version 15 :
- Customer/Area Code: ILcdARINCNavaidFeature.CUSTOMER_AREA_CODE
- ICAO Code: ILcdARINCNavaidFeature.ICAO_REGION
- VOR Identifier: ILcdARINCNavaidFeature.IDENTIFIER
- NAVAID Class: ILcdARINCNavaidFeature.NAVAID_CLASS
- VOR Name: ILcdARINCNavaidFeature.NAME
- Airport ICAO Identifier: ILcdARINCNavaidFeature.AERODROME_ID
- Figure of Merit: ILcdARINCTACANFeature.FIGURE_OF_MERIT
- Frequency Protection: ILcdARINCTACANFeature.FREQUENCY_PROTECTION
- VOR Frequency: ILcdARINCTACANFeature.FREQUENCY, ILcdARINCTACANFeature.FREQUENCY_UNIT
- Station Declination: ILcdARINCTACANFeature.STATION_DECLINATION, ILcdARINCTACANFeature.STATION_DECLINATION_TYPE
- TACAN Class: ILcdARINCTACANFeature.TACAN_CLASS
- Cycle Date: ILcdARINCNavaidFeature.CYCLE_DATE
- Version 17 : no extra fields added.
- Version 18 :
- FIR Identifier: ILcdARINCNavaidFeature.FIR_IDENTIFIER
- UIR Identifier: ILcdARINCNavaidFeature.UIR_IDENTIFIER
- Facility Elevation: ILcdARINCNavaidFeature.FACILITY_ELEVATION, ILcdARINCNavaidFeature.FACILITY_ELEVATION_UNIT
- Facility Characteristics: ILcdARINCNavaidFeature.FACILITY_CHARACTERISTICS
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 TACANs the key features are:
- See Also:
-
Constructor Summary
Constructors -
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 ILcdGeodeticDatumgetLocalHorizontalDatum(String aGeodeticDatumCode) Returns an instance of an implementation of theILcdGeodeticDatuminterface 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 domain objects created by this handler.voidhandleRecord(char[] aRecord) Deals with one record of ARINC data.booleanIf true, the decoder will store the original geodetic datum of each domain object in a feature.booleanDeprecated.This method has been deprecated.voidnewModel(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 Stringread(char[] aRecord, int aStart, int aLength) Reads from aRecord from position aStart to aStart + aLength - 1, trims the resultingStringobject and returns it.protected StringreadDatumCode(char[] aRecord) Reads the geodetic datum code.protected StringreadDMEIdentifier(char[] aRecord) Reads the identifier used for DME and TACAN components that have an identifier different from the VOR identifier in a VOR-DME or VORTAC combination or, the identifier of TACAN and DME only navaids.protected ObjectreadFeature(String aFeatureName, char[] aRecord) Returns the value found in a record for the feature called aFeatureName.protected TLcdFigureOfMeritreadFigureOfMerit(char[] aRecord) Reads the figure of Merit (which defines the usable ranges beyond that specified in the Class field).protected FloatreadFrequency(char[] aRecord) Returns the frequency read from the specified record.protected StringreadFrequencyProtection(char[] aRecord) Returns the frequency protection read from the specified record.protected StringreadIdentifier(char[] aRecord) Reads the identifier of the navaid.protected charreadSectionCode(char[] aRecord) Reads the section code of an ARINC record.protected charreadSubsectionCode(char[] aRecord) Reads the sub section code.protected StringreadVORIdentifier(char[] aRecord) The VOR identifier.voidsetARINCModelFilter(ILcdARINCModelFilter aFilter) Specifies a filter to be used while creating the model.voidsetBoundsToFilterOn(ILcdBounds aBoundsToFilterOn) Specifies (geodetic) bounds that will be used as a filter on the model created by this handler.static voidsetClassTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.voidsetDataObjectFactory(TLcdAISDataObjectFactory aFactory) Specifies the factory to be used to create domain objects.voidsetDefaultGeodeticDatum(ILcdGeodeticDatum aDefaultGeodeticDatum) Sets the default geodetic datum code.voidsetDomainFactory(ALcdAISObjectFactory aDomainFactory) Deprecated.voidsetInitialBounds(ILcdBounds aInitialBounds) Specifies a bounds to be used as initial bounds for the model created by this handler.voidsetStoreOriginalReference(boolean aStoreRef) If true, the decoder will store the original geodetic datum of each domain object in a feature.voidsetTACANFeatureNamesToBeDecoded(String[] aTACANFeatureNamesToBeDecoded) Specifies which features should be stored in the domain objects created by this handler.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdARINCTACANHandler
public TLcdARINCTACANHandler()Constructs a newTLcdARINCTACANHandlerobject.
-
-
Method Details
-
handleRecord
public void handleRecord(char[] aRecord) Description copied from interface:ILcdARINCHandlerDeals with one record of ARINC data.Each implementation of the
ILcdARINCHandlerinterface 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
getModelmethod.- Parameters:
aRecord- the record to deal with created with data from the given record in- See Also:
-
readIdentifier
Reads the identifier of the navaid.The implementing class should decide whether it will use the readVORIndentifier or the readDMEIdentifier method.
This choice will depend on the type of navaid the implementing class is handling. The decision cannot be made here.
- Parameters:
aRecord- the record to read from- Returns:
- the identifier of the navaid, either the VOR identifier or the DME identifier
-
readFeature
Returns the value found in a record for the feature called aFeatureName.- Parameters:
aFeatureName- the name of the feature to be readaRecord- the record where to find the feature value- Returns:
- the value found in a record for the feature called aFeatureName
-
getTACANFeatureNamesToBeDecoded
Returns the features that will be stored in the domain objects created by this handler.- Returns:
- an array containing the names of the features to be stored in the domain objects created by this handler
- See Also:
-
setTACANFeatureNamesToBeDecoded
Specifies which features should be stored in the domain objects created by this handler.- Parameters:
aTACANFeatureNamesToBeDecoded- an array containing the names of the features to be stored in the domain objects created by this handler. Feature names should be taken from theILcdARINCTACANFeatureinterface.- See Also:
-
readSubsectionCode
protected char readSubsectionCode(char[] aRecord) Reads the sub section code.- Parameters:
aRecord- the record to read from- Returns:
- the subsection code
-
readDatumCode
Reads the geodetic datum code.- Parameters:
aRecord- the record to read from- Returns:
- the geodetic datum code
-
readVORIdentifier
The VOR identifier.- Parameters:
aRecord- the record to read from- Returns:
- the VOR identifier
-
readDMEIdentifier
Reads the identifier used for DME and TACAN components that have an identifier different from the VOR identifier in a VOR-DME or VORTAC combination or, the identifier of TACAN and DME only navaids.- Parameters:
aRecord- the record to read from.- Returns:
- the identifier used for DME and TACAN components that have an identifier different from the VOR identifier in a VOR-DME or VORTAC combination or, the identifier of TACAN and DME only navaids
-
readFrequencyProtection
Returns the frequency protection read from the specified record.- Parameters:
aRecord- the record to read from.- Returns:
- the frequency protection read from the specified record.
-
readFrequency
Returns the frequency read from the specified record. VHF navaid frequencies contain characters for hundreds, tens, units, tenths and hundredths of megahertz.- Parameters:
aRecord- the record to read from.- Returns:
- the frequency read from the specified record.
-
readFigureOfMerit
Reads the figure of Merit (which defines the usable ranges beyond that specified in the Class field).- Parameters:
aRecord- the record to read from.- Returns:
- the figure of Merit read from the specified record.
-
setDomainFactory
Deprecated.Description copied from interface:ILcdARINCHandlerSpecifies the domainFactory to be used to create domain objects.The given domainFactory must not be null.
- Specified by:
setDomainFactoryin interfaceILcdARINCHandler- Parameters:
aDomainFactory- the domainFactory to be used to create domain objects- See Also:
-
getDomainFactory
Deprecated.Description copied from interface:ILcdARINCHandlerReturns the domainFactory to be used to create domain objects.- Specified by:
getDomainFactoryin interfaceILcdARINCHandler- Returns:
- the domainFactory to be used to create domain objects
- See Also:
-
setDataObjectFactory
Description copied from interface:ILcdARINCHandlerSpecifies the factory to be used to create domain objects.The given factory must not be null.
- Specified by:
setDataObjectFactoryin interfaceILcdARINCHandler- Parameters:
aFactory- the domainFactory to be used to create domain objects- See Also:
-
getDataObjectFactory
Description copied from interface:ILcdARINCHandlerReturns the factory to be used to create domain objects.- Specified by:
getDataObjectFactoryin 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 thatnullcan 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:ILcdARINCHandlerReturns the model build by this handler.Please remark that this handler is only capable of creating the expected model if the user calls
- the
newModelmethod to reset the internal state before he or she starts the decoding process, - the
handleRecordmethod each time a new record in the data source is accessed.
- Specified by:
getModelin interfaceILcdARINCHandler- Returns:
- the model build by this handler
- the
-
setBoundsToFilterOn
Description copied from interface:ILcdARINCHandlerSpecifies (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:
setBoundsToFilterOnin interfaceILcdARINCHandler- Parameters:
aBoundsToFilterOn- the bounds to be used as a filter
-
getBoundsToFilterOn
Description copied from interface:ILcdARINCHandlerReturns the (geodetic) bounds that will be used as a filter on the model created by this handler.- Specified by:
getBoundsToFilterOnin 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:ILcdARINCHandlerSpecifies 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:
setInitialBoundsin interfaceILcdARINCHandler- Parameters:
aInitialBounds- the initial bounds for the model created by this handler
-
getInitialBounds
Description copied from interface:ILcdARINCHandlerReturns the bounds to be used as initial bounds for the model created by this handler.- Specified by:
getInitialBoundsin interfaceILcdARINCHandler- Returns:
- bounds to be used as initial bounds for the model created by this handler
- See Also:
-
newModel
Description copied from interface:ILcdARINCHandlerResets 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:
newModelin 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
-
setARINCModelFilter
Description copied from interface:ILcdARINCHandlerSpecifies 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:
setARINCModelFilterin interfaceILcdARINCHandler- Parameters:
aFilter- anILcdARINCModelFilterto 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.Returnstrueif 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 istruethen 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 eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen 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 resultingStringobject and returns it.- Parameters:
aRecord- the record to be read ofaStart- the start position for readingaLength- the length of theStringto be read- Returns:
- a trimmed
Stringobject
-
getLocalHorizontalDatum
Returns an instance of an implementation of theILcdGeodeticDatuminterface 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,nullis 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:ILcdARINCHandlerIf true, the decoder will store the original geodetic datum of each domain object in a feature.- Specified by:
setStoreOriginalReferencein 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:ILcdARINCHandlerIf true, the decoder will store the original geodetic datum of each domain object in a feature.- Specified by:
isStoreOriginalReferencein interfaceILcdARINCHandler- Returns:
- whether the decoder will store the original geodetic datum of each domain object in a feature.
-