JSBSim Flight Dynamics Model  1.0 (02 March 2017)
An Open Source Flight Dynamics and Control Software Library in C++
FGFCS Class Reference

Encapsulates the Flight Control System (FCS) functionality. More...

#include <FGFCS.h>

+ Inheritance diagram for FGFCS:
+ Collaboration diagram for FGFCS:

Public Types

enum  SystemType { stFCS, stSystem, stAutoPilot }
 
- Public Types inherited from FGJSBBase
enum  { eL = 1, eM, eN }
 Moments L, M, N.
 
enum  { eP = 1, eQ, eR }
 Rates P, Q, R.
 
enum  { eU = 1, eV, eW }
 Velocities U, V, W.
 
enum  { eX = 1, eY, eZ }
 Positions X, Y, Z.
 
enum  { ePhi = 1, eTht, ePsi }
 Euler angles Phi, Theta, Psi.
 
enum  { eDrag = 1, eSide, eLift }
 Stability axis forces, Drag, Side force, Lift.
 
enum  { eRoll = 1, ePitch, eYaw }
 Local frame orientation Roll, Pitch, Yaw.
 
enum  { eNorth = 1, eEast, eDown }
 Local frame position North, East, Down.
 
enum  { eLat = 1, eLong, eRad }
 Locations Radius, Latitude, Longitude.
 
enum  {
  inNone = 0, inDegrees, inRadians, inMeters,
  inFeet
}
 Conversion specifiers.
 

Public Member Functions

 FGFCS (FGFDMExec *)
 Constructor. More...
 
 ~FGFCS ()
 Destructor.
 
void AddThrottle (void)
 
SGPath FindFullPathName (const SGPath &path) const
 
double GetChannelDeltaT (void) const
 
std::string GetComponentStrings (const std::string &delimiter) const
 Retrieves all component names for inclusion in output stream. More...
 
std::string GetComponentValues (const std::string &delimiter) const
 Retrieves all component outputs for inclusion in output stream. More...
 
double GetDt (void) const
 
FGPropertyManagerGetPropertyManager (void)
 
bool GetTrimStatus (void) const
 
bool InitModel (void)
 
bool Load (Element *el)
 Loads the Flight Control System. More...
 
bool Run (bool Holding)
 Runs the Flight Controls model; called by the Executive Can pass in a value indicating if the executive is directing the simulation to Hold. More...
 
Pilot input command retrieval
double GetDaCmd (void) const
 Gets the aileron command. More...
 
double GetDeCmd (void) const
 Gets the elevator command. More...
 
double GetDrCmd (void) const
 Gets the rudder command. More...
 
double GetDsCmd (void) const
 Gets the steering command. More...
 
double GetDfCmd (void) const
 Gets the flaps command. More...
 
double GetDsbCmd (void) const
 Gets the speedbrake command. More...
 
double GetDspCmd (void) const
 Gets the spoiler command. More...
 
double GetThrottleCmd (int engine) const
 Gets the throttle command. More...
 
const std::vector< double > & GetThrottleCmd () const
 
double GetMixtureCmd (int engine) const
 Gets the mixture command. More...
 
const std::vector< double > & GetMixtureCmd () const
 
double GetPropAdvanceCmd (int engine) const
 Gets the prop pitch command. More...
 
bool GetFeatherCmd (int engine) const
 Gets the prop feather command. More...
 
double GetPitchTrimCmd (void) const
 Gets the pitch trim command. More...
 
double GetYawTrimCmd (void) const
 Gets the rudder trim command. More...
 
double GetRollTrimCmd (void) const
 Gets the aileron trim command. More...
 
double GetGearCmd (void) const
 Get the gear extend/retract command. More...
 
Aerosurface position retrieval
double GetDaLPos (int form=ofRad) const
 Gets the left aileron position. More...
 
double GetDaRPos (int form=ofRad) const
 Gets the right aileron position. More...
 
double GetDePos (int form=ofRad) const
 Gets the elevator position. More...
 
double GetDrPos (int form=ofRad) const
 Gets the rudder position. More...
 
double GetDsbPos (int form=ofRad) const
 Gets the speedbrake position. More...
 
double GetDspPos (int form=ofRad) const
 Gets the spoiler position. More...
 
double GetDfPos (int form=ofRad) const
 Gets the flaps position. More...
 
double GetThrottlePos (int engine) const
 Gets the throttle position. More...
 
const std::vector< double > & GetThrottlePos () const
 
double GetMixturePos (int engine) const
 Gets the mixture position. More...
 
const std::vector< double > & GetMixturePos () const
 
double GetGearPos (void) const
 Gets the gear position (0 up, 1 down), defaults to down. More...
 
double GetTailhookPos (void) const
 Gets the tailhook position (0 up, 1 down) More...
 
double GetWingFoldPos (void) const
 Gets the wing fold position (0 unfolded, 1 folded) More...
 
double GetPropAdvance (int engine) const
 Gets the prop pitch position. More...
 
const std::vector< double > & GetPropAdvance () const
 
bool GetPropFeather (int engine) const
 Gets the prop feather position. More...
 
const std::vector< bool > & GetPropFeather () const
 
Pilot input command setting
void SetDaCmd (double cmd)
 Sets the aileron command. More...
 
void SetDeCmd (double cmd)
 Sets the elevator command. More...
 
void SetDrCmd (double cmd)
 Sets the rudder command. More...
 
void SetDsCmd (double cmd)
 Sets the steering command. More...
 
void SetDfCmd (double cmd)
 Sets the flaps command. More...
 
void SetDsbCmd (double cmd)
 Sets the speedbrake command. More...
 
void SetDspCmd (double cmd)
 Sets the spoilers command. More...
 
void SetPitchTrimCmd (double cmd)
 Sets the pitch trim command. More...
 
void SetYawTrimCmd (double cmd)
 Sets the rudder trim command. More...
 
void SetRollTrimCmd (double cmd)
 Sets the aileron trim command. More...
 
void SetThrottleCmd (int engine, double cmd)
 Sets the throttle command for the specified engine. More...
 
void SetMixtureCmd (int engine, double cmd)
 Sets the mixture command for the specified engine. More...
 
void SetGearCmd (double gearcmd)
 Set the gear extend/retract command, defaults to down. More...
 
void SetPropAdvanceCmd (int engine, double cmd)
 Sets the propeller pitch command for the specified engine. More...
 
void SetFeatherCmd (int engine, bool cmd)
 Sets the propeller feather command for the specified engine. More...
 
Aerosurface position setting
void SetDaLPos (int form, double pos)
 Sets the left aileron position. More...
 
void SetDaRPos (int form, double pos)
 Sets the right aileron position. More...
 
void SetDePos (int form, double pos)
 Sets the elevator position. More...
 
void SetDrPos (int form, double pos)
 Sets the rudder position. More...
 
void SetDfPos (int form, double pos)
 Sets the flaps position. More...
 
