faa.tg.units
Class GroundTrackHeading

java.lang.Object
  extended by faa.tg.units.AMeasure
      extended by faa.tg.units.Angle
          extended by faa.tg.units.TrueBearing
              extended by faa.tg.units.GroundTrackHeading
All Implemented Interfaces:
HasText, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<AMeasure>

public class GroundTrackHeading
extends TrueBearing

 GroundTrackHeading represents an object for measuring units of the
 heading of the ground track of aircraft, in relation to the bearing of
 true north.
 This is only equivalent to the TrueHeading if there is no wind and the
 aircraft is not changing altitude (TrueHeading is the direction of the
 airspeed vector in our 4 DOF model).
 
See section 5.6 of the Detailed Design Document for a discussion of design issues.

See the source: GroundTrackHeading.java

Version:
$Id: GroundTrackHeading.java,v 3.3 2008/08/07 19:59:03 lykensj Exp $
Author:
Tim Kimmet (modeled after Robert G. Oliver's Units Classes)
See Also:
AMeasure, Angle, Units.radians, Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
static GroundTrackHeading DEG_180
           
static GroundTrackHeading DEG_270
           
static GroundTrackHeading DEG_30
           
static GroundTrackHeading DEG_360
           
static GroundTrackHeading DEG_5
           
static GroundTrackHeading DEG_90
           
(package private) static long serialVersionUID
           
static GroundTrackHeading ZERO
          A zero value is equal to 360 degrees when normalized.
 
Fields inherited from class faa.tg.units.TrueBearing
DEG_60
 
Fields inherited from class faa.tg.units.Angle
D180_DIV_PI, DEG_1, DEG_330, 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
 
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
GroundTrackHeading(double theValue, AngleUnits theUnits)
          Constructor for the GroundTrackHeading class.
GroundTrackHeading(java.lang.String dmsStr)
          Constructor for GroundTrackHeading that parses a parameter string to determine its value.
 
Method Summary
 boolean eq(GroundTrackHeading theMeasure)
          This method provides a test for equality.
 boolean ge(GroundTrackHeading theMeasure)
          This method provides a test for greater than / equal to.
 boolean gt(GroundTrackHeading theMeasure)
          This method provides a test for greater than.
 boolean le(GroundTrackHeading theMeasure)
          This method provides a test for less than / equal to.
 boolean lt(GroundTrackHeading theMeasure)
          This method provides a test for less than.
static void main(java.lang.String[] args)
           
 double ratio(GroundTrackHeading val)
          This division method produces a dimensionless ratio of like measures.
 java.lang.String toString()
          Returns the String representation of this object in the form with which it was created.
 
Methods inherited from class faa.tg.units.TrueBearing
calcTurnAngle, eq, ge, getFuzzyString, gt, le, lt, normalizeRange, ratio, reciprocal, sub, toTrueBearing
 
Methods inherited from class faa.tg.units.Angle
abs, add, aeq, as, average, cos, diff, eq, ge, gt, isBetween, le, lt, 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

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

ZERO

public static final GroundTrackHeading ZERO
A zero value is equal to 360 degrees when normalized.


DEG_5

public static final GroundTrackHeading DEG_5

DEG_30

public static final GroundTrackHeading DEG_30

DEG_90

public static final GroundTrackHeading DEG_90

DEG_180

public static final GroundTrackHeading DEG_180

DEG_270

public static final GroundTrackHeading DEG_270

DEG_360

public static final GroundTrackHeading DEG_360
Constructor Detail

GroundTrackHeading

public GroundTrackHeading(double theValue,
                          AngleUnits theUnits)
Constructor for the GroundTrackHeading class.

Parameters:
theValue - the magnitude of GroundTrackHeading as a double
theUnits - the units of the value that will be stored (ex: km)

GroundTrackHeading

public GroundTrackHeading(java.lang.String dmsStr)
                   throws java.lang.NumberFormatException
Constructor for GroundTrackHeading that parses a parameter string to determine its value. The String may be in one of the following formats:
   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       ddmm
 
In 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.

Parameters:
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.
Throws:
java.lang.NumberFormatException - If the string could not be parsed.
See Also:
Angle.parseDmsString(String)
Method Detail

ratio

public double ratio(GroundTrackHeading val)
This division method produces a dimensionless ratio of like measures.

Returns:
Returns the ratio of the two measures.

eq

public boolean eq(GroundTrackHeading theMeasure)
This method provides a test for equality. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns boolean indicating whether values are equal.

lt

public boolean lt(GroundTrackHeading theMeasure)
This method provides a test for less than. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns whether this value is less than the given value.

gt

public boolean gt(GroundTrackHeading theMeasure)
This method provides a test for greater than. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns whether this value is greater than the given value.

le

public boolean le(GroundTrackHeading theMeasure)
This method provides a test for less than / equal to. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns result of test for less than or equal to.

ge

public boolean ge(GroundTrackHeading theMeasure)
This method provides a test for greater than / equal to. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns result of test for greater than or equal to.

toString

public java.lang.String toString()
Returns the String representation of this object in the form with which it was created.

Overrides:
toString in class TrueBearing
Returns:
Returns a string containing the canonical value of the bearing.
See Also:
Units

main

public static void main(java.lang.String[] args)