|
From: David M. <da...@me...> - 2001-06-18 18:47:19
|
After a few gdb sessions, I think I've found the reason that FlightGear isn't passing JSBSim the proper on-runway altitude at startup time. In src/Scenery/tilemgr.cxx, FGTileMgr::update tries to ensure that at least the tile immediately under the aircraft is loaded right away, so that it can provide the proper ground elevation to the other subsystems (fgInitSubsystems invokes FGTileMgr::update right at the start, before the FDM is initialized). Once it has loaded the tile, FGTileMgr::update invokes FGTileMgr::current_elev_ssg to calculate the ground elevation. Unfortunately, for reasons that I do not yet understand, this method always fails and returns an elevation of 0 (that's what Tony was seeing: 0 + 3.28 feet). As a result, JSBSim is initialized with the incorrect altitude, and all hell breaks loose. In fact, gdb always shows the vector passed to this method as a null pointer, but that must be a gdb bug (since the method itself doesn't segfault). It would be a good idea to make JSBSim robust enough to deal with this kind of problem, but for now, we need to fix current_elev_ssg, preferably for 7.7; when that's done, on-ground starts with JSBSim might start working again. All the best, David p.s. I haven't put this info in the bug-tracking system. -- David Megginson da...@me... |