1
0
Fork 0
Turns out to be a bad interaction between jsbsims crash detection and my
past initialization changes.
The attached patch fixes this by moving crash detection out of the
initialization phase of jsbsim.
This commit is contained in:
ehofman 2005-07-27 11:53:47 +00:00
parent 6d5e37f674
commit 4bd2314430

View file

@ -487,6 +487,12 @@ void FGJSBsim::update( double dt )
// translate JSBsim back to FG structure so that the
// autopilot (and the rest of the sim can use the updated values
copy_from_JSBsim();
// crashed (altitude AGL < 0)
if (get_Altitude_AGL() < 0.0) {
crash_message = "Attempted to fly under ground.";
crash_handler();
}
}
/******************************************************************************/
@ -817,12 +823,6 @@ bool FGJSBsim::copy_from_JSBsim()
speedbrake_pos_pct->setDoubleValue( FCS->GetDsbPos(ofNorm) );
spoilers_pos_pct->setDoubleValue( FCS->GetDspPos(ofNorm) );
// crashed (altitude AGL < 0)
if (get_Altitude_AGL() < 0.0) {
crash_message = "Attempted to fly under ground.";
crash_handler();
}
return true;
}