]> git.mxchange.org Git - flightgear.git/blob - src/FDM/YASim/PropEngine.hpp
Initial revision of Andy Ross's YASim code. This is (Y)et (A)nother Flight
[flightgear.git] / src / FDM / YASim / PropEngine.hpp
1 #ifndef _PROPENGINE_HPP
2 #define _PROPENGINE_HPP
3
4 #include "Thruster.hpp"
5
6 namespace yasim {
7
8 class Propeller;
9 class PistonEngine;
10
11 class PropEngine : public Thruster {
12 public:
13     PropEngine(Propeller* prop, PistonEngine* eng, float moment);
14     virtual ~PropEngine();
15     
16     virtual Thruster* clone();
17
18     // Dynamic output
19     virtual void getThrust(float* out);
20     virtual void getTorque(float* out);
21     virtual void getGyro(float* out);
22     virtual float getFuelFlow();
23
24     // Runtime instructions
25     virtual void integrate(float dt);
26
27     float getOmega();
28     
29 private:
30     float _moment;
31     Propeller* _prop;
32     PistonEngine* _eng;
33
34     float _omega; // RPM, in radians/sec
35     float _thrust[3];
36     float _torque[3];
37     float _gyro[3];
38     float _fuelFlow;
39 };
40
41 }; // namespace yasim
42 #endif // _PROPENGINE_HPP