> We should probably come up
> with some kind of standard way for the FDM to signal to the rest of
> the simulator that it has detected a collision and stopped.

I agree it's time for crash detection and handling.  I just added a basic 
version to my OV-10 sim (can't have public users wallowing around 
underground, wondering what to do now :)  One decision to make is what the 
handler should do once a crash is detected.  I have it calling the reinit 
code in order to reset the sim to the starting position (below), while others 
may prefer to have the sim close after a crash, or perhaps display a 
crash-splash screen and/or console warning.

     // force a sim reset if crashed (altitude AGL < 0)
     if (get_Altitude_AGL() < 0.0) {
          SGPropertyNode* node = fgGetNode("/sim/presets", true);
          globals->get_commands()->execute("old-reinit-dialog", node);

The above went in JSBSim.cxx because I couldn't figure out where to put it so 
that all FDM's could have the same crash detector/handler.


Flightgear-devel mailing list

Reply via email to