X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2FFGAuxiliary.h;h=e52dc15b7b025ce047660f570f778aef4cf518b8;hb=bb785797b9dd171f21c2577e0ba1a9c84e107583;hp=2d64cd68ee9a6212539d9f2ce724c4ae8aaa0a21;hpb=c4a1cc047e09b3e1004d6215e55b11f460c13bbe;p=flightgear.git diff --git a/src/FDM/JSBSim/FGAuxiliary.h b/src/FDM/JSBSim/FGAuxiliary.h index 2d64cd68e..e52dc15b7 100644 --- a/src/FDM/JSBSim/FGAuxiliary.h +++ b/src/FDM/JSBSim/FGAuxiliary.h @@ -1,4 +1,4 @@ -/******************************************************************************* +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Header: FGAuxiliary.h Author: Jon Berndt @@ -28,57 +28,98 @@ HISTORY 11/22/98 JSB Created 1/1/00 TP Added calcs and getters for VTAS, VCAS, VEAS, Vground, in knots -******************************************************************************** +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SENTRY -*******************************************************************************/ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #ifndef FGAUXILIARY_H #define FGAUXILIARY_H -/******************************************************************************* +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% INCLUDES -*******************************************************************************/ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + #include "FGModel.h" +#include "FGMatrix.h" + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +DEFINITIONS +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + +#define ID_AUXILIARY "$Id$" + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +FORWARD DECLARATIONS +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -/******************************************************************************* -DEFINES -*******************************************************************************/ +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs] +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -/******************************************************************************* +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +CLASS DOCUMENTATION +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + +/** Encapsulates various uncategorized scheduled functions. + @author Tony Peden, Jon Berndt + @version $Id$ + @see - +*/ + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CLASS DECLARATION -*******************************************************************************/ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ class FGAuxiliary : public FGModel { public: + /** Constructor + @param Executive a pointer to the parent executive object */ FGAuxiliary(FGFDMExec*); - ~FGAuxiliary(void); + /// Destructor + ~FGAuxiliary(); + /** Runs the Auxiliary routines; called by the Executive + @return false if no error */ bool Run(void); - //use FGInitialCondition to set these speeds + // Use FGInitialCondition to set these speeds inline float GetVcalibratedFPS(void) { return vcas; } inline float GetVcalibratedKTS(void) { return vcas*FPSTOKTS; } inline float GetVequivalentFPS(void) { return veas; } inline float GetVequivalentKTS(void) { return veas*FPSTOKTS; } + + inline FGColumnVector GetPilotAccel(void) { return vPilotAccel; } + inline float GetPilotAccel(int idx) { return vPilotAccel(idx); } + inline FGColumnVector GetNpilot(void) { return vPilotAccel*INVGRAVITY; } + inline float GetNpilot(int idx) { return (vPilotAccel*INVGRAVITY)(idx); } - - -protected: - + inline float GetEarthPositionAngle(void) { return earthPosAngle; } + + float GetHeadWind(void); + float GetCrossWind(void); + private: float vcas; float veas; float mach; float qbar,rhosl,rho,p,psl,pt; - //Don't add a getter for pt! - //pt above is freestream total pressure for subsonic only - //for supersonic it is the 1D total pressure behind a normal shock - //if a general freestream total is needed, e-mail Tony Peden + + // Don't add a getter for pt! + // pt above is freestream total pressure for subsonic only + // for supersonic it is the 1D total pressure behind a normal shock + // if a general freestream total is needed, e-mail Tony Peden // (apeden@earthlink.net) or you can add it your self using the // isentropic flow equations + FGColumnVector vPilotAccel; + FGColumnVector vToEyePt; + + float earthPosAngle; + void GetState(void); + void Debug(void); }; -/******************************************************************************/ +//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #endif +