@see FGSwitch
@see FGGradient
@see FGFilter
- @see FGFlaps
@see FGDeadBand
*/
/// @name Pilot input command retrieval
//@{
/** Gets the aileron command.
- @return aileron command in radians */
+ @return aileron command in percent */
inline double GetDaCmd(void) { return DaCmd; }
/** Gets the elevator command.
- @return elevator command in radians */
+ @return elevator command in percent */
inline double GetDeCmd(void) { return DeCmd; }
/** Gets the rudder command.
- @return rudder command in radians */
+ @return rudder command in percent */
inline double GetDrCmd(void) { return DrCmd; }
/** Gets the flaps command.
- @return flaps command in radians */
+ @return flaps command in percent */
inline double GetDfCmd(void) { return DfCmd; }
/** Gets the speedbrake command.
- @return speedbrake command in radians */
+ @return speedbrake command in percent */
inline double GetDsbCmd(void) { return DsbCmd; }
/** Gets the spoiler command.
- @return spoiler command in radians */
+ @return spoiler command in percent */
inline double GetDspCmd(void) { return DspCmd; }
/** Gets the throttle command.
@return mixture command in percent ( 0 - 100) for the given engine */
inline double GetMixtureCmd(int engine) { return MixtureCmd[engine]; }
+ /** Gets the prop pitch command.
+ @param engine engine ID number
+ @return pitch command in percent ( 0.0 - 1.0) for the given engine */
+ inline double GetPropAdvanceCmd(int engine) { return PropAdvanceCmd[engine]; }
+
/** Gets the pitch trim command.
- @return pitch trim command in radians */
+ @return pitch trim command in percent */
inline double GetPitchTrimCmd(void) { return PTrimCmd; }
+
+ /** Gets the rudder trim command.
+ @return rudder trim command in percent */
+ inline double GetYawTrimCmd(void) { return YTrimCmd; }
+
+ /** Gets the aileron trim command.
+ @return aileron trim command in percent */
+ inline double GetRollTrimCmd(void) { return RTrimCmd; }
+
+ /** Get the gear extend/retract command. 0 commands gear up, 1 down.
+ defaults to down.
+ @return the current value of the gear extend/retract command*/
+ inline double GetGearCmd(void) { return GearCmd; }
//@}
/// @name Aerosurface position retrieval
@param engine engine ID number
@return mixture position for the given engine in percent ( 0 - 100)*/
inline double GetMixturePos(int engine) { return MixturePos[engine]; }
+
+ /** Gets the gear position (0 up, 1 down), defaults to down
+ @return gear position (0 up, 1 down) */
+ inline double GetGearPos(void) { return GearPos; }
+
+ /** Gets the prop pitch position.
+ @param engine engine ID number
+ @return prop pitch position for the given engine in percent ( 0.0-1.0)*/
+ inline double GetPropAdvance(int engine) { return PropAdvance[engine]; }
//@}
/** Retrieves the State object pointer.
/// @name Pilot input command setting
//@{
/** Sets the aileron command
- @param cmd aileron command in radians*/
+ @param cmd aileron command in percent*/
inline void SetDaCmd(double cmd) { DaCmd = cmd; }
/** Sets the elevator command
- @param cmd elevator command in radians*/
+ @param cmd elevator command in percent*/
inline void SetDeCmd(double cmd) { DeCmd = cmd; }
/** Sets the rudder command
- @param cmd rudder command in radians*/
+ @param cmd rudder command in percent*/
inline void SetDrCmd(double cmd) { DrCmd = cmd; }
/** Sets the flaps command
- @param cmd flaps command in radians*/
+ @param cmd flaps command in percent*/
inline void SetDfCmd(double cmd) { DfCmd = cmd; }
/** Sets the speedbrake command
- @param cmd speedbrake command in radians*/
+ @param cmd speedbrake command in percent*/
inline void SetDsbCmd(double cmd) { DsbCmd = cmd; }
/** Sets the spoilers command
- @param cmd spoilers command in radians*/
+ @param cmd spoilers command in percent*/
inline void SetDspCmd(double cmd) { DspCmd = cmd; }
/** Sets the pitch trim command
- @param cmd pitch trim command in radians*/
+ @param cmd pitch trim command in percent*/
inline void SetPitchTrimCmd(double cmd) { PTrimCmd = cmd; }
+ /** Sets the rudder trim command
+ @param cmd rudder trim command in percent*/
+ inline void SetYawTrimCmd(double cmd) { YTrimCmd = cmd; }
+
+ /** Sets the aileron trim command
+ @param cmd aileron trim command in percent*/
+ inline void SetRollTrimCmd(double cmd) { RTrimCmd = cmd; }
+
/** Sets the throttle command for the specified engine
@param engine engine ID number
@param cmd throttle command in percent (0 - 100)*/
@param engine engine ID number
@param cmd mixture command in percent (0 - 100)*/
void SetMixtureCmd(int engine, double cmd);
+
+ /** Set the gear extend/retract command, defaults to down
+ @param gear command 0 for up, 1 for down */
+ void SetGearCmd(double gearcmd) { GearCmd = gearcmd; }
+
+ /** Sets the propeller pitch command for the specified engine
+ @param engine engine ID number
+ @param cmd mixture command in percent (0.0 - 1.0)*/
+ void SetPropAdvanceCmd(int engine, double cmd);
//@}
/// @name Aerosurface position setting
@param engine engine ID number
@param cmd mixture setting in percent (0 - 100)*/
void SetMixturePos(int engine, double cmd);
+
+ /** Set the gear extend/retract position, defaults to down
+ @param gear position 0 up, 1 down */
+ void SetGearPos(double gearpos) { GearPos = gearpos; }
+
+
+ /** Sets the actual prop pitch setting for the specified engine
+ @param engine engine ID number
+ @param cmd prop pitch setting in percent (0.0 - 1.0)*/
+ void SetPropAdvance(int engine, double cmd);
//@}
/// @name Landing Gear brakes
private:
double DaCmd, DeCmd, DrCmd, DfCmd, DsbCmd, DspCmd;
double DaPos, DePos, DrPos, DfPos, DsbPos, DspPos;
- double PTrimCmd;
+ double PTrimCmd, YTrimCmd, RTrimCmd;
vector <double> ThrottleCmd;
vector <double> ThrottlePos;
vector <double> MixtureCmd;
vector <double> MixturePos;
+ vector <double> PropAdvanceCmd;
+ vector <double> PropAdvance;
double LeftBrake, RightBrake, CenterBrake; // Brake settings
+ double GearCmd,GearPos;
vector <FGFCSComponent*> Components;
- void Debug(void);
+ void Debug(int from);
};
#include "FGState.h"