1 #ifndef _PROPENGINE_HPP
2 #define _PROPENGINE_HPP
4 #include "Thruster.hpp"
11 class PropEngine : public Thruster {
13 PropEngine(Propeller* prop, Engine* eng, float moment);
14 virtual ~PropEngine();
16 void setEngine(Engine* eng) { delete _eng; _eng = eng; }
18 void setMagnetos(int magnetos);
19 void setAdvance(float advance);
20 void setPropPitch(float proppitch);
21 void setVariableProp(float min, float max);
22 void setPropFeather(int state);
23 void setGearRatio(float ratio) { _gearRatio = ratio; }
24 void setContraPair(bool contra) { _contra = contra; }
26 virtual PropEngine* getPropEngine() { return this; }
27 virtual Engine* getEngine() { return _eng; }
28 virtual Propeller* getPropeller() { return _prop; }
31 virtual bool isRunning();
32 virtual bool isCranking();
33 virtual void getThrust(float* out);
34 virtual void getTorque(float* out);
35 virtual void getGyro(float* out);
36 virtual float getFuelFlow();
38 // Runtime instructions
40 virtual void integrate(float dt);
41 virtual void stabilize();
44 void setOmega (float omega);
52 bool _contra; // contra-rotating propeller pair
53 int _magnetos; // 0=off, 1=right, 2=left, 3=both
55 float _advance; // control input, 0-1
59 float _omega; // RPM, in radians/sec
67 #endif // _PROPENGINE_HPP