]> git.mxchange.org Git - flightgear.git/commitdiff
Fix JSBsim trimming on reposition.
authorJames Turner <zakalawe@mac.com>
Thu, 6 Mar 2014 11:20:54 +0000 (11:20 +0000)
committerJames Turner <zakalawe@mac.com>
Thu, 6 Mar 2014 22:33:42 +0000 (22:33 +0000)
- 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
src/Main/fg_init.cxx

index 03bc13dbeda1abf97e7b4eda2729b4621fd00229..9f8ed776163951891b319834b28fd0ce3e6df6a9 100644 (file)
@@ -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()
index a52216acc63c3b3107a709d7d5f97b3806615cf6..5e0e71368e1cd54ace35dcae40b937c8764b3e1b 100644 (file)
@@ -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