]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGEngine.h
Merge branch 'next' into durk-atc
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGEngine.h
index 8a3f51a8e47c87da7e255706db99f7901a80db23..03b774d94301d4ab91aa884746c317011d2eefde 100644 (file)
@@ -43,7 +43,7 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#include "FGJSBBase.h"
+#include "math/FGModelFunctions.h"
 #include "input_output/FGXMLFileRead.h"
 #include "input_output/FGXMLElement.h"
 #include "models/FGFCS.h"
@@ -55,7 +55,7 @@ INCLUDES
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_ENGINE "$Id: FGEngine.h,v 1.20 2010/02/25 05:21:36 jberndt Exp $"
+#define ID_ENGINE "$Id: FGEngine.h,v 1.23 2011/03/03 12:16:26 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -118,14 +118,14 @@ CLASS DOCUMENTATION
        documentation for engine and thruster classes.
 </pre>     
     @author Jon S. Berndt
-    @version $Id: FGEngine.h,v 1.20 2010/02/25 05:21:36 jberndt Exp $
+    @version $Id: FGEngine.h,v 1.23 2011/03/03 12:16:26 jberndt Exp $
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-class FGEngine : public FGJSBBase, public FGXMLFileRead
+class FGEngine : public FGModelFunctions, public FGXMLFileRead
 {
 public:
   FGEngine(FGFDMExec* exec, Element* el, int engine_number);
@@ -146,6 +146,7 @@ public:
   virtual double getFuelFlow_gph () const {return FuelFlow_gph;}
   virtual double getFuelFlow_pph () const {return FuelFlow_pph;}
   virtual double GetFuelFlowRate(void) const {return FuelFlowRate;}
+  virtual double GetFuelUsedLbs(void) const {return FuelUsedLbs;}
   virtual bool   GetStarved(void) { return Starved; }
   virtual bool   GetRunning(void) const { return Running; }
   virtual bool   GetCranking(void) { return Cranking; }
@@ -165,18 +166,14 @@ public:
   /** Resets the Engine parameters to the initial conditions */
   void ResetToIC(void);
 
-  /** Calculates the thrust of the engine, and other engine functions.
-      @return Thrust in pounds */
-  virtual double Calculate(void) {return 0.0;}
+  /** Calculates the thrust of the engine, and other engine functions. */
+  virtual void Calculate(void) = 0;
 
   /// Sets engine placement information
   virtual void SetPlacement(FGColumnVector3& location, FGColumnVector3& orientation);
 
   virtual double GetPowerAvailable(void) {return 0.0;};
 
-  virtual bool GetTrimMode(void) {return TrimMode;}
-  virtual void SetTrimMode(bool state) {TrimMode = state;}
-
   virtual FGColumnVector3& GetBodyForces(void);
   virtual FGColumnVector3& GetMoments(void);
 
@@ -220,12 +217,12 @@ protected:
   bool  Starved;
   bool  Running;
   bool  Cranking;
-  bool  TrimMode;
   bool  FuelFreeze;
 
   double FuelFlow_gph;
   double FuelFlow_pph;
   double FuelDensity;
+  double FuelUsedLbs;
 
   FGFDMExec*      FDMExec;
   FGAtmosphere*   Atmosphere;
@@ -237,6 +234,7 @@ protected:
   FGThruster*     Thruster;
 
   std::vector <int> SourceTanks;
+
   void Debug(int from);
 };
 }