|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.aircraft.adm.controllogic.latcontrol.AbstractTurn
public abstract class AbstractTurn
An abstract class that contains most of the functionality for a turn. There are two types of turns, both of which are implemented in concrete classes:
LeftTurn,
RightTurn,
Serialized Form| Field Summary | |
|---|---|
private Angle |
BANK_CAPTURE_DONE
The bank capture is completed if the magnitude of the bank angle is less than the bank capture limit: finishes turn with a heading capture. |
private boolean |
bankCaptureCompleted
If the turn magnitude is greater than the HEADING_ERROR_BOUNDARY, a bank (roll angle) capture is performed until the BANK_CAPTURE_LIMIT has been captured, then the bank capture portion of the turn is completed and a heading capture is used for the remainder of the turn. |
static Angle |
CAPTURE_LIMIT
The heading is considered captured if abs_e5 is less than the capture limit. |
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
private static double |
DEFAULT_DESIRED_ROLL_ANGLE__DEG
|
private TrueHeading |
desiredHeading
This is the user-specified (Commanded) heading during each timestep, we will try to get closer to this value. |
private RollAngle |
desiredRollAngle
The roll angle calculated and returned by this control logic. |
private Angle |
e5
The heading error as calculated by the loaded turn strategist. |
private static Angle |
HDG_DIFF_FOR_DEF_DES_ROLL
Heading difference above which the default desired roll angle is used. |
private Angle |
HDG_DIFF_FOR_ZERO_DES_ROLL
Heading difference at which to switch the desired roll angle to zero, during bank capture. |
private boolean |
headingCaptured
As specified in the analysis, once the desired heading has been captured, then it is captured for the life of the maneuver. |
static Angle |
MIN_BANK_CAPTURE_HDG
The minimum heading change that requires a bank capture for the first part of the turn. |
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
AbstractTurn(TrueHeading desiredHeading,
Angle initialE5)
Constructor for the AbstractTurn class; to start the aircraft in a roll, just make the desired heading different from the current heading. |
|
| Method Summary | |
|---|---|
abstract Angle |
calcE5(TrueHeading currentHeading)
Calculates the error between the desired heading and the actual heading all sub classes must implement this method |
private static RollAngle |
calcHdgCaptureDesiredRollAngle(Angle e5)
Calculates the desired roll angle for heading capture stage. |
protected static Angle |
calcLeftTurnMagnitude(TrueHeading currentHeading,
TrueHeading desiredHeading)
Calculates the magnitude of the turn required to make a left turn from the current to the desired heading. |
protected static Angle |
calcRightTurnMagnitude(TrueHeading currentHeading,
TrueHeading desiredHeading)
Calculates the magnitude of the turn required to make a right turn from the current to the desired heading. |
AbstractTurn |
clone()
|
RollAngle |
control(TrueHeading currentHeading,
RollAngle currentRollAngle)
Updates the state of this particular strategist implementation. |
TrueHeading |
getDesiredHeading()
Returns the desired heading initially commanded by the sim pilot. |
RollAngle |
getRollAngle()
Returns the desired roll angle. |
boolean |
isHeadingCaptured()
Returns true if the heading has been captured, false otherwise. |
protected static TurnStrategist |
loadStrategist(TrueHeading currHdg,
TrueHeading desiredHdg)
Loads a turn strategist, given the current and desired heading. |
abstract boolean |
normalize(TrueHeading currentHeading,
TrueHeading desiredHeading)
This method returns whether or not to normalize desiredHeading. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
public static final Angle MIN_BANK_CAPTURE_HDG
public static final Angle CAPTURE_LIMIT
private static final double DEFAULT_DESIRED_ROLL_ANGLE__DEG
private static final Angle HDG_DIFF_FOR_DEF_DES_ROLL
private final Angle HDG_DIFF_FOR_ZERO_DES_ROLL
private final Angle BANK_CAPTURE_DONE
private boolean headingCaptured
private boolean bankCaptureCompleted
private TrueHeading desiredHeading
private RollAngle desiredRollAngle
private Angle e5
| Constructor Detail |
|---|
public AbstractTurn(TrueHeading desiredHeading,
Angle initialE5)
desiredHeading - the desired headinginitialE5 - the initial value of e5 (the error between
the desired and actual heading)| Method Detail |
|---|
public abstract Angle calcE5(TrueHeading currentHeading)
calcE5 in interface TurnStrategistcurrentHeading - the current heading of the aircraft
public abstract boolean normalize(TrueHeading currentHeading,
TrueHeading desiredHeading)
WARNING: This method assunes that 360-degree reative turns are NOT in normalized format.
All sub classes must implement this method.
normalize in interface TurnStrategistcurrentHeading - the current heading of the aircraftdesiredHeading - the desired heading
public RollAngle control(TrueHeading currentHeading,
RollAngle currentRollAngle)
control in interface HeadingStrategistcurrentHeading - The current heading of the aircraft.currentRollAngle - The current roll angle.
public RollAngle getRollAngle()
getRollAngle in interface HeadingStrategistpublic TrueHeading getDesiredHeading()
getDesiredHeading in interface HeadingStrategistpublic boolean isHeadingCaptured()
isHeadingCaptured in interface HeadingStrategistprivate static RollAngle calcHdgCaptureDesiredRollAngle(Angle e5)
e5 - The calculated heading error.
protected static TurnStrategist loadStrategist(TrueHeading currHdg,
TrueHeading desiredHdg)
Actually does NOT load a Strategist. It measures the Turn Magnitude for a left and right turn, constructs a LeftTurn or RightTurn Strategist and returns the TurnStrategist constructed. Leaves the assignment to the calling method. (dw) The turn strategist returned is either one of LeftTurn or RightTurn. Note that this method is static because it is does not depend on a "live" AbstractTurn object.
currHdg - the current heading of the aircraft.desiredHdg - the desired heading of the aircraft.
protected static Angle calcLeftTurnMagnitude(TrueHeading currentHeading,
TrueHeading desiredHeading)
currentHeading - The current heading of the aircraft.desiredHeading - The desired heading of the aircraft.
protected static Angle calcRightTurnMagnitude(TrueHeading currentHeading,
TrueHeading desiredHeading)
currentHeading - The current heading of the aircraft.desiredHeading - The desired heading of the aircraft.
public final AbstractTurn clone()
throws java.lang.CloneNotSupportedException
clone in interface HeadingStrategistclone in interface TurnStrategistclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||