X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2FFGState.h;h=e494d280986cfd256727ee30ef4d0ca508e21569;hb=bb785797b9dd171f21c2577e0ba1a9c84e107583;hp=10896b4f50c8195cfa13841661e5329923b362ee;hpb=6caf599f2bc5cb77dcdd67ef92cc3ff9984b8c8c;p=flightgear.git diff --git a/src/FDM/JSBSim/FGState.h b/src/FDM/JSBSim/FGState.h index 10896b4f5..e494d2809 100644 --- a/src/FDM/JSBSim/FGState.h +++ b/src/FDM/JSBSim/FGState.h @@ -1,4 +1,4 @@ -/******************************************************************************* +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Header: FGState.h Author: Jon S. Berndt @@ -33,20 +33,20 @@ HISTORY -------------------------------------------------------------------------------- 11/17/98 JSB Created -******************************************************************************** +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SENTRY -*******************************************************************************/ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #ifndef FGSTATE_H #define FGSTATE_H -/******************************************************************************* +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% INCLUDES -*******************************************************************************/ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #ifdef FGFS # include -# ifdef FG_HAVE_STD_INCLUDES +# ifdef SG_HAVE_STD_INCLUDES # include # else # include @@ -61,20 +61,46 @@ INCLUDES #include "FGInitialCondition.h" #include "FGMatrix.h" -/******************************************************************************* -DEFINES -*******************************************************************************/ +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +DEFINITIONS +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -/******************************************************************************* +#define ID_STATE "$Id$" + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +FORWARD DECLARATIONS +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + +class FGAircraft; +class FGTranslation; +class FGRotation; +class FGAtmosphere; +class FGOutput; +class FGPosition; + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs] +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +CLASS DOCUMENTATION +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CLASS DECLARATION -*******************************************************************************/ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ class FGFDMExec; class FGState { public: FGState(FGFDMExec*); - ~FGState(void); + ~FGState(); + + enum {ePhi=1, eTht, ePsi}; + enum {eP=1, eQ, eR}; + enum {eU=1, eV, eW}; + enum {eDrag=1, eSide, eLift}; bool Reset(string, string, string); void Initialize(float, float, float, float, float, float, float, float, float); @@ -93,7 +119,6 @@ public: float GetParameter(string val_string); eParam GetParameterIndex(string val_string); - inline void Seta(float tt) { a = tt; } inline float Setsim_time(float tt) { @@ -114,7 +139,9 @@ public: FGColumnVector CalcEuler(void); FGMatrix GetTs2b(float alpha, float beta); FGMatrix GetTl2b(void) { return mTl2b; } + float GetTl2b(int i, int j) { return mTl2b(i,j);} FGMatrix GetTb2l(void) { return mTb2l; } + float GetTb2l(int i, int j) { return mTb2l(i,j);} typedef map ParamMap; ParamMap paramdef; @@ -129,14 +156,38 @@ private: FGMatrix mTl2b; FGMatrix mTs2b; FGColumnVector vQtrn; + FGColumnVector vlastQdot; + + FGAircraft* Aircraft; + FGPosition* Position; + FGTranslation* Translation; + FGRotation* Rotation; + FGOutput* Output; + FGAtmosphere* Atmosphere; + FGFCS* FCS; + FGAerodynamics* Aerodynamics; typedef map CoeffMap; CoeffMap coeffdef; + void Debug(void); + int ActiveEngine; -protected: - enum {ePhi=1, eTht, ePsi}; - enum {eP=1, eQ, eR}; + FGColumnVector vQdot; + FGColumnVector vTmp; + FGColumnVector vEuler; }; -/******************************************************************************/ +//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +#include "FGFDMExec.h" +#include "FGAtmosphere.h" +#include "FGFCS.h" +#include "FGTranslation.h" +#include "FGRotation.h" +#include "FGPosition.h" +#include "FGAerodynamics.h" +#include "FGOutput.h" +#include "FGAircraft.h" + #endif +