This class also encapsulates the identical "system" and "autopilot" capability.
owns and contains the list of FGFCSComponents that define a system or systems for the modeled aircraft. The config file for the aircraft contains a description of the control path that starts at an input or command and ends at an effector, e.g. an aerosurface. The FCS components which comprise the control laws for an axis are defined sequentially in the configuration file. For instance, for the X-15:
In the above case we can see the first few components of the pitch channel defined. The input to the first component (a summer), as can be seen in the "Pitch trim sum" component, is really the sum of two parameters: elevator command (from the stick - a pilot input), and pitch trim. The next component created is an aerosurface scale component - a type of gain (see the LoadFCS() method for insight on how the various types of components map into the actual component classes). This continues until the final component for an axis when the <output> element is usually used to specify where the output is supposed to go. See the individual components for more information on how they are mechanized.
Another option for the flight controls portion of the config file is that in addition to using the "NAME" attribute in,
In this case, the FCS would be read in from another file.
|
Public Types |
| enum | SystemType { stFCS,
stSystem,
stAutoPilot
} |
Public Member Functions |
|
void | AddGear (void) |
|
void | AddThrottle (void) |
| | FGFCS (FGFDMExec *) |
| | Constructor.
|
|
ifstream * | FindSystemFile (string system_filename) |
|
string | FindSystemFullPathname (string system_filename) |
| string | GetComponentStrings (string delimeter) |
| | Retrieves all component names for inclusion in output stream.
|
| string | GetComponentValues (string delimeter) |
| | Retrieves all component outputs for inclusion in output stream.
|
|
double | GetDt (void) |
|
FGPropertyManager * | GetPropertyManager (void) |
| FGState * | GetState (void) |
| | Retrieves the State object pointer.
|
|
bool | InitModel (void) |
| bool | Load (Element *el, SystemType systype) |
| | Loads the Flight Control System.
|
| bool | Run (void) |
| | Runs the Flight Controls model; called by the Executive.
|
|
| ~FGFCS () |
| | Destructor.
|
|
| double | GetBrake (FGLGear::BrakeGroup bg) |
| | Gets the brake for a specified group.
|
| double | GetCBrake (void) const |
| | Gets the center brake.
|
| double | GetLBrake (void) const |
| | Gets the left brake.
|
| double | GetRBrake (void) const |
| | Gets the right brake.
|
| void | SetCBrake (double cmd) |
| | Sets the center brake group.
|
| void | SetLBrake (double cmd) |
| | Sets the left brake group.
|
| void | SetRBrake (double cmd) |
| | Sets the right brake group.
|
|
| double | GetDaCmd (void) const |
| | Gets the aileron command.
|
| double | GetDeCmd (void) const |
| | Gets the elevator command.
|
| double | GetDfCmd (void) const |
| | Gets the flaps command.
|
| double | GetDrCmd (void) const |
| | Gets the rudder command.
|
| double | GetDsbCmd (void) const |
| | Gets the speedbrake command.
|
| double | GetDsCmd (void) const |
| | Gets the steering command.
|
| double | GetDspCmd (void) const |
| | Gets the spoiler command.
|
| bool | GetFeatherCmd (int engine) const |
| | Gets the prop feather command.
|
| double | GetGearCmd (void) const |
| | Get the gear extend/retract command.
|
| double | GetMixtureCmd (int engine) const |
| | Gets the mixture command.
|
| double | GetPitchTrimCmd (void) const |
| | Gets the pitch trim command.
|
| double | GetPropAdvanceCmd (int engine) const |
| | Gets the prop pitch command.
|
| double | GetRollTrimCmd (void) const |
| | Gets the aileron trim command.
|
| double | GetThrottleCmd (int engine) const |
| | Gets the throttle command.
|
| double | GetYawTrimCmd (void) const |
| | Gets the rudder trim command.
|
|
| double | GetDaLPos (int form=ofRad) const |
| | Gets the left aileron position.
|
|
| double | GetDaRPos (int form=ofRad) const |
| | Gets the right aileron position.
|
| double | GetDePos (int form=ofRad) const |
| | Gets the elevator position.
|
| double | GetDfPos (int form=ofRad) const |
| | Gets the flaps position.
|
| double | GetDrPos (int form=ofRad) const |
| | Gets the rudder position.
|
| double | GetDsbPos (int form=ofRad) const |
| | Gets the speedbrake position.
|
| double | GetDspPos (int form=ofRad) const |
| | Gets the spoiler position.
|
| double | GetGearPos (void) const |
| | Gets the gear position (0 up, 1 down), defaults to down.
|
| double | GetMixturePos (int engine) const |
| | Gets the mixture position.
|
| double | GetPropAdvance (int engine) const |
| | Gets the prop pitch position.
|
| bool | GetPropFeather (int engine) const |
| | Gets the prop feather position.
|
| double | GetSteerPosDeg (int gear) const |
| | Gets the steering position.
|
| double | GetTailhookPos (void) const |
| | Gets the tailhook position (0 up, 1 down).
|
| double | GetThrottlePos (int engine) const |
| | Gets the throttle position.
|
| double | GetWingFoldPos (void) const |
| | Gets the wing fold position (0 unfolded, 1 folded).
|
|
| void | SetDaCmd (double cmd) |
| | Sets the aileron command.
|
| void | SetDeCmd (double cmd) |
| | Sets the elevator command.
|
| void | SetDfCmd (double cmd) |
| | Sets the flaps command.
|
| void | SetDrCmd (double cmd) |
| | Sets the rudder command.
|
| void | SetDsbCmd (double cmd) |
| | Sets the speedbrake command.
|
| void | SetDsCmd (double cmd) |
| | Sets the steering command.
|
| void | SetDspCmd (double cmd) |
| | Sets the spoilers command.
|
| void | SetFeatherCmd (int engine, bool cmd) |
| | Sets the propeller feather command for the specified engine.
|
| void | SetGearCmd (double gearcmd) |
| | Set the gear extend/retract command, defaults to down.
|
| void | SetMixtureCmd (int engine, double cmd) |
| | Sets the mixture command for the specified engine.
|
| void | SetPitchTrimCmd (double cmd) |
| | Sets the pitch trim command.
|
| void | SetPropAdvanceCmd (int engine, double cmd) |
| | Sets the propeller pitch command for the specified engine.
|
| void | SetRollTrimCmd (double cmd) |
| | Sets the aileron trim command.
|
| void | SetThrottleCmd (int engine, double cmd) |
| | Sets the throttle command for the specified engine.
|
| void | SetYawTrimCmd (double cmd) |
| | Sets the rudder trim command.
|
|
| void | SetDaLPos (int form, double pos) |
| | Sets the left aileron position.
|
| void | SetDaRPos (int form, double pos) |
| | Sets the right aileron position.
|
| void | SetDePos (int form, double pos) |
| | Sets the elevator position.
|
| void | SetDfPos (int form, double pos) |
| | Sets the flaps position.
|
| void | SetDrPos (int form, double pos) |
| | Sets the rudder position.
|
| void | SetDsbPos (int form, double pos) |
| | Sets the speedbrake position.
|
| void | SetDspPos (int form, double pos) |
| | Sets the spoiler position.
|
| void | SetGearPos (double gearpos) |
| | Set the gear extend/retract position, defaults to down.
|
| void | SetMixturePos (int engine, double cmd) |
| | Sets the actual mixture setting for the specified engine.
|
| void | SetPropAdvance (int engine, double cmd) |
| | Sets the actual prop pitch setting for the specified engine.
|
| void | SetPropFeather (int engine, bool cmd) |
| | Sets the actual prop feather setting for the specified engine.
|
| void | SetSteerPosDeg (int gear, double pos) |
| | Sets the steering position.
|
| void | SetTailhookPos (double hookpos) |
| | Set the tailhook position.
|
| void | SetThrottlePos (int engine, double cmd) |
| | Sets the actual throttle setting for the specified engine.
|
| void | SetWingFoldPos (double foldpos) |
| | Set the wing fold position.
|