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.
// 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();
+ }
}
/******************************************************************************/
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;
}