From bf851605fbfe1bfbb8305ef8f912fc1449b3b544 Mon Sep 17 00:00:00 2001 From: bcoconni Date: Sun, 17 Jan 2016 10:26:25 +0100 Subject: [PATCH] Fixed a bug which caused the solid propellant thrusters of the space shuttle to be unconditionnally ignited during the trimming. --- src/FDM/JSBSim/models/FGPropulsion.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/FDM/JSBSim/models/FGPropulsion.cpp b/src/FDM/JSBSim/models/FGPropulsion.cpp index 31d3b7380..e886e5036 100644 --- a/src/FDM/JSBSim/models/FGPropulsion.cpp +++ b/src/FDM/JSBSim/models/FGPropulsion.cpp @@ -281,15 +281,13 @@ bool FGPropulsion::GetSteadyState(void) int steady_count = 0, j = 0; bool steady = false; bool TrimMode = FDMExec->GetTrimStatus(); - bool suspended = FDMExec->IntegrationSuspended(); + double TimeStep = FDMExec->GetDeltaT(); vForces.InitMatrix(); vMoments.InitMatrix(); if (!FGModel::Run(false)) { FDMExec->SetTrimStatus(true); - if (suspended) - FDMExec->ResumeIntegration(); // This is a time marching algorithm so it needs a non-zero time step to // reach a steady state. in.TotalDeltaT = 0.5; @@ -317,12 +315,7 @@ bool FGPropulsion::GetSteadyState(void) } FDMExec->SetTrimStatus(TrimMode); - if (suspended) { - FDMExec->SuspendIntegration(); - in.TotalDeltaT = 0.0; - } - else - in.TotalDeltaT = FDMExec->GetDeltaT() * rate; + in.TotalDeltaT = TimeStep; return false; } else { -- 2.39.5