]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropulsion.h
First steps in a weather reorganization. Note especially that
[flightgear.git] / src / FDM / JSBSim / FGPropulsion.h
index 4070128fc0e8047a9c350e52e4a7d0a86acf8dcd..ba1747a1cb5c1f979bd4e65d199d5284444273a2 100644 (file)
@@ -136,6 +136,9 @@ public:
                       if (index <= Engines.size()-1) return Engines[index];
                       else                           return 0L;      }
 
+  // Retrieves the number of tanks defined for the aircraft.
+  inline unsigned int GetNumTanks(void) {return Tanks.size();}
+
   /** Retrieves a tank object pointer from the list of tanks.
       @param index the tank index within the vector container
       @return the address of the specific tank, or zero if no such tank is
@@ -168,19 +171,19 @@ public:
   string GetPropulsionStrings(void);
   string GetPropulsionValues(void);
 
-  inline FGColumnVector3& GetForces(void)  {return *Forces; }
-  inline float GetForces(int n) { return (*Forces)(n);}
-  inline FGColumnVector3& GetMoments(void) {return *Moments;}
-  inline float GetMoments(int n) {return (*Moments)(n);}
+  inline FGColumnVector3& GetForces(void)  {return vForces; }
+  inline double GetForces(int n) { return vForces(n);}
+  inline FGColumnVector3& GetMoments(void) {return vMoments;}
+  inline double GetMoments(int n) {return vMoments(n);}
   
   FGColumnVector3& GetTanksCG(void);
-  float GetTanksWeight(void);
+  double GetTanksWeight(void);
 
-  float GetTanksIxx(const FGColumnVector3& vXYZcg);
-  float GetTanksIyy(const FGColumnVector3& vXYZcg);
-  float GetTanksIzz(const FGColumnVector3& vXYZcg);
-  float GetTanksIxz(const FGColumnVector3& vXYZcg);
-  float GetTanksIxy(const FGColumnVector3& vXYZcg);
+  double GetTanksIxx(const FGColumnVector3& vXYZcg);
+  double GetTanksIyy(const FGColumnVector3& vXYZcg);
+  double GetTanksIzz(const FGColumnVector3& vXYZcg);
+  double GetTanksIxz(const FGColumnVector3& vXYZcg);
+  double GetTanksIxy(const FGColumnVector3& vXYZcg);
 
 private:
   vector <FGEngine*>   Engines;
@@ -194,11 +197,11 @@ private:
   unsigned int numEngines;
   unsigned int numTanks;
   unsigned int numThrusters;
-  float dt;
-  FGColumnVector3 *Forces;
-  FGColumnVector3 *Moments;
+  double dt;
+  FGColumnVector3 vForces;
+  FGColumnVector3 vMoments;
   FGColumnVector3 vXYZtank;
-  void Debug(void);
+  void Debug(int from);
 };
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%