]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGState.h
b) FDM - ada.cxx, ada.hxx have been updated with the faux, daux and iaux arrays that...
[flightgear.git] / src / FDM / JSBSim / FGState.h
index 10896b4f50c8195cfa13841661e5329923b362ee..e494d280986cfd256727ee30ef4d0ca508e21569 100644 (file)
@@ -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 <simgear/compiler.h>
-#  ifdef FG_HAVE_STD_INCLUDES
+#  ifdef SG_HAVE_STD_INCLUDES
 #    include <fstream>
 #  else
 #    include <fstream.h>
@@ -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<eParam, string> 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<string, eParam> 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
+