mil.af.afit.router
Class Wind

java.lang.Object
  |
  +--java.util.Observable
        |
        +--mil.af.afit.router.Wind
All Implemented Interfaces:
java.io.Serializable

public class Wind
extends java.util.Observable
implements java.io.Serializable

A simple wind model that stores speed, direction, and lower and upper altitudes. Vehicle altitudes are matched up with wind altitudes when calculating travel times.

Since:
1.0
See Also:
Vehicle, WindList, Serialized Form

Constructor Summary
Wind()
          Constructs a wind with default values.
Wind(int speed)
          Constructs a wind with the specified speed.
Wind(int speed, int bearing)
          Constructs a wind with the specified speed and bearing.
 
Method Summary
 int getBearing()
          Returns the wind's bearing.
 int getLowerAltitude()
          Returns the wind's lower Altitude.
 int getSpeed()
          Returns the wind's speed.
 int getUpperAltitude()
          Returns the wind's upper Altitude.
 void setBearing(int bearing)
          Sets the wind's bearing.
 void setLowerAltitude(int lower)
          Sets the wind's lower altitude.
 void setSpeed(int speed)
          Sets the wind's speed.
 void setUpperAltitude(int upper)
          Sets the wind's upper altitude.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wind

public Wind()
Constructs a wind with default values.
Since:
1.0

Wind

public Wind(int speed)
Constructs a wind with the specified speed.
Parameters:
speed - wind speed (in knots)
Since:
1.0

Wind

public Wind(int speed,
            int bearing)
Constructs a wind with the specified speed and bearing.
Parameters:
speed - wind speed (in knots)
bearin - wind bearing (in degrees clockwise from north)
Since:
1.0
Method Detail

getSpeed

public final int getSpeed()
Returns the wind's speed.
Returns:
the wind's speed (in knots)
Since:
1.0

getBearing

public final int getBearing()
Returns the wind's bearing.
Returns:
the wind's bearing (in degrees clockwise from north)
Since:
1.0

getUpperAltitude

public final int getUpperAltitude()
Returns the wind's upper Altitude.
Returns:
the wind's upper Altitude (in feet)
Since:
1.0

getLowerAltitude

public final int getLowerAltitude()
Returns the wind's lower Altitude.
Returns:
the wind's lower Altitude (in feet)
Since:
1.0

setSpeed

public final void setSpeed(int speed)
Sets the wind's speed.
Parameters:
speed - the wind's speed (in knots)
Since:
1.0

setBearing

public final void setBearing(int bearing)
Sets the wind's bearing.
Parameters:
bearing - the wind's bearing (in degrees clockwise from north)
Since:
1.0

setLowerAltitude

public final void setLowerAltitude(int lower)
Sets the wind's lower altitude.
Parameters:
lower - the wind's lower altitude (in feet)
Since:
1.0

setUpperAltitude

public final void setUpperAltitude(int upper)
Sets the wind's upper altitude.
Parameters:
upper - the wind's upper altitude (in feet)
Since:
1.0