Hi!

The other day I opened this bug:
http://code.google.com/p/flightgear-bugs/issues/detail?id=1248

I have started to look into it to see if I could provide a patch. The cause was actually quite easy to spot around line 200 in Time/TimeManager.cxx

  ...
  dt = double(multiLoop)/double(_modelHz);

  realDt = dt;
  if (_clockFreeze->getBoolValue() || wait_for_scenery) {
    simDt = 0;
  } else {
    simDt = dt;
  }
  ...

The code does not take into account time warping/speedup. Now, when I look in the code at how time warping works, I find two separate concepts exposed in two different properties: sim/time/warp & sim/time/speed-up.

The difference is also made in the user interface, where you can set time warping and speed-up independently. Apparently, speed-up affects the aircraft only (physics & instrumentation), and warp affects the environment only (ephemeris, for example).

This effectively establishes two independent timelines inside and outside the aircraft, so there is no single value for "elapsed simulated time", i.e. it depends whether we are talking in or out the plane!

Could someone shed some light on the rationale behind this approach?