X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FYASim%2FThruster.cpp;h=cd57745a60b6d2a2129939cb0c5daf5228388291;hb=3ec74d79c23347add2afa088b05ad29af975f65f;hp=0eb047182f3bb1552b9f97b0d004de308337c4a2;hpb=48260480b3be2fea953d51676ea88bb4608a0f96;p=flightgear.git diff --git a/src/FDM/YASim/Thruster.cpp b/src/FDM/YASim/Thruster.cpp index 0eb047182..cd57745a6 100644 --- a/src/FDM/YASim/Thruster.cpp +++ b/src/FDM/YASim/Thruster.cpp @@ -9,6 +9,7 @@ Thruster::Thruster() for(i=0; i<3; i++) _pos[i] = _wind[i] = 0; _throttle = 0; _mixture = 0; + _starter = false; _pressure = _temp = _rho = 0; } @@ -49,17 +50,23 @@ void Thruster::setMixture(float mixture) _mixture = Math::clamp(mixture, 0, 1); } + +void Thruster::setStarter(bool starter) +{ + _starter = starter; +} + void Thruster::setWind(float* wind) { int i; for(i=0; i<3; i++) _wind[i] = wind[i]; } -void Thruster::setAir(float pressure, float temp) +void Thruster::setAir(float pressure, float temp, float density) { _pressure = pressure; _temp = temp; - _rho = _pressure / (287.1 * _temp); + _rho = density; } }; // namespace yasim