]> git.mxchange.org Git - flightgear.git/blob - src/FDM/YASim/Jet.cpp
Initial revision of Andy Ross's YASim code. This is (Y)et (A)nother Flight
[flightgear.git] / src / FDM / YASim / Jet.cpp
1 #include "Atmosphere.hpp"
2 #include "Math.hpp"
3 #include "Jet.hpp"
4 namespace yasim {
5
6 Jet::Jet()
7 {
8     _rho0 = Atmosphere::getStdDensity(0);
9     _thrust = 0;
10     _reheat = 0;
11 }
12
13 Thruster* Jet::clone()
14 {
15     Jet* j = new Jet();
16     j->_thrust = _thrust;
17     j->_rho0 = _rho0;
18     return j;
19 }
20
21 void Jet::setDryThrust(float thrust)
22 {
23     _thrust = thrust;
24 }
25
26 void Jet::setReheat(float reheat)
27 {
28     _reheat = reheat;
29 }
30
31 void Jet::getThrust(float* out)
32 {
33     float t = _thrust * _throttle * (_rho / _rho0);
34     Math::mul3(t, _dir, out);
35 }
36
37 void Jet::getTorque(float* out)
38 {
39     out[0] = out[1] = out[2] = 0;
40     return;
41 }
42
43 void Jet::getGyro(float* out)
44 {
45     out[0] = out[1] = out[2] = 0;
46     return;
47 }
48
49 float Jet::getFuelFlow()
50 {
51     return 0;
52 }
53
54 void Jet::integrate(float dt)
55 {
56     return;
57 }
58
59 }; // namespace yasim