]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Thruster.hpp
latest updates from JSBSim
[flightgear.git] / src / FDM / YASim / Thruster.hpp
index b99c854a88e78592fd8d5a99a573cc431449dfbe..c022ebaa424b563d8839c25b4aee884c01c1f6be 100644 (file)
@@ -6,7 +6,7 @@ namespace yasim {
 class Jet;
 class PropEngine;
 class Propeller;
-class PistonEngine;
+class Engine;
 
 class Thruster {
 public:
@@ -19,7 +19,7 @@ public:
     virtual Jet* getJet() { return 0; }
     virtual PropEngine* getPropEngine() { return 0; }
     virtual Propeller* getPropeller() { return 0; }
-    virtual PistonEngine* getPistonEngine() { return 0; }
+    virtual Engine* getEngine() { return 0; }
     
     // Static data
     void getPosition(float* out);
@@ -30,16 +30,21 @@ public:
     // Controls
     void setThrottle(float throttle);
     void setMixture(float mixture);
+    void setStarter(bool starter);
+    void setFuelState(bool hasFuel) { _fuel = hasFuel; }
 
     // Dynamic output
+    virtual bool isRunning()=0;
+    virtual bool isCranking()=0;
     virtual void getThrust(float* out)=0;
     virtual void getTorque(float* out)=0;
     virtual void getGyro(float* out)=0;
-    virtual float getFuelFlow()=0;
+    virtual float getFuelFlow()=0; // in kg/s
 
     // Runtime instructions
     void setWind(float* wind);
-    void setAir(float pressure, float temp);
+    void setAir(float pressure, float temp, float density);
+    virtual void init() {}
     virtual void integrate(float dt)=0;
     virtual void stabilize()=0;
 
@@ -48,6 +53,8 @@ protected:
     float _dir[3];
     float _throttle;
     float _mixture;
+    bool _starter; // true=engaged, false=disengaged
+    bool _fuel; // true=available, false=out
 
     float _wind[3];
     float _pressure;