|
From: David M. <da...@me...> - 2001-06-14 22:51:52
|
js...@ha... writes: > Unfortunately - and as David mentions - this is likely an > initialization problem. Tony deals with initialization, but he is > very busy at the moment and I don't want to bother him with this > for a little while. OTOH, I really need to dig into this a bit more > and understand it - and to some extent I have. However, the code > on the FlightGear side that sets up the FDM initially and sets in > motion the initializations (note the plural) is something I have > not understood, yet. Jon might remember that I moved all of the initialization code into src/FDM/JSBSim.cxx precisely so that there would be no confusion about what is happening, and so that initialization would take place in files under Jon's and Tony's control. Here's the call sequence: 1. src/Main/fg_init.cxx invokes FGInterface::init() on the current FDM. 2. since FGInterface::init is virtual, FGJSBSim::init() actually gets invoked for JSBSim. 3. FGJSBSim::init explicitly invokes the superclass method FGInterface::init() before doing its own initialization (you guys control the file, so you can change that if you want). In other words, *all* of the initialization code is in FGInterface::init() in flight.cxx and in FGJSBSim::init() in JSBSim.cxx. > I have a hunch that JSBSim gets initialized > properly at some point, but then is once again re-initialized > superfluously and ambiguously and that's when things go screwy. I fixed that problem at Jon's and Tony's request a few months ago. To verify, I just cranked up a build from today's CVS in gdb, and confirmed that FGJSBSim::init is invoked only once. All the best, David -- David Megginson da...@me... |