|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.aircraft.Controller
public abstract class Controller
Defines the methods needed for controlling an aircraft.
See the source: Controller.java
| Field Summary | |
|---|---|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID. |
private ControllerResult |
notAvailable
|
private java.lang.String |
unavailableMsg
|
| Constructor Summary | |
|---|---|
protected |
Controller(Dynamics dynamics)
|
| Method Summary | |
|---|---|
void |
addSimEvent(SimEventPredicate pred,
CommandLine commandLine,
Scenario scenario,
Acid acid)
Must override to allow a sim event to be applied to this aircraft. |
void |
cancelAltitudeConstraints()
SpCommand must call this when a controller commands a new altitude. |
void |
cancelRouteConstraints()
Cancels route constraints and crossing maneuvers, replacing them with a maneuver using the current desired speed and current desired altitude. |
void |
cancelSpeedConstraints()
SpCommand must call this when an aircraft receives a speed command. |
void |
captureLocalizer(Runway arrRwy)
Must override to allow aircraft to capture the localizer. |
void |
clearForILSApproach(Runway arrRwy)
Must override to allow aircraft to perform the ILS Approach. |
void |
clearForRNavApproach(Aircraft aircraft,
Runway arrRwy)
Must override to allow aircraft to perform the RNav Approach. |
java.lang.String |
crossFix(Fix fix,
AltitudeRestriction altRestr,
GenericSpeed speedRestr)
Instruction for the aircraft to cross a fix that allows an altitude restriction or a speed restriction to be specified. |
void |
descendGlideSlope(Runway arrRwy)
Must override to allow aircraft to descend the glide slope. |
void |
directFix(Fix fix)
Instructs the aircraft to go directly to the specified fix. |
void |
disableGps()
These methods are accessors to functionality of the navigation equipment. |
void |
enableGps()
|
java.lang.String |
expediteThroughAlt(Altitude expediteAlt)
Must override to allow an expedited altitude change. |
void |
followAt(Altitude followOnAltitude,
Fix fix,
Position currPos)
Must override to allow an altitude profile to follow the current profile. |
void |
followAt(GenericSpeed followOnSpeed,
boolean maxRateDecel,
Fix fix,
Position currPos)
Must override to allow a speed profile to follow the current profile. |
void |
followOn(Altitude followOnAltitude)
Must override to allow an altitude profile to follow the current profile. |
void |
followOn(GenericSpeed followOnSpeed,
boolean maxRateDecel)
Must override to allow a speed profile to follow the current profile. |
void |
followOn(MagneticHeading heading)
Must override to allow a aircraft to follow the current profile. |
void |
followTrack(Track track)
Follow the track specified. |
abstract RouteSegment |
getCurrentSegment()
Returns the current route segment, or null if not on a route. |
boolean |
getEnforceNavigationLimits()
Returns whether to force an aircraft to obey the limits of its navigation equipment when following a route |
Altitude |
getExpeditedDescentCapture(Position crossPos)
Method called to determine the altitude at which the crossing point's latitude/longitude can be captured with an expedited descent. |
Route |
getPreviousRoute()
Returns the previous route, or null if not on a route. |
abstract Route |
getRoute()
Returns the current route, or null if not on a route. |
abstract java.lang.String |
getRouteString()
Return the current route of this aircraft as a dot-separated string, if no route, returns "N/A". |
abstract java.lang.String |
getRouteWithBracketLogicString()
|
ControllerResult |
haltTaxi()
|
void |
hold(Fix holdFix,
HoldingPattern holdingPattern)
Method called to direct the aircraft to follow a holding pattern. |
ControllerResult |
holdAt(GroundFix fix)
|
ControllerResult |
holdShort(GroundFix fix)
Must override to allow an aircraft to hold short of a ground fix. |
ControllerResult |
holdShort(GroundRunway rwy)
|
ControllerResult |
holdShort(Taxiway taxiway)
Must override to allow an aircraft to hold short of a taxiway. |
void |
joinGroundRoute()
|
ControllerResult |
killNextHold(HoldMarker type)
|
void |
leaveSegment()
|
void |
leftTurn(TrueHeading targetHdg)
Change the heading of the aircraft by turning left until the specified true heading is achieved. |
void |
maintainAltRate(AltitudeRate altRate,
boolean notifyOnFailure)
Method used to command an aircraft to maintain a constant vertical speed (altRate) |
void |
missApproach()
Method called to direct the aircraft to abort the landing. |
void |
newAltitude(Altitude targetAlt)
Must override to allow a standard altitude change. |
void |
newHeading(TrueHeading targetHdg)
Change the heading of the aircraft to a new heading. |
void |
newRoute(Route route)
Causes this aircraft to capture this route |
void |
newRoute(Route route,
Fix captureFix)
Capture and follow this route through this capture fix. |
void |
newRoute(Route route,
TrueHeading headingToRoute)
Instructs aircraft to follow the specified heading until the specified route is intercepted, then to follow the route thereafter. |
void |
newSpeed(GenericSpeed speed,
boolean maxRateDecel)
Instructs an aircraft to change the speed. |
ControllerResult |
reroute(java.lang.String destination,
java.lang.String via)
|
void |
resumeSpeed()
Instructs the aircraft to resume its normal speed. |
ControllerResult |
resumeTaxi()
|
void |
rightTurn(TrueHeading targetHdg)
Change the heading of the aircraft by turning right until the specified true heading is achieved. |
ControllerResult |
setClearedForTakeoff(boolean cleared)
|
java.lang.String |
setEnforceNavigationLimits(boolean enforce,
AcType type)
Set whether to force an aircraft to obey the limits of its navigation equipment when following a route |
ControllerResult |
takeOffPositionHold()
Get into takeoff position on departure runway and await further instructions |
protected ControllerResult |
unavailable()
|
protected java.lang.String |
unavailableMessage()
|
protected UnableToComplyException |
undefinedControlAction(java.lang.String methodName)
This is the default action to execute when a control action is not defined for this Controller. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CVS_VERSION_ID
private final java.lang.String unavailableMsg
private final ControllerResult notAvailable
| Constructor Detail |
|---|
protected Controller(Dynamics dynamics)
| Method Detail |
|---|
protected ControllerResult unavailable()
protected java.lang.String unavailableMessage()
public abstract Route getRoute()
public abstract RouteSegment getCurrentSegment()
public abstract java.lang.String getRouteString()
public abstract java.lang.String getRouteWithBracketLogicString()
public Route getPreviousRoute()
protected UnableToComplyException undefinedControlAction(java.lang.String methodName)
Redefining this method in Controller subclasses, will redefine the default action for all undefined control methods.
methodName - String describing the method called.
public void cancelAltitudeConstraints()
public void cancelRouteConstraints()
public void cancelSpeedConstraints()
public void clearForILSApproach(Runway arrRwy)
throws UnableToComplyException
arrRwy - The arrival runway for the ILS approach.
UnableToComplyException - - is thrown if unable to comply
public void clearForRNavApproach(Aircraft aircraft,
Runway arrRwy)
throws UnableToComplyException
aircraft - The aircraft to clear for the RNAV approach.arrRwy - The arrival runway for the RNAV approach.
UnableToComplyException - Can not perform an RNAV approach.
public void captureLocalizer(Runway arrRwy)
throws UnableToComplyException
arrRwy - The arrival runway for the localizer.
UnableToComplyException - If unable to comply.
public void descendGlideSlope(Runway arrRwy)
throws UnableToComplyException
arrRwy - The arrival runway for the glide slope.
UnableToComplyException - If unable to comply.
public void newAltitude(Altitude targetAlt)
throws UnableToComplyException
targetAlt - Altitude to climb/descend to.
UnableToComplyException
public java.lang.String expediteThroughAlt(Altitude expediteAlt)
throws UnableToComplyException
expediteAlt - Altitude to expedite to.
UnableToComplyException - If unable to expedite.
public void followOn(MagneticHeading heading)
throws UnableToComplyException
heading - - the heading to go to after the current profile finishes
UnableToComplyException - - is thrown if aircraft is unable to do
public void followAt(GenericSpeed followOnSpeed,
boolean maxRateDecel,
Fix fix,
Position currPos)
throws UnableToComplyException
followOnSpeed - - speed to go to after current profile finishes.maxRateDecel - - Whether speed chg should be a max rate deceleration.fix - - where to start next profilecurrPos - - the aircraft's current position
UnableToComplyException - - is thrown if aircraft is unable to do
public void followAt(Altitude followOnAltitude,
Fix fix,
Position currPos)
throws UnableToComplyException
followOnAltitude - - the altitude to go to after finished current profilefix - - where to start next profilecurrPos - - the current position
UnableToComplyException - - is thrown if aircraft is unable to do
public void followOn(Altitude followOnAltitude)
throws UnableToComplyException
followOnAltitude - Altitude to go to after current profile finishes.
UnableToComplyException
public void followOn(GenericSpeed followOnSpeed,
boolean maxRateDecel)
throws UnableToComplyException
followOnSpeed - Speed to go to after current profile finishes.maxRateDecel - Whether speed chg should be a max rate deceleration.
UnableToComplyException
public void addSimEvent(SimEventPredicate pred,
CommandLine commandLine,
Scenario scenario,
Acid acid)
throws UnableToComplyException
pred - Determines when the SimEvent is triggered.commandLine - - the command line to execute.scenario - The scenario of this aircraft.acid - - the acid.
UnableToComplyException - Aircraft is unable to add simevent.
public void newHeading(TrueHeading targetHdg)
throws UnableToComplyException
targetHdg - The desired true heading for the aircraft.
UnableToComplyException
public void leftTurn(TrueHeading targetHdg)
throws UnableToComplyException
targetHdg - The desired true heading for the aircraft.
UnableToComplyException
public void rightTurn(TrueHeading targetHdg)
throws UnableToComplyException
targetHdg - The desired true heading for the aircraft.
UnableToComplyException
public void newSpeed(GenericSpeed speed,
boolean maxRateDecel)
throws UnableToComplyException
speed - Speed that the sim pilot requested the aircraft follow.maxRateDecel - Whether speed chg should be a max rate deceleration.
UnableToComplyException - - is thrown if unable to comply
public void maintainAltRate(AltitudeRate altRate,
boolean notifyOnFailure)
throws UnableToComplyException
altRate - The altitude rate to maintain.notifyOnFailure - - whether to send prompt to SPW to notify
controller if command fails
UnableToComplyException
public java.lang.String crossFix(Fix fix,
AltitudeRestriction altRestr,
GenericSpeed speedRestr)
throws FixNotOnRouteException,
UnableToComplyException
fix - Fix for the aircraft to cross.altRestr - Altitude restriction for crossing fix (null if none).speedRestr - Speed restriction for crossing fix (null if none).
FixNotOnRouteException - The fix is not on the route.
UnableToComplyException - Fix is not visible to ac's nav equip.
public void followTrack(Track track)
throws UnableToComplyException
track - The track for the aircraft to follow.
UnableToComplyException - If tracked aircraft is not visible.
public void directFix(Fix fix)
throws UnableToComplyException
fix - The fix for the aircraft to go to.
UnableToComplyException - See error text for failure reason.
public void newRoute(Route route)
throws UnableToComplyException
route - The route to capture.
UnableToComplyException
public void newRoute(Route route,
Fix captureFix)
throws FixNotOnRouteException,
UnableToComplyException
route - The route to capture and follow.captureFix - Capture this route at this fix.
FixNotOnRouteException - if captureFix is not on route
UnableToComplyException
public void newRoute(Route route,
TrueHeading headingToRoute)
throws UnableToComplyException
route - The intercepting route.headingToRoute - Heading pointing in the route direction.
UnableToComplyException - Heading does not intercept the route.
public void resumeSpeed()
throws UnableToComplyException
UnableToComplyException
public void missApproach()
throws UnableToComplyException
UnableToComplyException
public void hold(Fix holdFix,
HoldingPattern holdingPattern)
throws FixNotOnRouteException,
UnableToComplyException
holdFix - The Fix to hold at.holdingPattern - Instructions for following a holding pattern.
FixNotOnRouteException - Fix is not on the route.
UnableToComplyException
public void disableGps()
throws UnableToComplyException
UnableToComplyException
public void enableGps()
throws UnableToComplyException
UnableToComplyExceptionpublic ControllerResult resumeTaxi()
public ControllerResult haltTaxi()
public ControllerResult setClearedForTakeoff(boolean cleared)
cleared - public ControllerResult holdAt(GroundFix fix)
fix - public ControllerResult holdShort(GroundRunway rwy)
rwy - public ControllerResult holdShort(GroundFix fix)
fix - The ground fix to hold short of.public ControllerResult holdShort(Taxiway taxiway)
taxiway - The taxiway to hold short of.public ControllerResult takeOffPositionHold()
public ControllerResult reroute(java.lang.String destination,
java.lang.String via)
destination - via - public ControllerResult killNextHold(HoldMarker type)
type -
public java.lang.String setEnforceNavigationLimits(boolean enforce,
AcType type)
enforce - - the new settingtype - - the type of aircraft.
public boolean getEnforceNavigationLimits()
public void joinGroundRoute()
public void leaveSegment()
public Altitude getExpeditedDescentCapture(Position crossPos)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||