Jon Berndt writes: > I was remembering first how the F-16 sim at Link was run at 25 Hz, which > is of course 0.04 seconds. Wait ... (thinking, this time). Yes, that's > right ;-) > Then, I went to the numpad on my keyboard and hit 0.01 as I was typing in > the dt for 100 Hz. Only I missed. On purpose or accident I am not sure.
Currently, we have FGSubsystem::update (int dt) where dt represents the elapsed time in ms since the last update. That puts a limit of 2^31 ms, or just under 600 hours, between updates. It has the advantage of keeping us in integer math, and the disadvantage of not being able to represent a granularity of under 1ms. That's OK for a simulator involving human interaction, since we cannot notice such a small difference, but it would obviously be a problem for other kinds of simulations such as rapid chemical reactions. So, what do we do? John mentioned that reporting in sec rather than ms is standard, so do we switch to FGSubsystem::update (double dt_sec) or do we simply rename dt to elapsed_ms FGSubsystem::update (int elapsed_ms) or do stick with ms but allow finer granularity FGSubsystem::update (double elapsed_ms) ? I don't see any harm in sticking with the integer value, but I agree that a better name, proper documentation, and some debugging is essential. All the best, David -- David Megginson, [EMAIL PROTECTED], http://www.megginson.com/ _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel