1
0
Fork 0
flightgear/src/FDM
curt 65f6e343ab From David Megginson:
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.
2001-04-05 20:20:44 +00:00
..
Balloon Irix MipsPro patches and fixes. 2001-04-02 02:59:31 +00:00
JSBSim Data logging patches from Jon Berndt 2001-04-05 15:39:37 +00:00
LaRCsim From: David Megginson <david@megginson.com> 2001-03-29 03:16:25 +00:00
UIUCModel Initial revision. 2001-03-29 13:14:42 +00:00
10520d.cxx FG_ to SG_ namespace changes. 2001-03-23 22:59:18 +00:00
10520d.hxx MacOS changes contributed by Darrell Walisser (12/13/2000) 2000-12-13 23:02:02 +00:00
ADA.cxx From David Megginson: 2001-04-05 20:20:44 +00:00
ADA.hxx Tweaking the FGInterface interface so we can move it towards a more consistant 2001-01-16 21:41:28 +00:00
Balloon.cxx From David Megginson: 2001-04-05 20:20:44 +00:00
Balloon.h Tweaking the FGInterface interface so we can move it towards a more consistant 2001-01-16 21:41:28 +00:00
engine.cxx Renamed new FGEngine to FGNewEngine to avoid conflict with stuff in JSBSim. 2000-10-16 20:01:23 +00:00
External.cxx More "delta-t" and fdm interface timing tweaks. 2001-01-17 02:37:12 +00:00
External.hxx Tweaking the FGInterface interface so we can move it towards a more consistant 2001-01-16 21:41:28 +00:00
flight.cxx From David Megginson: 2001-04-05 20:20:44 +00:00
flight.hxx From David Megginson: 2001-04-05 20:20:44 +00:00
IO360.cxx Irix MIPS patches. 2001-03-26 18:22:31 +00:00
IO360.hxx Irix MIPS patches. 2001-03-26 18:22:31 +00:00
JSBSim.cxx From David Megginson: 2001-04-05 20:20:44 +00:00
JSBSim.hxx Data logging patches from Jon Berndt 2001-04-05 15:39:37 +00:00
LaRCsim.cxx From David Megginson: 2001-04-05 20:20:44 +00:00
LaRCsim.hxx Tweaking the FGInterface interface so we can move it towards a more consistant 2001-01-16 21:41:28 +00:00
LaRCsimIC.cxx Irix MIPS patches. 2001-03-26 18:22:31 +00:00
LaRCsimIC.hxx SG_ namespace 2001-03-24 04:48:44 +00:00
MagicCarpet.cxx From David Megginson: 2001-04-05 20:20:44 +00:00
MagicCarpet.hxx Tweaking the FGInterface interface so we can move it towards a more consistant 2001-01-16 21:41:28 +00:00
Makefile.am I tested: 2000-10-24 00:34:50 +00:00
ps-10520c.cxx Irix MIPS patches. 2001-03-26 18:22:31 +00:00