|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.units.AMeasure
faa.tg.units.Distance
faa.tg.units.Altitude
public class Altitude
Altitude represents the object for measuring units of Altitude:
generally the distance above Mean Sea Level (MSL).
See section 5.6 of the Detailed Design Document for a discussion
of design issues.
See the source: Altitude.java
Units.m,
AUnits,
AMeasure,
Serialized Form| Field Summary | |
|---|---|
static Altitude |
ALT_TOLERANCE
Fifty feet for almost equal aeq(). |
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
static Altitude |
FT_1
|
static Altitude |
FT_10
|
static Altitude |
FT_100
|
static Altitude |
FT_1000
|
static Altitude |
FT_10000
|
static Altitude |
FT_1500
|
static Altitude |
FT_200
|
static Altitude |
FT_2000
|
static Altitude |
FT_24000
|
static Altitude |
FT_250
|
static Altitude |
FT_3000
|
static Altitude |
FT_400
|
static Altitude |
FT_450
|
static Altitude |
FT_50
|
static Altitude |
FT_500
|
static Altitude |
FT_50000
|
static Altitude |
FT_65000
|
static Altitude |
FT_800
|
static Altitude |
FT_8000
|
static Altitude |
KM_11
|
static Altitude |
KM_20
|
static Altitude |
MAX_ALT
Maximum altitude currently defined in our atmospheric models. |
static Altitude |
MIN_ALT
|
static Altitude |
ONE_THOUSAND_FT
|
(package private) static long |
serialVersionUID
|
static Altitude |
TEN_THOUSAND_FT
|
static Altitude |
ZERO
Zero altitude. |
| Fields inherited from class faa.tg.units.Distance |
|---|
FIVE_NM, FT_5, NM_1, NM_10, NM_100, NM_1000, NM_20, NM_3, NM_4, NM_5, NM_50, NM_HALF, ONE_FT |
| Fields inherited from class faa.tg.units.AMeasure |
|---|
DEC0, DEC0_, DEC00, DEC000, DEC1, DEC1_, DEC12, DEC12_, DEC1L, DEC1L_, DEC2, DEC2_, DEC3, DEC3_, DEC4, DEC4_, DEC5, DEC5_, DEC6, DEC6_, DEC7, DEC7_, DEC9, DEC9_, itsValue, TIME_FRACTION |
| Constructor Summary | |
|---|---|
Altitude(Altitude origAlt,
AltitudeRate rate,
Time timeToTravel)
Constructor for the Altitude class that uses a reference altitude, a altitude rate and a time interval to travel at the specified rate. |
|
Altitude(double value,
DistanceUnits units)
Constructor for the Altitude class. |
|
Altitude(java.lang.String str)
This contructor parses a string with an altitude in flight level units (hundreds of feet: flight level 55 equals 5500 feet of altitude). |
|
| Method Summary | |
|---|---|
Altitude |
add(Altitude theMeasure)
This summation method adds a value with like units. |
boolean |
aeq(Altitude theAltitude)
Almost equal defaults to within the ALT_TOLERANCE (50 ft). |
boolean |
aeq(Altitude altitude,
Altitude acceptableMargin)
Return whether the specified value is almost equal to this value (is within the acceptable margin). |
int |
asFL()
This method returns the flight level (FL) value as an integer, which is the altitude unit and precision used by the Mode C altitude report. |
boolean |
eq(Altitude theMeasure)
This method provides a test for equality. |
boolean |
ge(Altitude theMeasure)
This method provides a test for greater than / equal to. |
boolean |
gt(Altitude theMeasure)
This method provides a test for greater than. |
boolean |
le(Altitude theMeasure)
This method provides a test for less than / equal to. |
boolean |
lt(Altitude theMeasure)
This method provides a test for less than. |
static Altitude |
parseAlt(java.lang.String alt)
Parses a String containing a number and a unit name to create an Altitude: if a unit field is not successfully parsed from the text, then the unit of the numeric value is assumed to be a flight level. |
static Altitude |
parseAltitude(java.lang.String alt)
Parses a String containing a number and a unit name to create an Altitude: if a unit field is not successfully parsed from the text, then the unit of the numeric value is assumed to be in feet. |
Altitude |
sub(Altitude theMeasure)
This subtraction method subtracts a value with like units. |
static Altitude |
toAltitude(org.w3c.dom.Element altElem)
Creates an Altitude from an XML element containing AttributeNodes for an altitude's value and units. |
java.lang.String |
toDraText()
|
java.lang.String |
toFL()
Returns the flight level (FL) value as a three character String. |
java.lang.String |
toString()
This method returns the String representation of this object in the units with which it was constructed. |
| Methods inherited from class faa.tg.units.Distance |
|---|
abs, add, as, eq, ge, gt, le, lt, main, parseDistance, ratio, sub |
| Methods inherited from class faa.tg.units.AMeasure |
|---|
absoluteValue, add, as, as, clone, compareTo, debug, div, eq, equals, ge, getAUnit, getCanonicalUnit, getCanonicalValue, getInitialUnit, getUnitClass, gt, hashCode, isBetween, le, lt, mul, ratio, sub, toAMeasure, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
public static final Altitude ZERO
public static final Altitude MIN_ALT
public static final Altitude ONE_THOUSAND_FT
public static final Altitude TEN_THOUSAND_FT
public static final Altitude FT_1
public static final Altitude FT_10
public static final Altitude FT_50
public static final Altitude FT_100
public static final Altitude FT_200
public static final Altitude FT_250
public static final Altitude FT_400
public static final Altitude FT_450
public static final Altitude FT_500
public static final Altitude FT_800
public static final Altitude FT_1000
public static final Altitude FT_1500
public static final Altitude FT_2000
public static final Altitude FT_3000
public static final Altitude FT_8000
public static final Altitude FT_10000
public static final Altitude FT_24000
public static final Altitude FT_50000
public static final Altitude FT_65000
public static final Altitude KM_11
public static final Altitude KM_20
public static final Altitude MAX_ALT
public static Altitude ALT_TOLERANCE
| Constructor Detail |
|---|
public Altitude(double value,
DistanceUnits units)
value - The magnitude of the Altitude as a double.units - Units of the value to be stored (ex: km).
public Altitude(java.lang.String str)
throws java.lang.NumberFormatException
str - The String to make into a valid altitude.
java.lang.NumberFormatException
public Altitude(Altitude origAlt,
AltitudeRate rate,
Time timeToTravel)
origAlt - The reference altitude to travel from.rate - The rate of change of the altitude.timeToTravel - The time interval to travel at the specified rate.| Method Detail |
|---|
public static Altitude parseAltitude(java.lang.String alt)
throws java.lang.NumberFormatException
NOTE: if the String is known to be just the altitude in feet, with no
unit name, then execution is faster using the Altitude constructor (e.g.,
new Altitude(Double.parseDouble(altStr), Units.ft)) ).
alt - Altitude string in the format "### unitName" or "###" (feet).
java.lang.NumberFormatException - Number fails to parse after removing unit.
public static Altitude parseAlt(java.lang.String alt)
throws java.lang.NumberFormatException
NOTE: if the String is known to be just the flight level, with no unit
name, then execution is faster using the Altitude constructor (e.g.,
new Altitude(Double.parseDouble(altStr), Units.fl)) ).
alt - Altitude string in the format "### unitName" or "###" (fl).
java.lang.NumberFormatException - Number fails to parse after removing unit.
public static Altitude toAltitude(org.w3c.dom.Element altElem)
throws java.lang.IllegalArgumentException,
org.w3c.dom.DOMException
altElem - Altitude Element with unit attribute and a value.
org.w3c.dom.DOMException - XML construction error.
java.lang.IllegalArgumentException - XML did not correctly specify altitude.public Altitude add(Altitude theMeasure)
theMeasure - the unit of measure you wish to add to this measure.
public Altitude sub(Altitude theMeasure)
theMeasure - the unit of measure you wish to sub from this measure.
public boolean eq(Altitude theMeasure)
public boolean lt(Altitude theMeasure)
public boolean gt(Altitude theMeasure)
public boolean ge(Altitude theMeasure)
public boolean le(Altitude theMeasure)
public boolean aeq(Altitude altitude,
Altitude acceptableMargin)
public boolean aeq(Altitude theAltitude)
public int asFL()
public java.lang.String toFL()
The flight level is the altitude unit and precision used by the Mode C altitude report. The returned number therefore represents an altitude rounded to the nearest 100 feet, given in hundreds of feet.
asFL()public java.lang.String toDraText()
toDraText in class Distancepublic java.lang.String toString()
toString in class DistanceUnits
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||