On 30 Oct 2013, at 10:33, Anton Gomez Alvedro <galvedro@gmail.com> wrote:

I don't know! :D It looked like so after this short discussion: http://forum.flightgear.org/viewtopic.php?f=14&t=21020&start=30#p192454

The comments in the code suggest a different concept however:

class FGGlobals {
    // Number of milliseconds elapsed since the start of the program.
    double sim_time_sec;

But the name given to the variable again suggests "simulated time in seconds", not milliseconds since start.

To be honest I wish we did not have those cumulative values - the comments are wrong, the property names are misleading. For 'real' dt (not simulated) we can of course offer elapsed seconds or msec since the program started, but I can't imagine many use cases where that's a genuinely interesting value.

In practice, the variable doesn't grow when the simulator is paused, so the comment doesn't really hold, and it doesn't honour either speed-up nor warp settings, so it doesn't represent simulated time inside nor outside the aircraft. ??? :D

No, but nothing anywhere says that it should represent either of those things (unless we have even more misleading comments or docs?)

If it is not a bug, I guess we can agree that the context surrounding this property is, at least, confusing.

Very likely.

Personally, I tend to agree with James' explanation. It makes sense to me, assuming the ability to warp environment time independently of local aircraft time is a feature. How each system should interact with this concept, even how both timelines should interact to each other, I guess that requires careful thinking.

Note I figured out that explanation by reading the code and guessing, it's not based on anything 'official' :)

I tend to agree with what Torsten wrote - given that these are unphysical things we're doing, there are lots of differing use cases and any link between 'speed-up' and 'warp' is likely to be problematic. I do think including speed-up in sim-dt would be valuable, if it could be done safely, but I'd want to see a pretty convincing audit of Nasal/ and fgdata/Aircraft to establish how the value is being used and what kind of / quantity of bugs we might produce by making such a change.

Kind regards,