Melchior sent me a property dump of the YF-23 in the wacky superthrust
state. The only really obvious problem was a giant negative engine RPM, which happened because of a lack of clamping in the engine code combined with the YF-23's ability to actually reach speeds near the engines _vMax value. It's not clear to me that this will fix the superthrust issue at high AoA's, but it's an obvious bug nonetheless.
This commit is contained in:
parent
16b11e311c
commit
95da644df9
1 changed files with 3 additions and 3 deletions
|
@ -142,10 +142,10 @@ void Jet::integrate(float dt)
|
|||
const static float T0 = Atmosphere::getStdTemperature(0);
|
||||
const static float D0 = Atmosphere::getStdDensity(0);
|
||||
|
||||
float speed = -Math::dot3(_wind, _dir);
|
||||
float spd = -Math::dot3(_wind, _dir);
|
||||
|
||||
float statT, statP, statD;
|
||||
Atmosphere::calcStaticAir(_pressure, _temp, _rho, speed,
|
||||
Atmosphere::calcStaticAir(_pressure, _temp, _rho, spd,
|
||||
&statP, &statT, &statD);
|
||||
_pressureCorrect = statP/P0;
|
||||
_tempCorrect = Math::sqrt(statT/T0);
|
||||
|
@ -157,7 +157,7 @@ void Jet::integrate(float dt)
|
|||
_throttle = 0;
|
||||
|
||||
// Linearly taper maxThrust to zero at vMax
|
||||
float vCorr = 1 - (speed/_vMax);
|
||||
float vCorr = spd<0 ? 1 : (spd<_vMax ? 1-spd/_vMax : 0);
|
||||
|
||||
float maxThrust = _maxThrust * vCorr * (statD/D0);
|
||||
float setThrust = maxThrust * _throttle;
|
||||
|
|
Loading…
Reference in a new issue