void SetDsbPos (int form, double pos)
 Sets the speedbrake position. More...
 
void SetDspPos (int form, double pos)
 Sets the spoiler position. More...
 
void SetThrottlePos (int engine, double cmd)
 Sets the actual throttle setting for the specified engine. More...
 
void SetMixturePos (int engine, double cmd)
 Sets the actual mixture setting for the specified engine. More...
 
void SetGearPos (double gearpos)
 Set the gear extend/retract position, defaults to down. More...
 
void SetTailhookPos (double hookpos)
 Set the tailhook position. More...
 
void SetWingFoldPos (double foldpos)
 Set the wing fold position. More...
 
void SetPropAdvance (int engine, double cmd)
 Sets the actual prop pitch setting for the specified engine. More...
 
void SetPropFeather (int engine, bool cmd)
 Sets the actual prop feather setting for the specified engine. More...
 
Landing Gear brakes
void SetLBrake (double cmd)
 Sets the left brake group. More...
 
void SetRBrake (double cmd)
 Sets the right brake group. More...
 
void SetCBrake (double cmd)
 Sets the center brake group. More...
 
double GetBrake (FGLGear::BrakeGroup bg)
 Gets the brake for a specified group. More...
 
const std::vector< double > & GetBrakePos () const
 
double GetLBrake (void) const
 Gets the left brake. More...
 
double GetRBrake (void) const
 Gets the right brake. More...
 
double GetCBrake (void) const
 Gets the center brake. More...
 
- Public Member Functions inherited from FGModel
 FGModel (FGFDMExec *)
 Constructor.
 
virtual ~FGModel ()
 Destructor.
 
FGFDMExecGetExec (void)
 
unsigned int GetRate (void)
 Get the output rate for the model in frames.
 
void SetPropertyManager (FGPropertyManager *fgpm)
 
void SetRate (unsigned int tt)
 Set the ouput rate for the model in frames.
 
- Public Member Functions inherited from FGModelFunctions
std::string GetFunctionStrings (const std::string &delimeter) const
 Gets the strings for the current set of functions. More...
 
std::string GetFunctionValues (const std::string &delimeter) const
 Gets the function values. More...
 
FGFunctionGetPreFunction (const std::string &name)
 Get one of the "pre" function. More...
 
bool Load (Element *el, FGPropertyManager *PropertyManager, std::string prefix="")
 
void PostLoad (Element *el, FGPropertyManager *PropertyManager, std::string prefix="")
 
void PreLoad (Element *el, FGPropertyManager *PropertyManager, std::string prefix="")
 
void RunPostFunctions (void)
 
void RunPreFunctions (void)
 
- Public Member Functions inherited from FGJSBBase
 FGJSBBase ()
 Constructor for FGJSBBase.
 
virtual ~FGJSBBase ()
 Destructor for FGJSBBase.
 
void disableHighLighting (void)
 Disables highlighting in the console output.
 
std::string GetVersion (void)
 Returns the version number of JSBSim. More...
 
void PutMessage (const Message &msg)
 Places a Message structure on the Message queue. More...
 
void PutMessage (const std::string &text)
 Creates a message with the given text and places it on the queue. More...
 
void PutMessage (const std::string &text, bool bVal)
 Creates a message with the given text and boolean value and places it on the queue. More...
 
void PutMessage (const std::string &text, int iVal)
 Creates a message with the given text and integer value and places it on the queue. More...
 
void PutMessage (const std::string &text, double dVal)
 Creates a message with the given text and double value and places it on the queue. More...
 
int SomeMessages (void)
 Reads the message on the queue (but does not delete it). More...
 
void ProcessMessage (void)
 Reads the message on the queue and removes it from the queue. More...
 
MessageProcessNextMessage (void)
 Reads the next message on the queue and removes it from the queue. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FGJSBBase
static double CelsiusToFahrenheit (double celsius)
 Converts from degrees Celsius to degrees Fahrenheit. More...
 
static double CelsiusToKelvin (double celsius)
 Converts from degrees Celsius to degrees Kelvin. More...
 
static double CelsiusToRankine (double celsius)
 Converts from degrees Celsius to degrees Rankine. More...
 
static double Constrain (double min, double value, double max)
 Constrain a value between a minimum and a maximum value.
 
static bool EqualToRoundoff (double a, double b)
 Finite precision comparison. More...
 
static bool EqualToRoundoff (float a, float b)
 Finite precision comparison. More...
 
static bool EqualToRoundoff (float a, double b)
 Finite precision comparison. More...
 
static bool EqualToRoundoff (double a, float b)
 Finite precision comparison. More...
 
static double FahrenheitToCelsius (double fahrenheit)
 Converts from degrees Fahrenheit to degrees Celsius. More...
 
static double FeetToMeters (double measure)
 Converts from feet to meters. More...
 
static double GaussianRandomNumber (void)
 
static double KelvinToCelsius (double kelvin)
 Converts from degrees Kelvin to degrees Celsius. More...
 
static double KelvinToFahrenheit (double kelvin)
 Converts from degrees Kelvin to degrees Fahrenheit. More...
 
static double KelvinToRankine (double kelvin)
 Converts from degrees Kelvin to degrees Rankine. More...
 
static double MachFromVcalibrated (double vcas, double p, double psl, double rhosl)
 Calculate the Mach number from the calibrated airspeed. More...
 
static double PitotTotalPressure (double mach, double p)
 Compute the total pressure in front of the Pitot tube. More...
 
static double RankineToCelsius (double rankine)
 Converts from degrees Rankine to degrees Celsius. More...
 
static double RankineToKelvin (double rankine)
 Converts from degrees Rankine to degrees Kelvin. More...
 
static double sign (double num)
 
static double VcalibratedFromMach (double mach, double p, double psl, double rhosl)
 Calculate the calibrated airspeed from the Mach number. More...
 
- Public Attributes inherited from FGModel
std::string Name
 
- Static Public Attributes inherited from FGJSBBase
static short debug_lvl = 1
 
static char highint [5] = {27, '[', '1', 'm', '\0' }
 highlights text
 
static char halfint [5] = {27, '[', '2', 'm', '\0' }
 low intensity text
 
static char normint [6] = {27, '[', '2', '2', 'm', '\0' }
 normal intensity text
 
static char reset [5] = {27, '[', '0', 'm', '\0' }
 resets text properties
 
static char underon [5] = {27, '[', '4', 'm', '\0' }
 underlines text
 
static char underoff [6] = {27, '[', '2', '4', 'm', '\0' }
 underline off
 
static char fgblue [6] = {27, '[', '3', '4', 'm', '\0' }
 blue text
 
static char fgcyan [6] = {27, '[', '3', '6', 'm', '\0' }
 cyan text
 
static char fgred [6] = {27, '[', '3', '1', 'm', '\0' }
 red text
 
static char fggreen [6] = {27, '[', '3', '2', 'm', '\0' }
 green text
 
