David Culp:
This version handles a zero fuel load better. I found that if you try to consume fuel from an empty tank, with zero fuel flow, the FGEngine::Starved flag alternates
This commit is contained in:
parent
c5137afccc
commit
2c3fa12eea
1 changed files with 4 additions and 2 deletions
|
@ -77,6 +77,7 @@ double FGSimTurbine::Calculate(double dummy)
|
||||||
// calculate virtual throttle position (actual +/- lag) based on
|
// calculate virtual throttle position (actual +/- lag) based on
|
||||||
// FCS Throttle value (except when trimming)
|
// FCS Throttle value (except when trimming)
|
||||||
if (dt > 0.0) {
|
if (dt > 0.0) {
|
||||||
|
Running = !Starved;
|
||||||
ThrottleCmd = FCS->GetThrottleCmd(EngineNumber);
|
ThrottleCmd = FCS->GetThrottleCmd(EngineNumber);
|
||||||
if ( ThrottleCmd > throttle ) {
|
if ( ThrottleCmd > throttle ) {
|
||||||
throttle += (dt * delay);
|
throttle += (dt * delay);
|
||||||
|
@ -88,13 +89,14 @@ double FGSimTurbine::Calculate(double dummy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Starved = false;
|
||||||
throttle = ThrottleCmd = FCS->GetThrottleCmd(EngineNumber);
|
throttle = ThrottleCmd = FCS->GetThrottleCmd(EngineNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
idlethrust = MaxMilThrust * ThrustTables[0]->TotalValue();
|
idlethrust = MaxMilThrust * ThrustTables[0]->TotalValue();
|
||||||
milthrust = MaxMilThrust * ThrustTables[1]->TotalValue();
|
milthrust = MaxMilThrust * ThrustTables[1]->TotalValue();
|
||||||
|
|
||||||
if (!Starved) {
|
if (Running) {
|
||||||
thrust = milthrust * throttle * throttle;
|
thrust = milthrust * throttle * throttle;
|
||||||
if (thrust < idlethrust) thrust = idlethrust;
|
if (thrust < idlethrust) thrust = idlethrust;
|
||||||
FuelFlow_pph = thrust * TSFC;
|
FuelFlow_pph = thrust * TSFC;
|
||||||
|
@ -113,7 +115,7 @@ double FGSimTurbine::Calculate(double dummy)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
thrust = 0.0;
|
thrust = 0.0;
|
||||||
FuelFlow_pph = 0.0;
|
FuelFlow_pph = 0.000001;
|
||||||
N1 -= (dt * 3.0);
|
N1 -= (dt * 3.0);
|
||||||
if (N1 < (Translation->Getqbar()/10.0)) N1 = Translation->Getqbar()/10.0;
|
if (N1 < (Translation->Getqbar()/10.0)) N1 = Translation->Getqbar()/10.0;
|
||||||
N2 -= (dt * 3.5);
|
N2 -= (dt * 3.5);
|
||||||
|
|
Loading…
Add table
Reference in a new issue