|
||||||||||
| 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.Angle
faa.tg.units.MagneticHeading
public class MagneticHeading
MagneticHeading represents a measurement of the heading of an aircraft
with respect to Magnetic North.
See section 5.6 of the Detailed Design Document for a discussion
of design issues.
See the source: MagneticHeading.java
AUnits,
AMeasure,
MagneticHeading,
Units.radians,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
static MagneticHeading |
DEG_360
|
(package private) static long |
serialVersionUID
|
| Fields inherited from class faa.tg.units.Angle |
|---|
D180_DIV_PI, DEG_1, DEG_180, DEG_270, DEG_30, DEG_330, DEG_5, DEG_60, DEG_90, DEG_NEG180, DEG_NEG270, DEG_NEG30, DEG_NEG5, DEG_NEG90, DEG_PER_RAD, NEG_NINETY_DEG, NEG_ONEEIGHTY_DEG, NINETY_DEG, ONEEIGHTY_DEG, PI, PI_DIV_180, PI_DIV_2, PI_DIV_4, PI_MUL_2, PI_MUL_4, RAD_PER_DEG, THIRTY_DEG, THREETHIRTY_DEG, TWOSEVENTY_DEG, ZERO |
| 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 | |
|---|---|
MagneticHeading(double theValue,
AngleUnits theUnits)
Constructor for the MagneticHeading class |
|
MagneticHeading(java.lang.String dmsStr)
Constructor for MagneticHeading that parses an input String to determine the value. |
|
| Method Summary | |
|---|---|
boolean |
eq(MagneticHeading theMeasure)
This method provides a test for equality. |
TurnDirection |
findTurnDirectionTo(MagneticHeading desiredHeading)
Determines the TurnDirection to a given desired magnetic heading. |
boolean |
ge(MagneticHeading theMeasure)
This method provides a test for greater than / equal to. |
TrueHeading |
getTrueHeading(MagneticDeclination magdec)
Returns the TrueHeading of the magnetic declination of a Position. |
boolean |
gt(MagneticHeading theMeasure)
This method provides a test for greater than. |
boolean |
le(MagneticHeading theMeasure)
This method provides a test for less than / equal to. |
boolean |
lt(MagneticHeading theMeasure)
This method provides a test for less than. |
private static double |
normalizeRange(double degrees,
AUnits units)
Normalizes the MagneticHeading value to be greater than 0 and <= 360. |
double |
ratio(MagneticHeading val)
This division method produces a dimensionless ratio of like measures. |
java.lang.String |
toString()
returns the String representation of this object in the units used to create it. |
| Methods inherited from class faa.tg.units.Angle |
|---|
abs, add, aeq, as, average, cos, diff, eq, ge, gt, isBetween, le, lt, main, parseDmsString, ratio, reciprocalAngle, removeDelimiters, sin, sub, tan, toDmsString, toRadialString, toText |
| 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 MagneticHeading DEG_360
| Constructor Detail |
|---|
public MagneticHeading(double theValue,
AngleUnits theUnits)
throws java.lang.NumberFormatException
theValue - The magnitude of MagneticHeading as a double.theUnits - The units of the value that will be stored (ex: deg).
java.lang.NumberFormatException
public MagneticHeading(java.lang.String dmsStr)
throws java.lang.NumberFormatException
ddd-mm-ss.sss ddd-mm-ss ddd-mm.mmm ddd-mm ddd.ddd dd-mm-ss.sss dd-mm-ss dd-mm.mmm dd-mm dd.ddd ddd:mm:ss.sss ddd:mm:ss ddd:mm.mmm ddd:mm ddd dd:mm:ss.sss dd:mm:ss dd:mm.mmm dd:mm dd dddmmss.sss dddmmss dddmm.mmm dddmm ddmmss.sss ddmmss ddmm.mmm ddmmIn addition, the string may start or end with one of the following hemisphere designation characters:
N S E W + -
Note: the degrees field must have either 2 or 3 digits; minutes and
seconds fields (not including decimal fraction) must be 2 digits.
dmsStr - A String in degrees:minutes:seconds format.
If in [D]DD:MM:SS, the string should start or end with
a N-S, E-W or +/- direction designator.
java.lang.NumberFormatException - If the string could not be parsed.| Method Detail |
|---|
public TurnDirection findTurnDirectionTo(MagneticHeading desiredHeading)
desiredHeading - the end heading
TurnDirectionpublic TrueHeading getTrueHeading(MagneticDeclination magdec)
magdec - The MagneticDeclination to get the TrueHeading of.
private static double normalizeRange(double degrees,
AUnits units)
public double ratio(MagneticHeading val)
public boolean eq(MagneticHeading theMeasure)
public boolean lt(MagneticHeading theMeasure)
public boolean gt(MagneticHeading theMeasure)
public boolean ge(MagneticHeading theMeasure)
public boolean le(MagneticHeading theMeasure)
public java.lang.String toString()
toString in class AngleUnits
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||