static char fgdef [6] = {27, '[', '3', '9', 'm', '\0' }
 default text
 
- Protected Member Functions inherited from FGJSBBase
void Debug (int)
 
- Static Protected Member Functions inherited from FGJSBBase
static std::string CreateIndexedPropertyName (const std::string &Property, int index)
 
- Protected Attributes inherited from FGModel
unsigned int exe_ctr
 
FGFDMExecFDMExec
 
FGPropertyManagerPropertyManager
 
unsigned int rate
 
- Protected Attributes inherited from FGModelFunctions
FGPropertyReader LocalProperties
 
std::vector< FGFunction * > PostFunctions
 
std::vector< FGFunction * > PreFunctions
 
- Static Protected Attributes inherited from FGJSBBase
static const double degtorad = 0.017453292519943295769236907684886
 
static const double fpstokts = 1.0/ktstofps
 
static const double fttom = 0.3048
 
static int gaussian_random_number_phase = 0
 
static const double hptoftlbssec = 550.0
 
static const double in3tom3 = 1.638706E-5
 
static const double inchtoft = 0.08333333
 
static const double inhgtopa = 3386.38
 
static const std::string JSBSim_version = "1.0 " __DATE__ " " __TIME__
 
static const double kgtolb = 2.20462
 
static const double kgtoslug = 0.06852168
 
static const double ktstofps = 1.68781
 
static const double lbtoslug = 1.0/slugtolb
 
static Message localMsg
 
static const double m3toft3 = 1.0/(fttom*fttom*fttom)
 
static double Mair = 28.9645
 
static unsigned int messageId = 0
 
static std::queue< MessageMessages
 
static const std::string needed_cfg_version = "2.0"
 
static const double psftoinhg = 0.014138
 
static const double psftopa = 47.88
 
static const double radtodeg = 57.295779513082320876798154814105
 
static double Reng = 1716.56
 
static double Rstar = 1545.348
 
static const double SHRatio = 1.40
 
static const double slugtolb = 32.174049
 

Detailed Description

Encapsulates the Flight Control System (FCS) functionality.

This class also encapsulates the identical "system" and "autopilot" capability. FGFCS 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:

<flight_control name="X-15 SAS">
<channel>
<summer name="Pitch Trim Sum">
<input> fcs/elevator-cmd-norm </input>
<input> fcs/pitch-trim-cmd-norm </input>
<clipto>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<aerosurface_scale name="Pitch Command Scale">
<input> fcs/pitch-trim-sum </input>
<range>
<min> -50 </min>
<max> 50 </max>
</range>
</aerosurface_scale>
... etc.

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,

<flight_control name="X-15 SAS">

one can also supply a filename:

<flight_control name="X-15 SAS" file="X15.xml">
</flight_control>

In this case, the FCS would be read in from another file.

Properties

  • fcs/aileron-cmd-norm normalized aileron command
  • fcs/elevator-cmd-norm normalized elevator command
  • fcs/rudder-cmd-norm
  • fcs/steer-cmd-norm
  • fcs/flap-cmd-norm
  • fcs/speedbrake-cmd-norm
  • fcs/spoiler-cmd-norm
  • fcs/pitch-trim-cmd-norm
  • fcs/roll-trim-cmd-norm
  • fcs/yaw-trim-cmd-norm
  • gear/gear-cmd-norm
  • fcs/left-aileron-pos-rad
  • fcs/left-aileron-pos-deg
  • fcs/left-aileron-pos-norm
  • fcs/mag-left-aileron-pos-rad
  • fcs/right-aileron-pos-rad
  • fcs/right-aileron-pos-deg
  • fcs/right-aileron-pos-norm
  • fcs/mag-right-aileron-pos-rad
  • fcs/elevator-pos-rad
  • fcs/elevator-pos-deg
  • fcs/elevator-pos-norm
  • fcs/mag-elevator-pos-rad
  • fcs/rudder-pos-rad
  • fcs/rudder-pos-deg
  • fcs/rudder-pos-norm
  • fcs/mag-rudder-pos-rad
  • fcs/flap-pos-rad
  • fcs/flap-pos-deg
  • fcs/flap-pos-norm
  • fcs/speedbrake-pos-rad
  • fcs/speedbrake-pos-deg
  • fcs/speedbrake-pos-norm
  • fcs/mag-speedbrake-pos-rad
  • fcs/spoiler-pos-rad
  • fcs/spoiler-pos-deg
  • fcs/spoiler-pos-norm
  • fcs/mag-spoiler-pos-rad
  • fcs/wing-fold-pos-norm
  • gear/gear-pos-norm
  • gear/tailhook-pos-norm
Author
Jon S. Berndt
Version
Revision
1.54
See also
FGActuator
FGDeadBand
FGFCSFunction
FGFilter
FGGain
FGKinemat
FGPID
FGSensor
FGSummer
FGSwitch
FGWaypoint
FGAngles
FGFCSComponent
Element
FGDistributor

Definition at line 193 of file FGFCS.h.

Constructor & Destructor Documentation

◆ FGFCS()

FGFCS ( FGFDMExec fdm)

Constructor.

Parameters
Executivea pointer to the parent executive object

Definition at line 80 of file FGFCS.cpp.

80  : FGModel(fdm), ChannelRate(1)
81 {
82  int i;
83  Name = "FGFCS";
84  systype = stFCS;
85 
86  fdmex = fdm;
87  DaCmd = DeCmd = DrCmd = DfCmd = DsbCmd = DspCmd = 0;
88  PTrimCmd = YTrimCmd = RTrimCmd = 0.0;
89  GearCmd = GearPos = 1; // default to gear down
90  BrakePos.resize(FGLGear::bgNumBrakeGroups);
91  TailhookPos = WingFoldPos = 0.0;
92 
93  bind();
94  for (i=0;i<NForms;i++) {
95  DePos[i] = DaLPos[i] = DaRPos[i] = DrPos[i] = 0.0;
96  DfPos[i] = DsbPos[i] = DspPos[i] = 0.0;
97  }
98 
99  Debug(0);
100 }
FGModel(FGFDMExec *)
Constructor.
Definition: FGModel.cpp:60

Member Function Documentation

◆ GetBrake()

double GetBrake ( FGLGear::BrakeGroup  bg)

Gets the brake for a specified group.

Parameters
bgwhich brakegroup to retrieve the command for
Returns
the brake setting for the supplied brake group argument

Definition at line 598 of file FGFCS.cpp.

