]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPosition.h
Check return value of FDM::init().
[flightgear.git] / src / FDM / JSBSim / FGPosition.h
index a74fc630427b88b336385d3b7faeb135cc7edc48..354f619449683e774a3afb714325ed0ce674124c 100644 (file)
@@ -45,14 +45,28 @@ INCLUDES
 #include "FGModel.h"
 #include "FGMatrix.h"
 
+#define ID_POSITION "$Header$"
+
+
+/*******************************************************************************
+DEFINITIONS
+*******************************************************************************/
+
+/** Models the lateral and longitudinal translational EOM.
+    @author Jon S. Berndt
+    @version $Id$
+  */
 /*******************************************************************************
 CLASS DECLARATION
 *******************************************************************************/
 
 class FGPosition : public FGModel {
+  
   FGColumnVector vUVW;
   FGColumnVector vVel;
-
+  FGColumnVector vVelDot;
+  FGColumnVector vRunwayNormal;
+  
   double Vee, invMass, invRadius;
   double Radius, h;
   double LatitudeDot, LongitudeDot, RadiusDot;
@@ -61,8 +75,9 @@ class FGPosition : public FGModel {
   float dt;
   double RunwayRadius;
   double DistanceAGL;
+  double SeaLevelRadius;
   double gamma;
-  double Vt;
+  double Vt, Vground;
   double hoverb,b;
 
   void GetState(void);
@@ -72,25 +87,36 @@ public:
   ~FGPosition(void);
 
   inline FGColumnVector GetVel(void) { return vVel; }
+  inline FGColumnVector GetVelDot(void) { return vVelDot; }
   inline FGColumnVector GetUVW(void) { return vUVW; }
-  inline double GetVn(void)  { return vVel(1); }
-  inline double GetVe(void)  { return vVel(2); }
-  inline double GetVd(void)  { return vVel(3); }
+  inline double GetVn(void)  { return vVel(eX); }
+  inline double GetVe(void)  { return vVel(eY); }
+  inline double GetVd(void)  { return vVel(eZ); }
+  inline double GetVground(void) { return Vground; }
   inline double Geth(void)  { return h; }
   inline double Gethdot(void) { return RadiusDot; }
   inline double GetLatitude(void) { return Latitude; }
+  inline double GetLatitudeDot(void) { return LatitudeDot; }
   inline double GetLongitude(void) { return Longitude; }
+  inline double GetLongitudeDot(void) { return LongitudeDot; }
   inline double GetRunwayRadius(void) { return RunwayRadius; }
   inline double GetDistanceAGL(void)  { return DistanceAGL; }
+  inline FGColumnVector GetRunwayNormal(void) { return vRunwayNormal; }
+  
   inline double GetGamma(void) { return gamma; }
+  inline void SetGamma(float tt) { gamma = tt; }
   inline double GetHOverB(void) { return hoverb; }
   void SetvVel(const FGColumnVector& v) { vVel = v; }
   void SetLatitude(float tt) { Latitude = tt; }
   void SetLongitude(double tt) { Longitude = tt; }
-  void Seth(double tt) { h = tt; }
+  void Seth(double tt);
   void SetRunwayRadius(double tt) { RunwayRadius = tt; }
-  void SetDistanceAGL(double tt) { DistanceAGL = tt; }
-
+  void SetSeaLevelRadius(double tt) { SeaLevelRadius = tt;}
+  void SetDistanceAGL(double tt);
+  inline void SetRunwayNormal(double fgx, double fgy, double fgz ) {
+      vRunwayNormal << fgx << fgy << fgz;
+  }
+  
   bool Run(void);
 };