_mixCoeff = realFlow * 1.1f / _omega0;
_turbo = 1;
+ _minthrottle = 0.1;
_maxMP = 1e6; // No waste gate on non-turbo engines.
_wastegate = 1;
_charge = 1;
_compression = c;
}
+void PistonEngine::setMinThrottle(float m)
+{
+ _minthrottle = m;
+}
+
float PistonEngine::getMaxPower()
{
return _power0;
// We need to adjust the minimum manifold pressure to get a
// reasonable idle speed (a "closed" throttle doesn't suck a total
// vacuum in real manifolds). This is a hack.
- float _minMP = (-0.008 * _turbo ) + 0.1;
+ float _minMP = (-0.008 * _turbo ) + _minthrottle;
_mp = pressure * _charge;
// pressure change can be assumed to be adiabatic. Calculate a
// temperature change, and use that to get the density.
// Note: need to model intercoolers here...
- float T = temp * Math::pow(_mp/pressure, 2.0/7.0);
+ float T = temp * Math::pow((_mp*_mp)/(pressure*pressure), 1.0/7.0);
float rho = _mp / (287.1f * T);
// The actual fuel flow is determined only by engine RPM and the