1 #ifndef _PROPENGINE_HPP
2 #define _PROPENGINE_HPP
4 #include "Thruster.hpp"
11 class PropEngine : public Thruster {
13 PropEngine(Propeller* prop, PistonEngine* eng, float moment);
14 virtual ~PropEngine();
16 void setMagnetos(int magnetos);
17 void setAdvance(float advance);
18 void setPropPitch(float proppitch);
19 void setVariableProp(float min, float max);
20 void setGearRatio(float ratio) { _gearRatio = ratio; }
22 virtual PropEngine* getPropEngine() { return this; }
23 virtual PistonEngine* getPistonEngine() { return _eng; }
24 virtual Propeller* getPropeller() { return _prop; }
27 virtual bool isRunning();
28 virtual bool isCranking();
29 virtual void getThrust(float* out);
30 virtual void getTorque(float* out);
31 virtual void getGyro(float* out);
32 virtual float getFuelFlow();
34 // Runtime instructions
36 virtual void integrate(float dt);
37 virtual void stabilize();
40 void setOmega (float omega);
48 int _magnetos; // 0=off, 1=right, 2=left, 3=both
50 float _advance; // control input, 0-1
54 float _omega; // RPM, in radians/sec
62 #endif // _PROPENGINE_HPP