Sign in to follow this  
rcbarend

Using absolute time Vs a gauge update time:FPS changes ...

Recommended Posts

I have some gauges that depend upon a timer to make them show correct readouts. I presently do this by using something like: (L:allowstart,enum) 1 == (A:General eng2 starter, bool) && (L:N1startN1,enum) 16 <= && if{ (L:N1startN1,enum) 0.170 + (>L:N1startN1,enum) } So with a gauge refresh rate of 6, I get 6 x 0.170 to give me 1.02 in (>L:N1startN1,enum).Problem is, this rate is affected by the FPS of the sim. One would think a gauge refresh rate is a constant, but that is not so. Gauge refresh rates are altered by the FPS of the sim. So the gauge will still refresh at 6, but the FPS changes the value set in (>L:N1startN1,enum). Faster FPS faster update, and vice versa.So I want to use a variable that is NOT affected by FPS, and was thinking about replacing the counter (L:N1startN1,enum) 0.170 + (>L:N1startN1,enum) with (P:Local time,seconds).Trouble is I cannot get the (P:Local time,seconds) to give me any sensible, useable reading.ANy hints or thoughts?Steve

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Steve,Normal framerates do NOT influence the scheduling of gauges.So if you define the gauge refresh rate at 6, the gauge is scheduled 6 times per second, independant on framerate.Except, when framerate is extreme low (lower than 6 fps in this case).So for exact readout that will always work, you better use the FS timer as reference.(P:LOCAL TIME,seconds) by itself works OK (it gives the time in seconds after midnight, so a value between 0 and 86400)Disadvantage is that it reverts to 0 at midnight (so you have to test for that) and it also changes when you cross a time zone when flying.SO you best use (P:ABSOLUTE TIME,seconds), and just compare the actual time in each gauge schedule, with the intial value you should save when the gauge loads.Cheers, ROb

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this