X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FYASim%2FThruster.hpp;h=c022ebaa424b563d8839c25b4aee884c01c1f6be;hb=13db36f67912be03c2e970e84cdcdbd41dddb61c;hp=b99c854a88e78592fd8d5a99a573cc431449dfbe;hpb=48260480b3be2fea953d51676ea88bb4608a0f96;p=flightgear.git diff --git a/src/FDM/YASim/Thruster.hpp b/src/FDM/YASim/Thruster.hpp index b99c854a8..c022ebaa4 100644 --- a/src/FDM/YASim/Thruster.hpp +++ b/src/FDM/YASim/Thruster.hpp @@ -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;