faa.tg.units
Class GroundTrackSpeed

java.lang.Object
  extended by faa.tg.units.AMeasure
      extended by faa.tg.units.Speed
          extended by faa.tg.units.GroundTrackSpeed
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<AMeasure>

public class GroundTrackSpeed
extends Speed

 GroundTrackSpeed defines objects used to quantify a measure of an
 aircraft's actual speed relative to the ground (the aircraft's
 TrueAirspeed plus the effect of wind).
 
See section 5.6 of the Detailed Design Document for a discussion of design issues.

See the source: GroundTrackSpeed.java

Version:
$Id: GroundTrackSpeed.java,v 3.7 2009/01/08 20:26:59 danaw Exp $
Author:
Tim Kimmet (modeled after Robert G. Oliver's Units Classes)
See Also:
AUnits, AMeasure, TrueAirspeed, Units.mPerSec, Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
(package private) static long serialVersionUID
           
static GroundTrackSpeed ZERO
           
 
Fields inherited from class faa.tg.units.Speed
ACCEPTABLE_VARIATION, KTS_1, KTS_10, KTS_20, KTS_25, KTS_40, KTS_5, KTS_50
 
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
GroundTrackSpeed(Distance horizSeparation, Time timeToTravel)
          Constructor that takes a horizontal separation distance and a time to travel that distance (does not take wind into account).
GroundTrackSpeed(double theValue, SpeedUnits theUnits)
          Constructor for the GroundTrackSpeed class.
 
Method Summary
 GroundTrackSpeed add(GroundTrackSpeed theMeasure)
          This summation method adds a value with like units.
 java.lang.String debug()
          Formats value as an easy-to-read text string that shows the value in knots followed by the the unit specification.
 boolean eq(GroundTrackSpeed theMeasure)
          This method provides a test for equality.
 boolean ge(GroundTrackSpeed theMeasure)
          This method provides a test for less than / equal to.
 boolean gt(GroundTrackSpeed theMeasure)
          This method provides a test for greater than.
 boolean le(GroundTrackSpeed theMeasure)
          This method provides a test for greater than / equal to.
 boolean lt(GroundTrackSpeed theMeasure)
          This method provides a test for less than.
 double ratio(GroundTrackSpeed val)
          This division method produces a dimensionless ratio of like measures.
 GroundTrackSpeed sub(GroundTrackSpeed theMeasure)
          This subtraction method subtracts a value with like units.
 java.lang.String toString()
          Returns the String representation of this object in its original form.
 java.lang.String toText()
           
 
Methods inherited from class faa.tg.units.Speed
abs, add, aeq, as, eq, eq, ge, gt, gt, le, lt, lt, ratio, sub, toSpeed, toString, toString, travelDistance
 
Methods inherited from class faa.tg.units.AMeasure
absoluteValue, add, as, as, clone, compareTo, 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 GroundTrackSpeed ZERO
Constructor Detail

GroundTrackSpeed

public GroundTrackSpeed(double theValue,
                        SpeedUnits theUnits)
Constructor for the GroundTrackSpeed class.

Parameters:
theValue - The magnitude of GroundTrackSpeed as a double.
theUnits - The units of the value to be stored (ex: ftPerSec).

GroundTrackSpeed

public GroundTrackSpeed(Distance horizSeparation,
                        Time timeToTravel)
Constructor that takes a horizontal separation distance and a time to travel that distance (does not take wind into account).

Parameters:
horizSeparation - the distance traveled during the time specified.
timeToTravel - the time it took to travel the specified distance.
Throws:
java.lang.ArithmeticException - if time is zero.
Method Detail

add

public GroundTrackSpeed add(GroundTrackSpeed theMeasure)
This summation method adds a value with like units. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Parameters:
theMeasure - The unit of measure to add to this measure.
Returns:
A new GroundTrackSpeed with the sum of the values.

sub

public GroundTrackSpeed sub(GroundTrackSpeed theMeasure)
This subtraction method subtracts a value with like units. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Parameters:
theMeasure - The unit of measure to subtract from this measure.
Returns:
A new GroundTrackSpeed with the difference of the values.

ratio

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

Returns:
the ratio of the two measures

eq

public boolean eq(GroundTrackSpeed 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(GroundTrackSpeed 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(GroundTrackSpeed 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.

ge

public boolean ge(GroundTrackSpeed 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.

le

public boolean le(GroundTrackSpeed 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.

debug

public java.lang.String debug()
Formats value as an easy-to-read text string that shows the value in knots followed by the the unit specification. (Points out override: of AMeasure.debug() which uses the created unit.)

Overrides:
debug in class AMeasure
Returns:
An easy-to-read String representing the measure in knots.

toText

public java.lang.String toText()
Returns:
A short standardized text output value.

toString

public java.lang.String toString()
Returns the String representation of this object in its original form.

Overrides:
toString in class Speed
Returns:
A String representing the measure in the canonical unit.
See Also:
Units