On Wednesday 24 October 2007 19:41, Curtis Olson wrote:
> On 10/24/07, leee  wrote:
> > Hmm... I always thought that it ran asynchronously from the rest of
> > FG, at a steady rate.  Surely this can't be a good thing?
> >
> > It really seems to me that the only subsystem in FG where variable
> > timing won't cause a problem is the display, where it doesn't
> > matter if you're seeing 25 fps or 60 fps, or anything in between.
>
> Here's a quick explanation.
>
> The FDM runs at 120 hertz and with a fixed time step.
>
> However, we play one small trick to make that happen.  We take the
> time that has elapsed since the last frame, compute how many whole
> iterations of the FDM will fit in that time slice (at 1/120th of a
> second per iteration.) Then we invoke the FDM that many times with a
> time step of 1/120th of a second.  Finally we save out the remainder
> and add that into the next time slice.
>
> This can produce a small amount of temporal jitter between the
> graphics and the fdm if the graphics frame rates are not a diviser of
> 120.  In the best case scenario, you've locked your graphics frame
> rate to 60 hz so the FDM runs exactly 2 iterations every time it is
> invoked and there is no temporal jitter at all, ever.
>
> One thing to keep in mind is that handing a different size time slice
> to the FDM every frame (and sometimes that time slice could be 1
> second or more?) can lead to instabilities in the math.  So our
> approach is intended to avoid that potential problem.  As far as the
> FDM is concerned, it *is* running asyncronously, at a fixed time
> step.  But, we are playing a little trick on the FDM (it doesn't
> care) in order to handle the unfortunate possibility of non-fixed and
> highly variable frame rates on PC hardware running consumer grade
> operating systems.
>
> Regards,
>
> Curt.

Thanks for the explanation - I think I'll need a little while to get my 
head around the paradigm shift though:)  I was under the impression 
that the FDMs got a constant/continuous 120Hz.  Seems to work for the 
FDMs ok though:)

On my 1.7 GHz Athlon XP+Nv6600 256MB based system I was getting anything 
between 45-20 fps, depending on the view I was using and what was in 
the background (I increased the visibility ranges over the default 
settings, so there was an additional performance hit there).  Synching 
to vblank never made any difference here but with those frame rates I 
wasn't too surprised.

LeeE

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to