faa.tg.aircraft
Class Dynamics

java.lang.Object
  extended by faa.tg.aircraft.Dynamics
Direct Known Subclasses:
ADMDynamics, CrashDynamics, DeadReckonDynamics, GroundDynamics, TransitionDynamics

public abstract class Dynamics
extends java.lang.Object

 Defines the methods needed by the aircraft dynamics interface.
 
See the source: Dynamics.java

Version:
$Id: Dynamics.java,v 3.27 2009/01/21 22:47:54 lykensj Exp $
Author:
Sam Fullerton, Titan/ACB-860

Nested Class Summary
static interface Dynamics.GroundPredictor
           
 
Field Summary
protected  Aircraft aircraft
           
protected  AircraftDynamicsResult aircraftDynamicsResult
           
protected  AircraftEventBus aircraftEventBus
           
protected  Airframe airframe
           
static java.lang.String CVS_VERSION_ID
           
protected  IndicatedAirspeed desiredIas
           
protected  Mach desiredMach
           
protected  Engine engine
           
protected  Position estimatedPos
           
protected  FlyingStatus flyingStatus
          The flying state of the aircraft: defaults to ON_ROUTE if not set.
protected  GroundTrackHeading groundTrackHeading
           
protected  GroundTrackSpeed groundTrackSpeed
           
protected  IndicatedAirspeed indicatedAirspeed
           
protected  Mach mach
           
protected  MagneticHeading magneticHeading
           
protected  AircraftProperties props
           
private  java.lang.String typeName
           
 
Constructor Summary
protected Dynamics(Aircraft aircraft, Dynamics other)
          Copy ctor for split.
protected Dynamics(java.lang.String dynamicsType, Aircraft aircraft, Position position, java.lang.String acType)
           
protected Dynamics(java.lang.String dynamicsType, Dynamics previousDyn)
          Constructor for the Dynamics object that initializes the dynamics using the dynamics type of the previous epoch.
protected Dynamics(java.lang.String dynamicsType, Position estimatedPosition, Aircraft aircraft, AircraftTypeProfile profile)
          Constructor for the Dynamics object that initializes the dynamics using the aircraft type profile and a specified AircraftEventBus (which is also used as the source of the estimated position information).
private Dynamics(java.lang.String dynamicsType, Position estimatedPos, Aircraft aircraft, Engine engine, Airframe airframe, AircraftProperties props)
          Constructor for the Dynamics object with information for initializing the aircraft dynamics.
 
Method Summary
 LocalAtm calculateLocalAtm(Position pos)
          Calculates the atmospheric conditions at this position.
 LocalWind calculateLocalWind(Position pos)
          Calculates the wind at this position.
protected  MagneticHeading calculateMagneticHeading(Position position, TrueHeading heading)
           
abstract  boolean changeFlyingStatusIfValid(FlyingStatus newFlyingStatus)
          Change flying status of aircraft to the given status if change is valid, and return whether the flying status was changed.
 SimulationTime currentTime()
          Returns the current simulation time.
 AircraftDynamicsResult getAircraftDynamicsResult()
           
 AircraftProperties getAircraftProperties()
          this method is useless and if it is used it will may cause a nasty bug! --lls
 Distance getAircraftTurnRadius()
          Return aircraft's turn radius.
 AircraftWeight getAircraftWeight()
          return current aircraft weight
 Airframe getAirframe()
          return a reference to the Airframe object
 AltitudeRate getAltRate()
           
protected abstract  Controller getController()
          Return the controller for this dynamics type.
abstract  java.lang.String getCurrentManeuver()
           
abstract  Altitude getDesiredAltitude()
          return current desired altitude
abstract  TrueHeading getDesiredHeading()
          return current desired true heading
 IndicatedAirspeed getDesiredIndicatedAirspeed()
           
 Mach getDesiredMach()
          Return current desired mach speed
abstract  MagneticHeading getDesiredMagneticHeading()
          return current desired magnetic heading
abstract  GenericSpeed getDesiredSpeed()
           
 Drag getDrag()
           
 AirframeDragDeviceSettings getDragDeviceSettings()
           
 Engine getEngine()
           
 Position getEstimatedPosition()
           
 FlightPathRelAirAngle getFlightPathAngle()
          return current flight path angle
 FlyingStatus getFlyingStatus()
          Returns the flying (maneuver) status of the aircraft.
 GroundTrackHeading getGroundTrackHeading()
           
 GroundTrackSpeed getGroundTrackSpeed()
          Return current airspeed relative to the ground.
abstract  GuidanceResult getGuidanceResult()
          Returns GuidanceResult or null.
 IndicatedAirspeed getIndicatedAirspeed()
          Return current indicated airspeed (IAS).
 LatitudeRate getLatRate()
           
 LocalAtm getLocalAtm()
           
 LocalWind getLocalWind()
           
 LongitudeRate getLongRate()
           
 Mach getMach()
          Return current mach speed.
 MagneticHeading getMagneticHeading()
          return current magnetic heading
 java.lang.String getName()
          Return a text string describing this dynamics type.
 NED_VelocityVector getNEDVelocityVector()
          Returns the velocity vector of the object in the North-East-Down rectangular coordinate frame.
 Position getPosition()
           
 Distance getRemainingDistance()
          ZERO if unknown or unreliable
 RollAngle getRollAngle()
          return current roll angle
 RollRate getRollRate()
           
 SpdAltManeuver getSpdAltManeuver()
          Returns the current speed/altitude maneuver or null if this is not appropriate to this type of dynamics.
abstract  TransmittedSimData getTransferMedium()
           
 TrueAirspeed getTrueAirspeed()
          Return current true airspeed.
 TrueHeading getTrueHeading()
          return current true heading
 TurnRate getTurnRate()
          Return aircraft's turn rate.
 Dynamics.GroundPredictor groundPredictor()
           
protected  void initDynamicsFields(AircraftState acState)
          Initializes the given AircraftState for diagnosis; adds information that only ADMDynamics has access to.
 boolean isClearedForTakeOff()
           
 void sendMessage(java.lang.String message)
           
protected abstract  Dynamics split(Aircraft aircraft, Scenario scenario)
          Creates a copy of this dynamics, but attached to the given Scenario and Aircraft.
 java.lang.String toString()
          Return a text string describing this dynamics type.
protected  void updateAircraftState(AircraftState state)
          Override this method to make additional, dynamics specific, changes to aircraft state modified by initDynamicsFields.
abstract  void updateState(SimulationTime timeStep)
          Advances the state of the Aircraft by one time step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
See Also:
Constant Field Values

aircraftEventBus

protected final AircraftEventBus aircraftEventBus

engine

protected Engine engine

typeName

private java.lang.String typeName

flyingStatus

protected FlyingStatus flyingStatus
The flying state of the aircraft: defaults to ON_ROUTE if not set.


aircraftDynamicsResult

protected AircraftDynamicsResult aircraftDynamicsResult

indicatedAirspeed

protected IndicatedAirspeed indicatedAirspeed

mach

protected Mach mach

groundTrackSpeed

protected GroundTrackSpeed groundTrackSpeed

magneticHeading

protected MagneticHeading magneticHeading

groundTrackHeading

protected GroundTrackHeading groundTrackHeading

desiredMach

protected Mach desiredMach

desiredIas

protected IndicatedAirspeed desiredIas

airframe

protected Airframe airframe

estimatedPos

protected Position estimatedPos

aircraft

protected final Aircraft aircraft

props

protected transient AircraftProperties props
Constructor Detail

Dynamics

protected Dynamics(java.lang.String dynamicsType,
                   Position estimatedPosition,
                   Aircraft aircraft,
                   AircraftTypeProfile profile)
Constructor for the Dynamics object that initializes the dynamics using the aircraft type profile and a specified AircraftEventBus (which is also used as the source of the estimated position information).

Parameters:
dynamicsType - The name of the subtype of this dynamics.
estimatedPosition - If null, must be set by subclass.
aircraft - Aircraft object; if null, must set this.aircraft value & call this.aircraftEventBus.setAircraft() in subclass.
profile - The aircraft type profile for this aircraft.

Dynamics

protected Dynamics(java.lang.String dynamicsType,
                   Dynamics previousDyn)
Constructor for the Dynamics object that initializes the dynamics using the dynamics type of the previous epoch.

Parameters:
dynamicsType - The name of the subtype of this dynamics.
previousDyn - Aircraft's dynamics during the previous epoch.

Dynamics

protected Dynamics(Aircraft aircraft,
                   Dynamics other)
            throws java.lang.CloneNotSupportedException
Copy ctor for split.

Throws:
java.lang.CloneNotSupportedException

Dynamics

private Dynamics(java.lang.String dynamicsType,
                 Position estimatedPos,
                 Aircraft aircraft,
                 Engine engine,
                 Airframe airframe,
                 AircraftProperties props)
Constructor for the Dynamics object with information for initializing the aircraft dynamics.


Dynamics

protected Dynamics(java.lang.String dynamicsType,
                   Aircraft aircraft,
                   Position position,
                   java.lang.String acType)
Method Detail

getTransferMedium

public abstract TransmittedSimData getTransferMedium()
                                              throws ConstructionException
Throws:
ConstructionException

split

protected abstract Dynamics split(Aircraft aircraft,
                                  Scenario scenario)
                           throws java.lang.CloneNotSupportedException
Creates a copy of this dynamics, but attached to the given Scenario and Aircraft.

Parameters:
aircraft, - the aircraft the new dynamics works for.
scenario, - the new scenario the new aircraft is in.
Returns:
a copy of the dynamics.
Throws:
java.lang.CloneNotSupportedException - if a class cannot be cloned inside the object graph.

getName

public java.lang.String getName()
Return a text string describing this dynamics type.


toString

public java.lang.String toString()
Return a text string describing this dynamics type.

Overrides:
toString in class java.lang.Object

getController

protected abstract Controller getController()
Return the controller for this dynamics type.


