Package com.luciad.util
Class TLcdAltitudeUnit
java.lang.Object
com.luciad.util.TLcdAltitudeUnit
- All Implemented Interfaces:
ILcdISO19103UnitOfMeasure
,Serializable
This class defines altitude unit constants. The standard unit
is 'meter'.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TLcdAltitudeUnit
Altitude unit for feet.static final TLcdAltitudeUnit
Deprecated.static final TLcdAltitudeUnit
Altitude unit for flight levels.static final TLcdAltitudeUnit
Altitude unit for kilometers.static final TLcdAltitudeUnit
Deprecated.This constant is an alias forKM
.static final TLcdAltitudeUnit
Altitude unit for meters.static final TLcdAltitudeUnit
Deprecated.This constant is an alias forMETRE
. -
Constructor Summary
ConstructorDescriptionTLcdAltitudeUnit
(String aUnitName, String aUnitShortName, double aToMetreFactor) Constructs a new altitude unit. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAltitudeUnit
(TLcdAltitudeUnit aAltitudeUnit) Adds the specified altitude unit to the set of altitude units which are registered for this JVM session.double
convertFromAltitudeAMSL
(double aAltitude, double aWGS84Lon, double aWGS84Lat) Converts an altitude expressed in meters above mean sea level to this altitudes unit.double
convertFromStandard
(double aValue) Converts from meters AMSL.double
convertToAltitudeAMSL
(double aAltitude, double aWGS84Lon, double aWGS84Lat) Converts an altitude expressed in this altitudes unit to meters above mean sea level.double
convertToStandard
(double aValue) Converts to meters AMSL.boolean
static TLcdAltitudeUnit[]
Returns the available altitude units to consider in a JVM session.The type of measure this unit of measure is used for.Returns the name of the standard unit for this type of measure, which is unit name ofMETRE_AMSL
.double
Deprecated.useconvertToAltitudeAMSL(double, double, double)
to convert the altitude expressed in this unit to meters AMSL.Returns the name of thisTLcdAltitudeUnit
(e.g. Meter, Kilometer, Mile, etc ...).Returns the short name of thisTLcdAltitudeUnit
(e.g. m, Km, Mi, etc ...).The name of the unit of measureThe symbol used for the unit of measureint
hashCode()
static void
removeAltitudeUnit
(TLcdAltitudeUnit aAltitudeUnit) Removes the specified altitude unit from the set of altitude units which are registered for this JVM session.static void
setAllAltitudeUnits
(TLcdAltitudeUnit[] aAllAltitudeUnitArray) Sets statically allTLcdAltitudeUnit
to consider in a JVM session.toString()
Returns the unit name.
-
Field Details
-
METRE
Altitude unit for meters. This constant is an alias forTLcdUnitOfMeasureFactory.ALTITUDE_METRE
. -
KM
Altitude unit for kilometers. This constant is an alias forTLcdUnitOfMeasureFactory.ALTITUDE_KILOMETRE
. -
FEET
Altitude unit for feet. This constant is an alias forTLcdUnitOfMeasureFactory.ALTITUDE_FEET
. -
METRE_AMSL
Deprecated.This constant is an alias forMETRE
. It has been renamed because the "AMSL" qualifier is inappropriate here.Altitude unit for meters. -
KM_AMSL
Deprecated.This constant is an alias forKM
. It has been renamed because the "AMSL" qualifier is inappropriate here.Altitude unit for kilometers. -
FEET_AMSL
Deprecated.This constant is an alias forFEET
. It has been renamed because the "AMSL" qualifier is inappropriate here.Altitude unit for feet. -
FLIGHT_LEVEL
Altitude unit for flight levels. This constant is an alias forTLcdUnitOfMeasureFactory.ALTITUDE_FLIGHT_LEVEL
.
-
-
Constructor Details
-
TLcdAltitudeUnit
Constructs a new altitude unit.- Parameters:
aUnitName
- The name of the unit.aUnitShortName
- The short name of the unit, typically used as the suffix after a number.aToMetreFactor
- The factor to convert a value expressed in this unit to metres. For example, if the unit is km, the factor is 1000.
-
-
Method Details
-
getUnitName
Returns the name of thisTLcdAltitudeUnit
(e.g. Meter, Kilometer, Mile, etc ...).- Returns:
- the name of this
TLcdAltitudeUnit
(e.g. Meter, Kilometer, Mile, etc ...)
-
getUnitShortName
Returns the short name of thisTLcdAltitudeUnit
(e.g. m, Km, Mi, etc ...).- Returns:
- the short name of this
TLcdAltitudeUnit
(e.g. m, Km, Mi, etc ...).
-
getToMetreFactor
public double getToMetreFactor()Deprecated.useconvertToAltitudeAMSL(double, double, double)
to convert the altitude expressed in this unit to meters AMSL.Returns the factor to apply to convert a altitude expressed in that specific unit into a altitude in meters.- Returns:
- the factor to apply to convert a altitude expressed in that specific unit into a altitude in meters.
-
convertToAltitudeAMSL
public double convertToAltitudeAMSL(double aAltitude, double aWGS84Lon, double aWGS84Lat) Converts an altitude expressed in this altitudes unit to meters above mean sea level.- Parameters:
aAltitude
- an altitude expressed in this altitudes unit.aWGS84Lon
- the location above which the altitude is converted expressed in WGS84 longitude.aWGS84Lat
- the location above which the altitude is converted expressed in WGS84 latitude.- Returns:
- the altitude above mean sea level at this location expressed in meters.
-
convertFromAltitudeAMSL
public double convertFromAltitudeAMSL(double aAltitude, double aWGS84Lon, double aWGS84Lat) Converts an altitude expressed in meters above mean sea level to this altitudes unit.- Parameters:
aAltitude
- an altitude expressed in meters above mean sea level.aWGS84Lon
- the location above which the altitude is converted expressed in WGS84 longitude.aWGS84Lat
- the location above which the altitude is converted expressed in WGS84 latitude.- Returns:
- the altitude at this location expressed in this altitudes unit.
-
toString
Returns the unit name. -
getUOMName
Description copied from interface:ILcdISO19103UnitOfMeasure
The name of the unit of measure- Specified by:
getUOMName
in interfaceILcdISO19103UnitOfMeasure
- Returns:
- the name of the unit of measure
-
getUOMSymbol
Description copied from interface:ILcdISO19103UnitOfMeasure
The symbol used for the unit of measure- Specified by:
getUOMSymbol
in interfaceILcdISO19103UnitOfMeasure
- Returns:
- the symbol used for the unit of measure
-
getMeasureType
Description copied from interface:ILcdISO19103UnitOfMeasure
The type of measure this unit of measure is used for.- Specified by:
getMeasureType
in interfaceILcdISO19103UnitOfMeasure
- Returns:
- the type of measure this unit of measure is used for.
-
getNameOfStandardUnit
Returns the name of the standard unit for this type of measure, which is unit name ofMETRE_AMSL
.- Specified by:
getNameOfStandardUnit
in interfaceILcdISO19103UnitOfMeasure
- Returns:
- the name of
METRE_AMSL
.
-
convertToStandard
public double convertToStandard(double aValue) Converts to meters AMSL.- Specified by:
convertToStandard
in interfaceILcdISO19103UnitOfMeasure
- Parameters:
aValue
- the value expressed in this unit of measure.- Returns:
- the value expressed in this unit converted to meters AMSL.
-
convertFromStandard
public double convertFromStandard(double aValue) Converts from meters AMSL.- Specified by:
convertFromStandard
in interfaceILcdISO19103UnitOfMeasure
- Parameters:
aValue
- the value expressed in meters AMSL- Returns:
- the same altitude expressed in this unit.
-
getAllAltitudeUnits
Returns the available altitude units to consider in a JVM session.- Returns:
- the available altitude units to consider in a JVM session.
- See Also:
-
setAllAltitudeUnits
Sets statically allTLcdAltitudeUnit
to consider in a JVM session. Typically, this method should be called in the main of the application.- Parameters:
aAllAltitudeUnitArray
- the altitude units to consider in a JVM session- See Also:
-
addAltitudeUnit
Adds the specified altitude unit to the set of altitude units which are registered for this JVM session.- Parameters:
aAltitudeUnit
- a altitude unit to be registered for this JVM session.- Throws:
IllegalArgumentException
- If an altitude unit with the same symbol was already registered before.
-
removeAltitudeUnit
Removes the specified altitude unit from the set of altitude units which are registered for this JVM session.- Parameters:
aAltitudeUnit
- an altitude unit to be removed for this JVM session.- Throws:
IllegalArgumentException
- If the specified altitude unit is not contained in the list of registered altitude units.
-
equals
-
hashCode
public int hashCode()
-
FEET
.