Mathias:
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:
parent
6d5e37f674
commit
4bd2314430
1 changed files with 6 additions and 6 deletions
|
@ -487,6 +487,12 @@ void FGJSBsim::update( double dt )
|
||||||
// translate JSBsim back to FG structure so that the
|
// translate JSBsim back to FG structure so that the
|
||||||
// autopilot (and the rest of the sim can use the updated values
|
// autopilot (and the rest of the sim can use the updated values
|
||||||
copy_from_JSBsim();
|
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) );
|
speedbrake_pos_pct->setDoubleValue( FCS->GetDsbPos(ofNorm) );
|
||||||
spoilers_pos_pct->setDoubleValue( FCS->GetDspPos(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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue