No description
65f6e343ab
The files in the attached tarball make the following changes to FlightGear: - rename the existing FGInterface::init() method to FGInterface::_setup to get it out of the way - move *all* FDM initialization code out of src/Main/fg_init.cxx and into FGInterface::init(), and clean up fg_init.cxx a little (especially by removing the zillions of attempts to place the plane on the ground at various locations in the code) - modify FGInterface::bind() so that no values are picked up automatically at bind time (they are set previously by init() instead) - modify the init() methods of the classes derived from FGInterface (i.e. larcsim, jsbsim, balloon, magic, and ada) to invoke FGInterface::init() explicitly before doing their own setup I don't claim that the code in FGInterface::init() is optimal (or even correct), but it seems to work for on-ground starts with both LaRCSim and JSBSim on runways pointing various directions from near sea level to about 700' ASL (the range I happened to test). I expect that Jon and Tony will want to look at the code and refactor and correct it now that they can see what's going on in one place. Here's a quick outline of what is invoked: cur_fdm_state = new <whatever>(dt); cur_fdm_state->init(); cur_fdm_state->bind(); The constructor allocates memory and sets default values only (with the help of the FGInterface::_setup() method). The init() method pull any required properties out of the property tree and sets up the initial state of the FDM. The bind() method takes ownership of FDM-related properties so that the FDM can publish them to the rest of the sim. Note that bind() and init() are virtual, so any implementation in a subclass will hide the implementation in FGInterface; that's why subclass implementations of init() and bind() have to invoke FGInterface::init() and FGInterface::bind() explicitly, probably at the start, so that they get the basic initialization. |
||
---|---|---|
docs-mini | ||
src | ||
tests | ||
acconfig.h | ||
aclocal.m4 | ||
acsite.m4 | ||
AUTHORS | ||
ChangeLog | ||
config.guess | ||
config.sub | ||
Done | ||
FlightGear.dsp | ||
FlightGear.dsw | ||
irix-hack.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
Thanks |
Welcome to the FlightGear Flight Simulator project. =================================================== The primary web page for this project is: http://www.flightgear.org For basic installation instructions see the "INSTALL" file. Before you can run FlightGear you will also need to download and install the "base" package which is a collection of textures, sounds, sample scenery, and other data files need by the sim. For additional install help for specific platforms please browse the "docs-mini/" subdirectory. More complete documentation is available from our web page as a separate distribution. Please take a look at the "Thanks" file for a list of people who have contributed to this project. If you have contributed something but don't find your name in this file. Please send a polite reminder to curt@flightgear.org For a summary of changes/additions by version see the "NEWS" file. This project is GPL'd. For complete details on our licensing please see the "COPYING" file. For information on available mailing lists, mailing list archives, and other available source code and documenation, please visit our web site. FlightGear is a product of the collaboration of large international group of volunteers. FlightGear is a work in progress. FlightGear comes with no warrantee. We hope you enjoy FlightGear and/or find it of some value!