On Sun, Jan 23, 2011 at 4:57 PM, Jon S. Berndt wrote: > I'd like to find a way to reinitialize an instance of JSBSim in FlightGear > without having to destruct it and reinstantiate it. A couple of years ago I > changed the construction process and separated out a reset/reinitialization > feature to permit a sim to be reset, bypassing the loading of aircraft > models. That saved a lot of time. I think that process should be looked at > for resetting JSBSim in FlightGear, too.
Of course, you can provide a "reset" method, which removes the need to create a fresh instance whenever the sim is reset. But then again, you could also call the same reset method in the constructor - and the members would also be initialized for fresh objects - still allowing the current scheme. So it doesn't change much for the initialization of variables - it still needs to be ensured that no uninitialized variables are used - and that no values from a previous "simulator life" (= last update loop before reset) are used in the first update loop after the sim's reset, since the reset may have changed absolutely anything (location/winds/pressures/temperatures/...). But yes, a reset method would give more flexibility and maybe help with other issues (such as the property tie/untieing) - which is yet another discussion... :) Well, to return to something more practical after all this theoretical talk about initialization and compilers (alsways fun on a rainy/foggy/chilly afternoon *brr* :) ) could you Jon, or another JSBSim expert please double check the particular issue that Andreas spotted concerning last_hook_tip / last_hook_root ? It indeed looks as if these weren't initialized but their values possibly used in calculations of the first few update loops. Not quite easy to spot though. And anyone else interested in FDMs and their FlightGear integration: there is more to do! Just check the bug tracker for FDM issues: http://code.google.com/p/flightgear-bugs/issues/list?q=FDM Mainly issues concerning FDM start-up (i.e. feeding initial values for speed/pitch/roll/... into the FDMs doesn't work properly). Most affect YASim, some JSBSim or both. cheers, Thorsten ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Flightgear-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/flightgear-devel

