> > I believe you are seeing the results of a new capability that Dave Culp
> > added to JSBSim recently.
>
> Aaah, I sense something: This might be a means to automagically
> re-incarnate crashed AI aircraft  :-)

Actually I added the reset-after-crash to my OV-10 sim because it will be used 
by the public, and they will crash often and not know why the crashed 
airplane is floating under the surface of the earth.  I added it to JSBSim, 
thinking that nobody else wanted subterranean floating airplanes.  Here's the 
code location so you can remove it:

See source/src/FDM/JSBSim/JSBSim.cxx  in the function named  
copy_from_JSBSim(), at about line 848:

    // 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);
    }


It uses some pre-existing reset code that I found bound to a key in 
keyboard.xml.   It seems to work well here, although the report of 
the /fdm/jsbsim property node being cloned after every reset is a problem.

You can comment out the code completely, or if you need lat/lon for the crash 
site you can add that as console output in the above block of code.

I'll look into the node cloning today if I get a chance.


Dave

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to