Jump to content
The simFlight Network Forums

Getting Flight Simulator local time


Recommended Posts

Hello!

I'm working with MS Flight Simulator 2002 and FSUIPC 3.3.0.0 under Windows XP. I want to get the local time of the Flight Simulator in msec. Unfortunately FSUIPC just offers the possibility of getting the local time in hours, minutes and seconds. How can I get this time more excectly?

Any ideas?

Thanks a lot!

Link to comment
Share on other sites

I want to get the local time of the Flight Simulator in msec. Unfortunately FSUIPC just offers the possibility of getting the local time in hours, minutes and seconds. How can I get this time more excectly?

As far as I know FS doesn't maintain any simulated time in milliseconds, sorry. Why would you want this? If you are merely needing to timestamp something, to show the order of things and time between them, try the millisecond counter in offset 3378. This is the one I use in my Log files. It shows the number of milliseconds since FSUIPC was loaded (which is a little after FS starts of course).

Actually, you could work out simulated time using that value, by noting it when the simulated second changes. But you'd need to scale it by the sim rate if that ever changes, and discount time in menus, time paused, etc etc. It's pretty horrendous.

FS does also maintain its own "tick count" at offset 0310, but this is approximate, is only updated every 55 mSecs or so, and would still not reflect sim rate, pausing and so on.

Regards,

Pete

Link to comment
Share on other sites

First of all thank you for answering my questions so quickly.

Why would you want this?

When I was playing with the Flight Simulator I noticed a kind of time lag. I pressed the P key on my keyboard to set the Flight Simulator on Pause, but the vertical speed display (and only this display) didn't stop immediately.

Is that normal?

I had the idea to measure this time lag if it existed.

To do this I want to read the local time directly after I press the P key and some seconds after that. If there is a difference between this two Measurements I know that there is a time lag.

The problem is that I can't read the milliseconds of the local time and so it's not possible to proof the time lag.

Perhaps you have any ideas how I can measure the time lag in a better way?

Thanks a lot,

Jens

Link to comment
Share on other sites

When I was playing with the Flight Simulator I noticed a kind of time lag. I pressed the P key on my keyboard to set the Flight Simulator on Pause, but the vertical speed display (and only this display) didn't stop immediately. Is that normal?

No idea. It probably depends how the gauge is written. I don't know much about them I'm afraid.

I had the idea to measure this time lag if it existed.

To do this I want to read the local time directly after I press the P key and some seconds after that. If there is a difference between this two Measurements I know that there is a time lag.

I'm afraid that there will be milliseconds between pushing the P key and everything pausing in any case, and if you are also reading things through FSUIPC there will be milliseconds there too -- process switching (twice), message processing, and so on.

And in any case, if there were a millisecond local time count, how would you know that this was being stopped at the same time as the last time your VSI adjusted itself? It might be stopping before or after that.

Perhaps you have any ideas how I can measure the time lag in a better way?

Since the only evidence you have of a so-called "time lag" is the movement of a needle on one gauge, only (?), I can't see how you can do it programmatically at all. You'd have to use a stop watch, or if your reactions are not quick enough, make a high speed film of you pressing P and the VSI needle still moving, then count the frames on the film.

I really don't see the point though, I must admit.

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.