getGuidanceResult

public abstract GuidanceResult getGuidanceResult()
Returns GuidanceResult or null.

Returns:
returns GuidanceResult or null.

getAircraftDynamicsResult

public AircraftDynamicsResult getAircraftDynamicsResult()

updateState

public abstract void updateState(SimulationTime timeStep)
Advances the state of the Aircraft by one time step.

See Also:
Executive.getTimeStep()

getAircraftTurnRadius

public Distance getAircraftTurnRadius()
Return aircraft's turn radius.


getRollAngle

public RollAngle getRollAngle()
return current roll angle


getFlightPathAngle

public FlightPathRelAirAngle getFlightPathAngle()
return current flight path angle


getAircraftWeight

public AircraftWeight getAircraftWeight()
return current aircraft weight


getNEDVelocityVector

public NED_VelocityVector getNEDVelocityVector()
Returns the velocity vector of the object in the North-East-Down rectangular coordinate frame.


getRollRate

public RollRate getRollRate()

getTurnRate

public TurnRate getTurnRate()
Return aircraft's turn rate.


getLocalWind

public LocalWind getLocalWind()

getLocalAtm

public LocalAtm getLocalAtm()

getPosition

public Position getPosition()

getLatRate

public LatitudeRate getLatRate()

getLongRate

public LongitudeRate getLongRate()

calculateMagneticHeading

protected MagneticHeading calculateMagneticHeading(Position position,
                                                   TrueHeading heading)

getMagneticHeading

public MagneticHeading getMagneticHeading()
return current magnetic heading


getGroundTrackHeading

public GroundTrackHeading getGroundTrackHeading()

getDesiredIndicatedAirspeed

public IndicatedAirspeed getDesiredIndicatedAirspeed()

getTrueAirspeed

public TrueAirspeed getTrueAirspeed()
Return current true airspeed.


getAltRate

public AltitudeRate getAltRate()

getGroundTrackSpeed

public GroundTrackSpeed getGroundTrackSpeed()
Return current airspeed relative to the ground.


getIndicatedAirspeed

public IndicatedAirspeed getIndicatedAirspeed()
Return current indicated airspeed (IAS).


getMach

public Mach getMach()
Return current mach speed.


getDesiredMach

public Mach getDesiredMach()
Return current desired mach speed


getFlyingStatus

public FlyingStatus getFlyingStatus()
Returns the flying (maneuver) status of the aircraft.


getTrueHeading

public TrueHeading getTrueHeading()
return current true heading


getDesiredHeading

public abstract TrueHeading getDesiredHeading()
return current desired true heading


getDesiredSpeed

public abstract GenericSpeed getDesiredSpeed()

getDesiredMagneticHeading

public abstract MagneticHeading getDesiredMagneticHeading()
return current desired magnetic heading


getDesiredAltitude

public abstract Altitude getDesiredAltitude()
return current desired altitude


getRemainingDistance

public Distance getRemainingDistance()
ZERO if unknown or unreliable


getSpdAltManeuver

public SpdAltManeuver getSpdAltManeuver()
Returns the current speed/altitude maneuver or null if this is not appropriate to this type of dynamics.


changeFlyingStatusIfValid

public abstract boolean changeFlyingStatusIfValid(FlyingStatus newFlyingStatus)
Change flying status of aircraft to the given status if change is valid, and return whether the flying status was changed.


initDynamicsFields

protected final void initDynamicsFields(AircraftState acState)
Initializes the given AircraftState for diagnosis; adds information that only ADMDynamics has access to.

Parameters:
acState - The AircraftState to initialize the dynamics fields of.

updateAircraftState

protected void updateAircraftState(AircraftState state)
Override this method to make additional, dynamics specific, changes to aircraft state modified by initDynamicsFields.

Parameters:
state, - the struct to alter.

getEngine

public Engine getEngine()

isClearedForTakeOff

public boolean isClearedForTakeOff()

getDrag

public Drag getDrag()

getDragDeviceSettings

public AirframeDragDeviceSettings getDragDeviceSettings()

getAirframe

public Airframe getAirframe()
return a reference to the Airframe object

Returns:
Airframe a reference to the Airframe object

getEstimatedPosition

public Position getEstimatedPosition()

getAircraftProperties

public AircraftProperties getAircraftProperties()
this method is useless and if it is used it will may cause a nasty bug! --lls


calculateLocalWind

public LocalWind calculateLocalWind(Position pos)
Calculates the wind at this position.

Parameters:
pos - the Position to check.
Returns:
LocalWind at pos.

calculateLocalAtm

public LocalAtm calculateLocalAtm(Position pos)
Calculates the atmospheric conditions at this position.

Parameters:
pos - the Position to check.
Returns:
LocalAtm at pos.

currentTime

public SimulationTime currentTime()
Returns the current simulation time.

Returns:
a SimulationTime

sendMessage

public void sendMessage(java.lang.String message)

groundPredictor

public Dynamics.GroundPredictor groundPredictor()

getCurrentManeuver

public abstract java.lang.String getCurrentManeuver()