From cce6e3e350b08d0dba26b965896f07df7047bd7a Mon Sep 17 00:00:00 2001 From: Chris Birkhold Date: Fri, 17 May 2024 17:19:24 -0700 Subject: [PATCH 1/2] Clamp AugmentCmd to [0.0..1.0] when deriving its value from ThrottlePos. --- src/models/propulsion/FGTurbine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/models/propulsion/FGTurbine.cpp b/src/models/propulsion/FGTurbine.cpp index 5a2f510e20..9353d520d7 100644 --- a/src/models/propulsion/FGTurbine.cpp +++ b/src/models/propulsion/FGTurbine.cpp @@ -115,6 +115,9 @@ void FGTurbine::Calculate(void) if (ThrottlePos > 1.0) { AugmentCmd = ThrottlePos - 1.0; ThrottlePos -= AugmentCmd; + if (AugmentCmd > 1.0) { + AugmentCmd = 1.0; + } } else { AugmentCmd = 0.0; } From ec6969809cc1929270b7138c681c644e7f907e72 Mon Sep 17 00:00:00 2001 From: Chris Birkhold Date: Sat, 18 May 2024 11:34:40 -0700 Subject: [PATCH 2/2] Limit clamping of the augmented range to current 'method two' ... this avoid conflicts with potential future augmentation modes while keeping the thrust produced for 'method two' within the range configured for the turbine. --- src/models/propulsion/FGTurbine.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/models/propulsion/FGTurbine.cpp b/src/models/propulsion/FGTurbine.cpp index 9353d520d7..0b5c737415 100644 --- a/src/models/propulsion/FGTurbine.cpp +++ b/src/models/propulsion/FGTurbine.cpp @@ -115,9 +115,6 @@ void FGTurbine::Calculate(void) if (ThrottlePos > 1.0) { AugmentCmd = ThrottlePos - 1.0; ThrottlePos -= AugmentCmd; - if (AugmentCmd > 1.0) { - AugmentCmd = 1.0; - } } else { AugmentCmd = 0.0; } @@ -246,7 +243,7 @@ double FGTurbine::Run() if (AugmentCmd > 0.0) { Augmentation = true; double tdiff = (MaxThrust * MaxThrustLookup->GetValue()) - thrust; - thrust += (tdiff * AugmentCmd); + thrust += (tdiff * std::min(AugmentCmd, 1.0)); FuelFlow_pph = Seek(&FuelFlow_pph, thrust * ATSFC->GetValue(), 5000.0, 10000.0); NozzlePosition = Seek(&NozzlePosition, 1.0, 0.8, 0.8); } else { @@ -368,7 +365,7 @@ double FGTurbine::Trim() if (AugMethod == 2) { if (AugmentCmd > 0.0) { double tdiff = (MaxThrust * MaxThrustLookup->GetValue()) - thrust; - thrust += (tdiff * AugmentCmd); + thrust += (tdiff * std::min(AugmentCmd, 1.0)); } }