X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=src%2FFDM%2FJSBSim%2FFGRotation.h;h=85ee9b2553e1d460b2e1beb126a01bdecafd235c;hb=f63d336ebcc5318a83a4db15a73a7c77cc192d53;hp=5122535fcb4abe3c9cfceda6883a219ff65ece75;hpb=844a55c3d13f8177eba4295d1d7f52ae8e519a7b;p=flightgear.git diff --git a/src/FDM/JSBSim/FGRotation.h b/src/FDM/JSBSim/FGRotation.h index 5122535fc..85ee9b255 100644 --- a/src/FDM/JSBSim/FGRotation.h +++ b/src/FDM/JSBSim/FGRotation.h @@ -27,24 +27,6 @@ HISTORY -------------------------------------------------------------------------------- 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 -[2] D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices", - JSC 12960, July 1977 -[3] Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at - NASA-Ames", NASA CR-2497, January 1975 -[4] Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics", - Wiley & Sons, 1979 ISBN 0-471-03032-5 -[5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons, - 1982 ISBN 0-471-08936-2 - - 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -68,12 +50,40 @@ INCLUDES #endif #include "FGModel.h" -#include "FGMatrix33.h" #include "FGColumnVector3.h" -#include "FGColumnVector4.h" + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +DEFINITIONS +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #define ID_ROTATION "$Id$" +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +FORWARD DECLARATIONS +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + +namespace JSBSim { + +/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +CLASS DOCUMENTATION +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ + +/** Models the rotational portion of the Equations of Motion. + Note: 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. + @see 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 + @see D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices", + JSC 12960, July 1977 + @see Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at + NASA-Ames", NASA CR-2497, January 1975 + @see Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics", + Wiley & Sons, 1979 ISBN 0-471-03032-5 + @see Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons, + 1982 ISBN 0-471-08936-2 +*/ + /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CLASS DECLARATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ @@ -105,11 +115,11 @@ public: vAeroPQR(eQ)=q; vAeroPQR(eR)=r;} inline void SetEuler(FGColumnVector3 tt) {vEuler = tt;} - + inline double Getphi(void) const {return vEuler(1);} inline double Gettht(void) const {return vEuler(2);} inline double Getpsi(void) const {return vEuler(3);} - + inline double GetCosphi(void) const {return cPhi;} inline double GetCostht(void) const {return cTht;} inline double GetCospsi(void) const {return cPsi;} @@ -117,7 +127,7 @@ public: inline double GetSinphi(void) const {return sPhi;} inline double GetSintht(void) const {return sTht;} inline double GetSinpsi(void) const {return sPsi;} - + void bind(void); void unbind(void); @@ -125,23 +135,22 @@ private: FGColumnVector3 vPQR; FGColumnVector3 vAeroPQR; FGColumnVector3 vPQRdot; - FGColumnVector3 vPQRdot_prev[3]; + FGColumnVector3 vPQRdot_prev[4]; FGColumnVector3 vMoments; FGColumnVector3 vEuler; FGColumnVector3 vEulerRates; - + double cTht,sTht; double cPhi,sPhi; double cPsi,sPsi; - - double Ixx, Iyy, Izz, Ixz; + double dt; void GetState(void); void Debug(int from); }; - +} //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #endif