Jump to content
The simFlight Network Forums

FSUIPC and FS2002 Computation Cycles


Recommended Posts

When FS data is read using the Read and Process commands from FSUIPC, is there any guarantee that the data read is all at the same effective time? If not, then is all the data at least within one Flight Simulator computation cycle of each other? If so, what is the Flight Simulator computation time step?

Link to comment
Share on other sites

When FS data is read using the Read and Process commands from FSUIPC, is there any guarantee that the data read is all at the same effective time?

If you do all the reads then execute the Process call, yes -- with minor exceptions where the values are derived inside FSUIPC from others and are of lower priority and therefore not computed on every cycle. For all the values important to flying the aircraft they will have been obtained from FS within the same "frame".

Your cycle should be to accumulate all the read and write requests, then Process, then sleep or something (to give others a chance), then do it all again.

what is the Flight Simulator computation time step?

Well your guess is as good as mine. I always tend to think this is the "frame" (as measured by the frame rate), but there are fast cycles going on inside too. Each process going on in FS adds itself to one or more "chains" (there are 30-50 of these as far as I can tell). Some chains are timer instigated (eg one timer tick, 55 mSecs), others appear to be frame rate related -- but some are a lot slower, and some 3 or 4 times faster. Many are only executed on specific events, like a weather change.

In the past a lot of my work with FS was based on the idea of a synchronous "step", with nothing actually happening betwen steps, and everything needed calculated each time. I think it might have been like that once, but as the programmers have striven for greater realism, better graphics, and more smoothness, I think all the various subsystems have become rather de-synchronised. With this in mind, some values may be less "up to date" than others even without FSUIPC's priority system for derived values.

Regards,

Pete

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.