From 5ce2a067ca17c7158920dea317dabbc88e415915 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 6 Mar 2014 11:20:54 +0000 Subject: [PATCH] Fix JSBsim trimming on reposition. - remove the entire /fdm tree on reposition - force the initial NED wind values to 0.0 in JSBsim, pending advice from people who know better. --- src/FDM/JSBSim/JSBSim.cxx | 4 +--- src/Main/fg_init.cxx | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index 03bc13dbe..9f8ed7761 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -389,9 +389,7 @@ void FGJSBsim::init() Winds->SetProbabilityOfExceedence(0.0); } - fgic->SetWindNEDFpsIC( -wind_from_north->getDoubleValue(), - -wind_from_east->getDoubleValue(), - -wind_from_down->getDoubleValue() ); + fgic->SetWindNEDFpsIC(0.0, 0.0, 0.0); SG_LOG(SG_FLIGHT,SG_INFO,"T,p,rho: " << Atmosphere->GetTemperature() << ", " << Atmosphere->GetPressure() diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index a52216acc..5e0e71368 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -952,6 +952,8 @@ void fgStartReposition() fgSetBool("/sim/crashed", false); globals->get_subsystem("flight")->unbind(); + + globals->get_props()->removeChild("fdm"); // update our position based on current presets // this will mark position as needed finalized which we'll do in the -- 2.39.5