Talk:FlightGear Sessions: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
Line 15: Line 15:
* remove assumption: always FDM running, always panel present (i.e. replay mode)
* remove assumption: always FDM running, always panel present (i.e. replay mode)
* generic protocol playback
* generic protocol playback
* without scenery


= FG Initialization =
= FG Initialization =

Revision as of 11:33, 29 June 2010

Related discussions

Thinking in terms of FG startup modes

"FlightGear is an old code base, and lots of the old assumptions (like a single aircraft) need to be teased out of the code before progress can be made on new features. This kind of work isn't glamorous, and often requires more effort than the new development does. But it's not brain surgery either." [1]

  • without FDM
  • without 2D/3D panel
  • remove the implicit assumption that FG always simulates an aircraft (FDM + instrumentation + panel) (think non-aircraft or non-FDM modes, i.e. ATC)
  • start up without aircraft
  • reload vehicles, ATC
  • remove assumption: always FDM running, always panel present (i.e. replay mode)
  • generic protocol playback
  • without scenery

FG Initialization

  • should be decoupled from the entry loop, so that it can also be invoked by setting a listener (i.e. aircraft-name) - so that switching aircraft would boil down to setting a property to a valid filename, which in turn would invoke all the relevant init routines.
  • just adding such a listener right away, would also make it much more straightforward to run everything in a debugger and see how things need to be changed to make it work
  • things would probably be simplified quite a bit by modifying FlightGear so that it can be started without specifying and running any aircraft at all, that in itself would remove the assumption that FlightGear is always simulating a particular aircraft, so that the init code could be properly modified to provide support for changing aircraft.

Global State Management

In its current form, FlightGear fails badly whenever it has to deal with managing global state - that applies to many situations and components:

  • simulator resets (partial) [2] [3] [4]
  • saving/loading, resuming flights (partial) [5] [6]
  • simulator replays (along with an option to continue flights)
  • saving/loading startup "situations" (partial) - similar to loading saved flights
  • internal subsystem state [7] [8]
  • property "classes" (velocities, orientation, position, cockpit animations, exterior animations, instrumentation) - select classes and reset/save/load accordingly
  • provide corresponding signal handlers: reinit/reset, save-state, load-state etc
  • have aircraft authors provide scripts to register listeners for the corresponding signals and implement corresponding aircraft specific handlers to handle cleanup/reinit work