-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Header: FGRotation.h
Author: Jon Berndt
--------------------------------------------------------------------------------
12/02/98 JSB Created
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMENTS, REFERENCES, and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420 Naval Postgraduate
School, January 1994
The order of rotations used in this class corresponds to a 3-2-1 sequence,
or Y-P-R, or Z-Y-X, if you prefer.
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FGROTATION_H
#define FGROTATION_H
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifdef FGFS
# include <simgear/compiler.h>
#include "FGModel.h"
#include "FGMatrix.h"
-#define ID_ROTATION "$Header$"
+#define ID_ROTATION "$Id$"
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGRotation : public FGModel
{
- FGColumnVector vPQR;
- FGColumnVector vPQRdot;
- FGColumnVector vMoments;
- FGColumnVector vEuler;
- FGColumnVector vEulerRates;
-
- float cTht,sTht;
- float cPhi,sPhi;
- float cPsi,sPsi;
-
- float Ixx, Iyy, Izz, Ixz;
- float dt;
-
- void GetState(void);
-
public:
FGRotation(FGFDMExec*);
- ~FGRotation(void);
+ ~FGRotation();
bool Run(void);
inline float GetSintht(void) {return sTht;}
inline float GetSinpsi(void) {return sPsi;}
+private:
+ FGColumnVector vPQR;
+ FGColumnVector vPQRdot;
+ FGColumnVector vMoments;
+ FGColumnVector vEuler;
+ FGColumnVector vEulerRates;
+
+ float cTht,sTht;
+ float cPhi,sPhi;
+ float cPsi,sPsi;
+
+ float Ixx, Iyy, Izz, Ixz;
+ float dt;
+ void GetState(void);
+ void Debug(void);
};
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif
+