599 {
600  return BrakePos[bg];
601 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCBrake()

double GetCBrake ( void  ) const
inline

Gets the center brake.

Returns
the center brake setting.

Definition at line 536 of file FGFCS.h.

536 {return BrakePos[FGLGear::bgCenter];}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetComponentStrings()

string GetComponentStrings ( const std::string &  delimiter) const

Retrieves all component names for inclusion in output stream.

Parameters
delimitereither a tab or comma string depending on output type
Returns
a string containing the descriptive names for all components

Definition at line 618 of file FGFCS.cpp.

619 {
620  string CompStrings = "";
621  bool firstime = true;
622  int total_count=0;
623 
624  for (unsigned int i=0; i<SystemChannels.size(); i++)
625  {
626  for (unsigned int c=0; c<SystemChannels[i]->GetNumComponents(); c++)
627  {
628  if (firstime) firstime = false;
629  else CompStrings += delimiter;
630 
631  CompStrings += SystemChannels[i]->GetComponent(c)->GetName();
632  total_count++;
633  }
634  }
635 
636  return CompStrings;
637 }
+ Here is the caller graph for this function:

◆ GetComponentValues()

string GetComponentValues ( const std::string &  delimiter) const

Retrieves all component outputs for inclusion in output stream.

Parameters
delimitereither a tab or comma string depending on output type
Returns
a string containing the numeric values for the current set of component outputs

Definition at line 641 of file FGFCS.cpp.

642 {
643  std::ostringstream buf;
644 
645  bool firstime = true;
646  int total_count=0;
647 
648  for (unsigned int i=0; i<SystemChannels.size(); i++)
649  {
650  for (unsigned int c=0; c<SystemChannels[i]->GetNumComponents(); c++)
651  {
652  if (firstime) firstime = false;
653  else buf << delimiter;
654 
655  buf << setprecision(9) << SystemChannels[i]->GetComponent(c)->GetOutput();
656  total_count++;
657  }
658  }
659 
660  return buf.str();
661 }
+ Here is the caller graph for this function:

◆ GetDaCmd()

double GetDaCmd ( void  ) const
inline

Gets the aileron command.

Returns
aileron command in range from -1.0 - 1.0

Definition at line 218 of file FGFCS.h.

218 { return DaCmd; }
+ Here is the caller graph for this function:

◆ GetDaLPos()

double GetDaLPos ( int  form = ofRad) const
inline

Gets the left aileron position.

Returns
aileron position in radians

Definition at line 290 of file FGFCS.h.

291  { return DaLPos[form]; }
+ Here is the caller graph for this function:

◆ GetDaRPos()

double GetDaRPos ( int  form = ofRad) const
inline

Gets the right aileron position.

Returns
aileron position in radians

Definition at line 295 of file FGFCS.h.

296  { return DaRPos[form]; }
+ Here is the caller graph for this function:

◆ GetDeCmd()

double GetDeCmd ( void  ) const
inline

Gets the elevator command.

Returns
elevator command in range from -1.0 - 1.0

Definition at line 222 of file FGFCS.h.

222 { return DeCmd; }
+ Here is the caller graph for this function:

◆ GetDePos()

double GetDePos ( int  form = ofRad) const
inline

Gets the elevator position.

Returns
elevator position in radians

Definition at line 300 of file FGFCS.h.

301  { return DePos[form]; }
+ Here is the caller graph for this function:

◆ GetDfCmd()

double GetDfCmd ( void  ) const
inline

Gets the flaps command.

Returns
flaps command in range from 0 to 1.0

Definition at line 234 of file FGFCS.h.

234 { return DfCmd; }
+ Here is the caller graph for this function:

◆ GetDfPos()

double GetDfPos ( int  form = ofRad) const
inline

Gets the flaps position.

Returns
flaps position in radians

Definition at line 320 of file FGFCS.h.

321  { return DfPos[form]; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDrCmd()

double GetDrCmd ( void  ) const
inline

Gets the rudder command.

Returns
rudder command in range from -1.0 - 1.0

Definition at line 226 of file FGFCS.h.

226 { return DrCmd; }
+ Here is the caller graph for this function:

◆ GetDrPos()

double GetDrPos ( int  form = ofRad) const
inline

Gets the rudder position.

Returns
rudder position in radians

Definition at line 305 of file FGFCS.h.

306  { return DrPos[form]; }
+ Here is the caller graph for this function:

◆ GetDsbCmd()

double GetDsbCmd ( void  ) const
inline

Gets the speedbrake command.

Returns
speedbrake command in range from 0 to 1.0

Definition at line 238 of file FGFCS.h.

238 { return DsbCmd; }
+ Here is the caller graph for this function:

◆ GetDsbPos()

double GetDsbPos ( int  form = ofRad) const
inline

Gets the speedbrake position.

Returns
speedbrake position in radians

Definition at line 310 of file FGFCS.h.

311  { return DsbPos[form]; }
+ Here is the caller graph for this function:

◆ GetDsCmd()

double GetDsCmd ( void  ) const
inline

Gets the steering command.

Returns
steering command in range from -1.0 - 1.0

Definition at line 230 of file FGFCS.h.

230 { return fdmex->GetGroundReactions()->GetDsCmd(); }
FGGroundReactions * GetGroundReactions(void)
Returns the FGGroundReactions pointer.
Definition: FGFDMExec.h:361
double GetDsCmd(void) const
Gets the steering command.
+ Here is the call graph for this function:

◆ GetDspCmd()

double GetDspCmd ( void  ) const
inline

Gets the spoiler command.

Returns
spoiler command in range from 0 to 1.0

Definition at line 242 of file FGFCS.h.

242 { return DspCmd; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDspPos()

double GetDspPos ( int  form = ofRad) const
inline

Gets the spoiler position.

Returns
spoiler position in radians

Definition at line 315 of file FGFCS.h.

316  { return DspPos[form]; }
+ Here is the caller graph for this function:

◆ GetFeatherCmd()

bool GetFeatherCmd ( int  engine) const
inline

Gets the prop feather command.

Parameters
engineengine ID number
Returns
feather command for the given engine (on / off)

Definition at line 266 of file FGFCS.h.

266 { return PropFeatherCmd[engine]; }
+ Here is the caller graph for this function:

◆ GetGearCmd()

double GetGearCmd ( void  ) const
inline

Get the gear extend/retract command.

0 commands gear up, 1 down. defaults to down.

Returns
the current value of the gear extend/retract command

Definition at line 283 of file FGFCS.h.

283 { return GearCmd; }
+ Here is the caller graph for this function:

◆ GetGearPos()

double GetGearPos ( void  ) const
inline

Gets the gear position (0 up, 1 down), defaults to down.

Returns
gear position (0 up, 1 down)

Definition at line 339 of file FGFCS.h.

339 { return GearPos; }
+ Here is the caller graph for this function:

◆ GetLBrake()

double GetLBrake ( void  ) const
inline

Gets the left brake.

Returns
the left brake setting.

Definition at line 528 of file FGFCS.h.

528 {return BrakePos[FGLGear::bgLeft];}
+ Here is the caller graph for this function:

◆ GetMixtureCmd()

double GetMixtureCmd ( int  engine) const
inline

Gets the mixture command.

Parameters
engineengine ID number
Returns
mixture command in range from 0 - 1.0 for the given engine

Definition at line 254 of file FGFCS.h.

254 { return MixtureCmd[engine]; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMixturePos()

double GetMixturePos ( int  engine) const
inline

Gets the mixture position.

Parameters
engineengine ID number
Returns
mixture position for the given engine in range from 0 - 1.0

Definition at line 333 of file FGFCS.h.

333 { return MixturePos[engine]; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPitchTrimCmd()

double GetPitchTrimCmd ( void  ) const
inline

Gets the pitch trim command.

Returns
pitch trim command in range from -1.0 to 1.0

Definition at line 270 of file FGFCS.h.

270 { return PTrimCmd; }
+ Here is the caller graph for this function:

◆ GetPropAdvance()

double GetPropAdvance ( int  engine) const
inline

Gets the prop pitch position.

Parameters
engineengine ID number
Returns
prop pitch position for the given engine in range from 0 - 1.0

Definition at line 352 of file FGFCS.h.

352 { return PropAdvance[engine]; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPropAdvanceCmd()

double GetPropAdvanceCmd ( int  engine) const
inline

Gets the prop pitch command.

Parameters
engineengine ID number
Returns
pitch command in range from 0.0 - 1.0 for the given engine

Definition at line 261 of file FGFCS.h.

261 { return PropAdvanceCmd[engine]; }
+ Here is the caller graph for this function:

◆ GetPropFeather()

bool GetPropFeather ( int  engine) const
inline

Gets the prop feather position.

Parameters
engineengine ID number
Returns
prop fether for the given engine (on / off)

Definition at line 359 of file FGFCS.h.

359 { return PropFeather[engine]; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRBrake()

double GetRBrake ( void  ) const
inline

Gets the right brake.

Returns
the right brake setting.

Definition at line 532 of file FGFCS.h.

532 {return BrakePos[FGLGear::bgRight];}
+ Here is the caller graph for this function:

◆ GetRollTrimCmd()

double GetRollTrimCmd ( void  ) const
inline

Gets the aileron trim command.

Returns
aileron trim command in range from -1.0 - 1.0

Definition at line 278 of file FGFCS.h.

278 { return RTrimCmd; }
+ Here is the caller graph for this function:

◆ GetTailhookPos()

double GetTailhookPos ( void  ) const
inline

Gets the tailhook position (0 up, 1 down)

Returns
tailhook position (0 up, 1 down)

Definition at line 343 of file FGFCS.h.

343 { return TailhookPos; }
+ Here is the caller graph for this function:

◆ GetThrottleCmd()

double GetThrottleCmd ( int  engine) const

Gets the throttle command.

Parameters
engineengine ID number
Returns
throttle command in range from 0 - 1.0 for the given engine

Definition at line 359 of file FGFCS.cpp.

360 {
361  if (engineNum < (int)ThrottlePos.size()) {
362  if (engineNum < 0) {
363  cerr << "Cannot get throttle value for ALL engines" << endl;
364  } else {
365  return ThrottleCmd[engineNum];
366  }
367  } else {
368  cerr << "Throttle " << engineNum << " does not exist! " << ThrottleCmd.size()
369  << " engines exist, but throttle setting for engine " << engineNum
370  << " is selected" << endl;
371  }
372  return 0.0;
373 }
+ Here is the caller graph for this function:

◆ GetThrottlePos()

double GetThrottlePos ( int  engine) const

Gets the throttle position.

Parameters
engineengine ID number
Returns
throttle position for the given engine in range from 0 - 1.0

Definition at line 377 of file FGFCS.cpp.

378 {
379  if (engineNum < (int)ThrottlePos.size()) {
380  if (engineNum < 0) {
381  cerr << "Cannot get throttle value for ALL engines" << endl;
382  } else {
383  return ThrottlePos[engineNum];
384  }
385  } else {
386  cerr << "Throttle " << engineNum << " does not exist! " << ThrottlePos.size()
387  << " engines exist, but attempted throttle position setting is for engine "
388  << engineNum << endl;
389  }
390  return 0.0;
391 }
+ Here is the caller graph for this function:

◆ GetWingFoldPos()

double GetWingFoldPos ( void  ) const
inline

Gets the wing fold position (0 unfolded, 1 folded)

Returns
wing fold position (0 unfolded, 1 folded)

Definition at line 347 of file FGFCS.h.

347 { return WingFoldPos; }
+ Here is the caller graph for this function:

◆ GetYawTrimCmd()

double GetYawTrimCmd ( void  ) const
inline

Gets the rudder trim command.

Returns
rudder trim command in range from -1.0 - 1.0

Definition at line 274 of file FGFCS.h.

274 { return YTrimCmd; }
+ Here is the caller graph for this function:

◆ Load()

bool Load ( Element el)
virtual

Loads the Flight Control System.

Load() is called from FGFDMExec.

Parameters
elpointer to the Element instance
Returns
true if succesful

Reimplemented from FGModel.

Definition at line 479 of file FGFCS.cpp.

480 {
481  if (document->GetName() == "autopilot") {
482  Name = "Autopilot: ";
483  systype = stAutoPilot;
484  } else if (document->GetName() == "flight_control") {
485  Name = "FCS: ";
486  systype = stFCS;
487  } else if (document->GetName() == "system") {
488  Name = "System: ";
489  systype = stSystem;
490  }
491 
492  // Load interface properties from document
493  if (!FGModel::Load(document))
494  return false;
495 
496  Name += document->GetAttributeValue("name");
497 
498  Debug(2);
499 
500  Element* channel_element = document->FindElement("channel");
501 
502  while (channel_element) {
503 
504  FGFCSChannel* newChannel = 0;
505 
506  string sOnOffProperty = channel_element->GetAttributeValue("execute");
507  string sChannelName = channel_element->GetAttributeValue("name");
508 
509  int Rate = 0;
510  if (!channel_element->GetAttributeValue("execrate").empty())
511  Rate = channel_element->GetAttributeValueAsNumber("execrate");
512 
513  if (sOnOffProperty.length() > 0) {
514  FGPropertyNode* OnOffPropertyNode = PropertyManager->GetNode(sOnOffProperty);
515  if (OnOffPropertyNode == 0) {
516  cerr << channel_element->ReadFrom() << highint << fgred
517  << "The On/Off property, " << sOnOffProperty << " specified for channel "
518  << channel_element->GetAttributeValue("name") << " is undefined or not "
519  << "understood. The simulation will abort" << reset << endl;
520  throw("Bad system definition");
521  } else
522  newChannel = new FGFCSChannel(this, sChannelName, Rate,
523  OnOffPropertyNode);
524  } else
525  newChannel = new FGFCSChannel(this, sChannelName, Rate);
526 
527  SystemChannels.push_back(newChannel);
528 
529  if (debug_lvl > 0)
530  cout << endl << highint << fgblue << " Channel "
531  << normint << channel_element->GetAttributeValue("name") << reset << endl;
532 
533  Element* component_element = channel_element->GetElement();
534  while (component_element) {
535  try {
536  if ((component_element->GetName() == string("lag_filter")) ||
537  (component_element->GetName() == string("lead_lag_filter")) ||
538  (component_element->GetName() == string("washout_filter")) ||
539  (component_element->GetName() == string("second_order_filter")) ||
540  (component_element->GetName() == string("integrator")) )
541  {
542  newChannel->Add(new FGFilter(this, component_element));
543  } else if ((component_element->GetName() == string("pure_gain")) ||
544  (component_element->GetName() == string("scheduled_gain")) ||
545  (component_element->GetName() == string("aerosurface_scale")))
546  {
547  newChannel->Add(new FGGain(this, component_element));
548  } else if (component_element->GetName() == string("summer")) {
549  newChannel->Add(new FGSummer(this, component_element));
550  } else if (component_element->GetName() == string("deadband")) {
551  newChannel->Add(new FGDeadBand(this, component_element));
552  } else if (component_element->GetName() == string("switch")) {
553  newChannel->Add(new FGSwitch(this, component_element));
554  } else if (component_element->GetName() == string("kinematic")) {
555  newChannel->Add(new FGKinemat(this, component_element));
556  } else if (component_element->GetName() == string("fcs_function")) {
557  newChannel->Add(new FGFCSFunction(this, component_element));
558  } else if (component_element->GetName() == string("pid")) {
559  newChannel->Add(new FGPID(this, component_element));
560  } else if (component_element->GetName() == string("actuator")) {
561  newChannel->Add(new FGActuator(this, component_element));
562  } else if (component_element->GetName() == string("sensor")) {
563  newChannel->Add(new FGSensor(this, component_element));
564  } else if (component_element->GetName() == string("accelerometer")) {
565  newChannel->Add(new FGAccelerometer(this, component_element));
566  } else if (component_element->GetName() == string("magnetometer")) {
567  newChannel->Add(new FGMagnetometer(this, component_element));
568  } else if (component_element->GetName() == string("gyro")) {
569  newChannel->Add(new FGGyro(this, component_element));
570  } else if ((component_element->GetName() == string("waypoint_heading")) ||
571  (component_element->GetName() == string("waypoint_distance")))
572  {
573  newChannel->Add(new FGWaypoint(this, component_element));
574  } else if (component_element->GetName() == string("angle")) {
575  newChannel->Add(new FGAngles(this, component_element));
576  } else if (component_element->GetName() == string("distributor")) {
577  newChannel->Add(new FGDistributor(this, component_element));
578  } else {
579  cerr << "Unknown FCS component: " << component_element->GetName() << endl;
580  }
581  } catch(string& s) {
582  cerr << highint << fgred << endl << " " << s << endl;
583  cerr << reset << endl;
584  return false;
585  }
586  component_element = channel_element->GetNextElement();
587  }
588  channel_element = document->FindNextElement("channel");
589  }
590 
591  PostLoad(document, PropertyManager);
592 
593  return true;
594 }
static char reset[5]
resets text properties
Definition: FGJSBBase.h:131
static char normint[6]
normal intensity text
Definition: FGJSBBase.h:129
static char fgred[6]
red text
Definition: FGJSBBase.h:141
static char fgblue[6]
blue text
Definition: FGJSBBase.h:137
static char highint[5]
highlights text
Definition: FGJSBBase.h:125
virtual bool Load(Element *el)
Loads this model.
Definition: FGModel.cpp:113
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Run()

bool Run ( bool  Holding)
virtual

Runs the Flight Controls model; called by the Executive Can pass in a value indicating if the executive is directing the simulation to Hold.

Parameters
Holdingif true, the executive has been directed to hold the sim from advancing time. Some models may ignore this flag, such as the Input model, which may need to be active to listen on a socket for the "Resume" command to be given.
Returns
false if no error

Reimplemented from FGModel.

Definition at line 161 of file FGFCS.cpp.

162 {
163  unsigned int i;
164 
165  if (FGModel::Run(Holding)) return true; // fast exit if nothing to do
166  if (Holding) return false;
167 
168  RunPreFunctions();
169 
170  for (i=0; i<ThrottlePos.size(); i++) ThrottlePos[i] = ThrottleCmd[i];
171  for (i=0; i<MixturePos.size(); i++) MixturePos[i] = MixtureCmd[i];
172  for (i=0; i<PropAdvance.size(); i++) PropAdvance[i] = PropAdvanceCmd[i];
173  for (i=0; i<PropFeather.size(); i++) PropFeather[i] = PropFeatherCmd[i];
174 
175  // Execute system channels in order
176  for (i=0; i<SystemChannels.size(); i++) {
177  if (debug_lvl & 4) cout << " Executing System Channel: " << SystemChannels[i]->GetName() << endl;
178  ChannelRate = SystemChannels[i]->GetRate();
179  SystemChannels[i]->Execute();
180  }
181  ChannelRate = 1;
182 
183  RunPostFunctions();
184 
185  return false;
186 }
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
Definition: FGModel.cpp:92
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCBrake()

void SetCBrake ( double  cmd)
inline

Sets the center brake group.

Parameters
cmdbrake setting in percent (0.0 - 1.0)

Definition at line 517 of file FGFCS.h.

517 {BrakePos[FGLGear::bgCenter] = cmd;}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDaCmd()

void SetDaCmd ( double  cmd)
inline

Sets the aileron command.

Parameters
cmdaileron command

Definition at line 379 of file FGFCS.h.

379 { DaCmd = cmd; }
+ Here is the caller graph for this function:

◆ SetDaLPos()

void SetDaLPos ( int  form,
double  pos 
)

Sets the left aileron position.

Parameters
cmdleft aileron position in radians

Definition at line 190 of file FGFCS.cpp.

191 {
192  switch(form) {
193  case ofRad:
194  DaLPos[ofRad] = pos;
195  DaLPos[ofDeg] = pos*radtodeg;
196  break;
197  case ofDeg:
198  DaLPos[ofRad] = pos*degtorad;
199  DaLPos[ofDeg] = pos;
200  break;
201  case ofNorm:
202  DaLPos[ofNorm] = pos;
203  }
204  DaLPos[ofMag] = fabs(DaLPos[ofRad]);
205 }
+ Here is the caller graph for this function:

◆ SetDaRPos()

void SetDaRPos ( int  form,
double  pos 
)

Sets the right aileron position.

Parameters
cmdright aileron position in radians

Definition at line 209 of file FGFCS.cpp.

210 {
211  switch(form) {
212  case ofRad:
213  DaRPos[ofRad] = pos;
214  DaRPos[ofDeg] = pos*radtodeg;
215  break;
216  case ofDeg:
217  DaRPos[ofRad] = pos*degtorad;
218  DaRPos[ofDeg] = pos;
219  break;
220  case ofNorm:
221  DaRPos[ofNorm] = pos;
222  }
223  DaRPos[ofMag] = fabs(DaRPos[ofRad]);
224 }
+ Here is the caller graph for this function:

◆ SetDeCmd()

void SetDeCmd ( double  cmd)
inline

Sets the elevator command.

Parameters
cmdelevator command in percent

Definition at line 383 of file FGFCS.h.

383 { DeCmd = cmd; }
+ Here is the caller graph for this function:

◆ SetDePos()

void SetDePos ( int  form,
double  pos 
)

Sets the elevator position.

Parameters
cmdelevator position in radians

Definition at line 228 of file FGFCS.cpp.

229 {
230  switch(form) {
231  case ofRad:
232  DePos[ofRad] = pos;
233  DePos[ofDeg] = pos*radtodeg;
234  break;
235  case ofDeg:
236  DePos[ofRad] = pos*degtorad;
237  DePos[ofDeg] = pos;
238  break;
239  case ofNorm:
240  DePos[ofNorm] = pos;
241  }
242  DePos[ofMag] = fabs(DePos[ofRad]);
243 }
+ Here is the caller graph for this function:

◆ SetDfCmd()

void SetDfCmd ( double  cmd)
inline

Sets the flaps command.

Parameters
cmdflaps command in percent

Definition at line 395 of file FGFCS.h.

395 { DfCmd = cmd; }
+ Here is the caller graph for this function:

◆ SetDfPos()

void SetDfPos ( int  form,
double  pos 
)

Sets the flaps position.

Parameters
cmdflaps position in radians

Definition at line 266 of file FGFCS.cpp.

267 {
268  switch(form) {
269  case ofRad:
270  DfPos[ofRad] = pos;
271  DfPos[ofDeg] = pos*radtodeg;
272  break;
273  case ofDeg:
274  DfPos[ofRad] = pos*degtorad;
275  DfPos[ofDeg] = pos;
276  break;
277  case ofNorm:
278  DfPos[ofNorm] = pos;
279  }
280  DfPos[ofMag] = fabs(DfPos[ofRad]);
281 }
+ Here is the caller graph for this function:

◆ SetDrCmd()

void SetDrCmd ( double  cmd)
inline

Sets the rudder command.

Parameters
cmdrudder command in percent

Definition at line 387 of file FGFCS.h.

387 { DrCmd = cmd; }
+ Here is the caller graph for this function:

◆ SetDrPos()

void SetDrPos ( int  form,
double  pos 
)

Sets the rudder position.

Parameters
cmdrudder position in radians

Definition at line 247 of file FGFCS.cpp.

248 {
249  switch(form) {
250  case ofRad:
251  DrPos[ofRad] = pos;
252  DrPos[ofDeg] = pos*radtodeg;
253  break;
254  case ofDeg:
255  DrPos[ofRad] = pos*degtorad;
256  DrPos[ofDeg] = pos;
257  break;
258  case ofNorm:
259  DrPos[ofNorm] = pos;
260  }
261  DrPos[ofMag] = fabs(DrPos[ofRad]);
262 }
+ Here is the caller graph for this function:

◆ SetDsbCmd()

void SetDsbCmd ( double  cmd)
inline

Sets the speedbrake command.

Parameters
cmdspeedbrake command in percent

Definition at line 399 of file FGFCS.h.

399 { DsbCmd = cmd; }
+ Here is the caller graph for this function:

◆ SetDsbPos()

void SetDsbPos ( int  form,
double  pos 
)

Sets the speedbrake position.

Parameters
cmdspeedbrake position in radians

Definition at line 285 of file FGFCS.cpp.

286 {
287  switch(form) {
288  case ofRad:
289  DsbPos[ofRad] = pos;
290  DsbPos[ofDeg] = pos*radtodeg;
291  break;
292  case ofDeg:
293  DsbPos[ofRad] = pos*degtorad;
294  DsbPos[ofDeg] = pos;
295  break;
296  case ofNorm:
297  DsbPos[ofNorm] = pos;
298  }
299  DsbPos[ofMag] = fabs(DsbPos[ofRad]);
300 }
+ Here is the caller graph for this function:

◆ SetDsCmd()

void SetDsCmd ( double  cmd)
inline

Sets the steering command.

Parameters
cmdsteering command in percent

Definition at line 391 of file FGFCS.h.

391 { fdmex->GetGroundReactions()->SetDsCmd( cmd ); }
void SetDsCmd(double cmd)
Sets the steering command.
FGGroundReactions * GetGroundReactions(void)
Returns the FGGroundReactions pointer.
Definition: FGFDMExec.h:361
+ Here is the call graph for this function:

◆ SetDspCmd()

void SetDspCmd ( double  cmd)
inline

Sets the spoilers command.

Parameters
cmdspoilers command in percent

Definition at line 403 of file FGFCS.h.

403 { DspCmd = cmd; }
+ Here is the caller graph for this function:

◆ SetDspPos()

void SetDspPos ( int  form,
double  pos 
)

Sets the spoiler position.

Parameters
cmdspoiler position in radians

Definition at line 304 of file FGFCS.cpp.

305 {
306  switch(form) {
307  case ofRad:
308  DspPos[ofRad] = pos;
309  DspPos[ofDeg] = pos*radtodeg;
310  break;
311  case ofDeg:
312  DspPos[ofRad] = pos*degtorad;
313  DspPos[ofDeg] = pos;
314  break;
315  case ofNorm:
316  DspPos[ofNorm] = pos;
317  }
318  DspPos[ofMag] = fabs(DspPos[ofRad]);
319 }
+ Here is the caller graph for this function:

◆ SetFeatherCmd()

void SetFeatherCmd ( int  engine,
bool  cmd 
)

Sets the propeller feather command for the specified engine.

Parameters
engineengine ID number
cmdfeather (bool)

Definition at line 451 of file FGFCS.cpp.

452 {
453  if (engineNum < (int)ThrottlePos.size()) {
454  if (engineNum < 0) {
455  for (unsigned int ctr=0; ctr<PropFeatherCmd.size(); ctr++)
456  PropFeatherCmd[ctr] = setting;
457  } else {
458  PropFeatherCmd[engineNum] = setting;
459  }
460  }
461 }
+ Here is the caller graph for this function:

◆ SetGearCmd()

void SetGearCmd ( double  gearcmd)
inline

Set the gear extend/retract command, defaults to down.

Parameters
gearcommand 0 for up, 1 for down

Definition at line 429 of file FGFCS.h.

429 { GearCmd = gearcmd; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetGearPos()

void SetGearPos ( double  gearpos)
inline

Set the gear extend/retract position, defaults to down.

Parameters
gearposition 0 up, 1 down

Definition at line 484 of file FGFCS.h.

484 { GearPos = gearpos; }
+ Here is the caller graph for this function:

◆ SetLBrake()

void SetLBrake ( double  cmd)
inline

Sets the left brake group.

Parameters
cmdbrake setting in percent (0.0 - 1.0)

Definition at line 509 of file FGFCS.h.

509 {BrakePos[FGLGear::bgLeft] = cmd;}
+ Here is the caller graph for this function:

◆ SetMixtureCmd()

void SetMixtureCmd ( int  engine,
double  cmd 
)

Sets the mixture command for the specified engine.

Parameters
engineengine ID number
cmdnormalized mixture command (0.0 - 1.0)

Definition at line 395 of file FGFCS.cpp.

396 {
397  if (engineNum < (int)ThrottlePos.size()) {
398  if (engineNum < 0) {
399  for (unsigned int ctr=0; ctr<MixtureCmd.size(); ctr++)
400  MixtureCmd[ctr] = setting;
401  } else {
402  MixtureCmd[engineNum] = setting;
403  }
404  }
405 }
+ Here is the caller graph for this function:

◆ SetMixturePos()

void SetMixturePos ( int  engine,
double  cmd 
)

Sets the actual mixture setting for the specified engine.

Parameters
engineengine ID number
cmdnormalized mixture setting (0.0 - 1.0)

Definition at line 409 of file FGFCS.cpp.

410 {
411  if (engineNum < (int)ThrottlePos.size()) {
412  if (engineNum < 0) {
413  for (unsigned int ctr=0; ctr<MixtureCmd.size(); ctr++)
414  MixturePos[ctr] = MixtureCmd[ctr];
415  } else {
416  MixturePos[engineNum] = setting;
417  }
418  }
419 }
+ Here is the caller graph for this function:

◆ SetPitchTrimCmd()

void SetPitchTrimCmd ( double  cmd)
inline

Sets the pitch trim command.

Parameters
cmdpitch trim command in percent

Definition at line 407 of file FGFCS.h.

407 { PTrimCmd = cmd; }
+ Here is the caller graph for this function:

◆ SetPropAdvance()

void SetPropAdvance ( int  engine,
double  cmd 
)

Sets the actual prop pitch setting for the specified engine.

Parameters
engineengine ID number
cmdprop pitch setting in percent (0.0 - 1.0)

Definition at line 437 of file FGFCS.cpp.

438 {
439  if (engineNum < (int)ThrottlePos.size()) {
440  if (engineNum < 0) {
441  for (unsigned int ctr=0; ctr<PropAdvanceCmd.size(); ctr++)
442  PropAdvance[ctr] = PropAdvanceCmd[ctr];
443  } else {
444  PropAdvance[engineNum] = setting;
445  }
446  }
447 }
+ Here is the caller graph for this function:

◆ SetPropAdvanceCmd()

void SetPropAdvanceCmd ( int  engine,
double  cmd 
)

Sets the propeller pitch command for the specified engine.

Parameters
engineengine ID number
cmdpitch command in percent (0.0 - 1.0)

Definition at line 423 of file FGFCS.cpp.

424 {
425  if (engineNum < (int)ThrottlePos.size()) {
426  if (engineNum < 0) {
427  for (unsigned int ctr=0; ctr<PropAdvanceCmd.size(); ctr++)
428  PropAdvanceCmd[ctr] = setting;
429  } else {
430  PropAdvanceCmd[engineNum] = setting;
431  }
432  }
433 }
+ Here is the caller graph for this function:

◆ SetPropFeather()

void SetPropFeather ( int  engine,
bool  cmd 
)

Sets the actual prop feather setting for the specified engine.

Parameters
engineengine ID number
cmdprop fether setting (bool)

Definition at line 465 of file FGFCS.cpp.

466 {
467  if (engineNum < (int)ThrottlePos.size()) {
468  if (engineNum < 0) {
469  for (unsigned int ctr=0; ctr<PropFeatherCmd.size(); ctr++)
470  PropFeather[ctr] = PropFeatherCmd[ctr];
471  } else {
472  PropFeather[engineNum] = setting;
473  }
474  }
475 }
+ Here is the caller graph for this function:

◆ SetRBrake()

void SetRBrake ( double  cmd)
inline

Sets the right brake group.

Parameters
cmdbrake setting in percent (0.0 - 1.0)

Definition at line 513 of file FGFCS.h.

513 {BrakePos[FGLGear::bgRight] = cmd;}
+ Here is the caller graph for this function:

◆ SetRollTrimCmd()

void SetRollTrimCmd ( double  cmd)
inline

Sets the aileron trim command.

Parameters
cmdaileron trim command in percent

Definition at line 415 of file FGFCS.h.

415 { RTrimCmd = cmd; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetTailhookPos()

void SetTailhookPos ( double  hookpos)
inline

Set the tailhook position.

Parameters
tailhookposition 0 up, 1 down

Definition at line 488 of file FGFCS.h.

488 { TailhookPos = hookpos; }
+ Here is the caller graph for this function:

◆ SetThrottleCmd()

void SetThrottleCmd ( int  engine,
double  cmd 
)

Sets the throttle command for the specified engine.

Parameters
engineengine ID number
cmdnormalized throttle command (0.0 - 1.0)

Definition at line 323 of file FGFCS.cpp.

324 {
325  if (engineNum < (int)ThrottlePos.size()) {
326  if (engineNum < 0) {
327  for (unsigned int ctr=0; ctr<ThrottleCmd.size(); ctr++)
328  ThrottleCmd[ctr] = setting;
329  } else {
330  ThrottleCmd[engineNum] = setting;
331  }
332  } else {
333  cerr << "Throttle " << engineNum << " does not exist! " << ThrottleCmd.size()
334  << " engines exist, but attempted throttle command is for engine "
335  << engineNum << endl;
336  }
337 }
+ Here is the caller graph for this function:

◆ SetThrottlePos()

void SetThrottlePos ( int  engine,
double  cmd 
)

Sets the actual throttle setting for the specified engine.

Parameters
engineengine ID number
cmdnormalized throttle setting (0.0 - 1.0)

Definition at line 341 of file FGFCS.cpp.

342 {
343  if (engineNum < (int)ThrottlePos.size()) {
344  if (engineNum < 0) {
345  for (unsigned int ctr=0; ctr<ThrottlePos.size(); ctr++)
346  ThrottlePos[ctr] = setting;
347  } else {
348  ThrottlePos[engineNum] = setting;
349  }
350  } else {
351  cerr << "Throttle " << engineNum << " does not exist! " << ThrottlePos.size()
352  << " engines exist, but attempted throttle position setting is for engine "
353  << engineNum << endl;
354  }
355 }
+ Here is the caller graph for this function:

◆ SetWingFoldPos()

void SetWingFoldPos ( double  foldpos)
inline

Set the wing fold position.

Parameters
wingfold position 0 unfolded, 1 folded

Definition at line 492 of file FGFCS.h.

492 { WingFoldPos = foldpos; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetYawTrimCmd()

void SetYawTrimCmd ( double  cmd)
inline

Sets the rudder trim command.

Parameters
cmdrudder trim command in percent

Definition at line 411 of file FGFCS.h.

411 { YTrimCmd = cmd; }
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: