INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iosfwd>
#include <vector>
#include <string>
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#define ID_FCS "$Id$"
+#define ID_FCS "$Id: FGFCS.h,v 1.35 2011/04/05 20:20:21 andgi Exp $"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
@property gear/tailhook-pos-norm
@author Jon S. Berndt
- @version $Revision$
+ @version $Revision: 1.35 $
@see FGActuator
@see FGDeadBand
@see FGFCSFunction
double GetDaLPos( int form = ofRad )
const { return DaLPos[form]; }
- /// @name Aerosurface position retrieval
- //@{
/** Gets the right aileron position.
@return aileron position in radians */
double GetDaRPos( int form = ofRad )
bool GetPropFeather(int engine) const { return PropFeather[engine]; }
//@}
- /** Retrieves the State object pointer.
- This is used by the FGFCS-owned components.
- @return pointer to the State object */
- FGState* GetState(void) { return State; }
-
/** Retrieves all component names for inclusion in output stream
- @param delimeter either a tab or comma string depending on output type
+ @param delimiter either a tab or comma string depending on output type
@return a string containing the descriptive names for all components */
- string GetComponentStrings(string delimeter);
+ std::string GetComponentStrings(const std::string& delimiter) const;
/** Retrieves all component outputs for inclusion in output stream
- @param delimeter either a tab or comma string depending on output type
+ @param delimiter either a tab or comma string depending on output type
@return a string containing the numeric values for the current set of
component outputs */
- string GetComponentValues(string delimeter);
+ std::string GetComponentValues(const std::string& delimiter) const;
/// @name Pilot input command setting
//@{
/** Sets the throttle command for the specified engine
@param engine engine ID number
- @param cmd throttle command in percent (0 - 100)*/
+ @param cmd normalized throttle command (0.0 - 1.0)*/
void SetThrottleCmd(int engine, double cmd);
/** Sets the mixture command for the specified engine
@param engine engine ID number
- @param cmd mixture command in percent (0 - 100)*/
+ @param cmd normalized mixture command (0.0 - 1.0)*/
void SetMixtureCmd(int engine, double cmd);
/** Set the gear extend/retract command, defaults to down
/** Sets the actual throttle setting for the specified engine
@param engine engine ID number
- @param cmd throttle setting in percent (0 - 100)*/
+ @param cmd normalized throttle setting (0.0 - 1.0)*/
void SetThrottlePos(int engine, double cmd);
/** Sets the actual mixture setting for the specified engine
@param engine engine ID number
- @param cmd mixture setting in percent (0 - 100)*/
+ @param cmd normalized mixture setting (0.0 - 1.0)*/
void SetMixturePos(int engine, double cmd);
/** Sets the steering position
@return true if succesful */
bool Load(Element* el, SystemType systype);
- ifstream* FindSystemFile(string system_filename);
- string FindSystemFullPathname(string system_filename);
+ std::ifstream* FindSystemFile(const std::string& system_filename);
+ std::string FindSystemFullPathname(const std::string& system_filename);
void AddThrottle(void);
void AddGear(void);
FGPropertyManager* GetPropertyManager(void) { return PropertyManager; }
+ bool GetTrimStatus(void) const { return FDMExec->GetTrimStatus(); }
+
private:
double DaCmd, DeCmd, DrCmd, DsCmd, DfCmd, DsbCmd, DspCmd;
double DePos[NForms], DaLPos[NForms], DaRPos[NForms], DrPos[NForms];
double DfPos[NForms], DsbPos[NForms], DspPos[NForms];
double PTrimCmd, YTrimCmd, RTrimCmd;
- vector <double> ThrottleCmd;
- vector <double> ThrottlePos;
- vector <double> MixtureCmd;
- vector <double> MixturePos;
- vector <double> PropAdvanceCmd;
- vector <double> PropAdvance;
- vector <bool> PropFeatherCmd;
- vector <bool> PropFeather;
- vector <double> SteerPosDeg;
+ std::vector <double> ThrottleCmd;
+ std::vector <double> ThrottlePos;
+ std::vector <double> MixtureCmd;
+ std::vector <double> MixturePos;
+ std::vector <double> PropAdvanceCmd;
+ std::vector <double> PropAdvance;
+ std::vector <bool> PropFeatherCmd;
+ std::vector <bool> PropFeather;
+ std::vector <double> SteerPosDeg;
double LeftBrake, RightBrake, CenterBrake; // Brake settings
double GearCmd,GearPos;
double TailhookPos, WingFoldPos;
- typedef vector <FGFCSComponent*> FCSCompVec;
+ typedef std::vector <FGFCSComponent*> FCSCompVec;
FCSCompVec Systems;
FCSCompVec FCSComponents;
FCSCompVec APComponents;