Thanks for the reply Pete. I consider it a privilege to have a few moments your time. And I must take this opportunity to say "Thanks" for contributions to the flight sim community. Now, hopefully I can figure out how these forum quotes work...
Is this as an exercise? The Ground Speed is provided by FS and readable in an FSUIPC offset.
Other than an exercise in futility :) the bigger picture is: I'm one in a group of participants using HLA (high level architecture). The real need here is a regular, periodic snapshot of my AC's state values. The other participants may be (make that: are almost certainly) running at a different update (or frame) rates than me. Some participants incorporate my data into their system using dead reckoning and smoothing algorithms.
So what they want is for me to tell them where (and eventually roll/pitch/yaw) I am at a corresponding when I'm there. Based on preliminary testing, my aircraft's track was jumping in their system. I've been tracing the data upstream and found the described GS anomaly (yes, as you say, as an exercise). My suspicion was just as you describe, asynchronous access of the data values.
What show is it stopping? Won't the provided GS do you as a substitute? It is the one FS computes after all.
Yeah, I have the FSX GS value, and it is part of the data exchanged among participants. (sigh) Unfortunately, it doesn't meet the requirements of my fellow participants. As I mentioned, I really desire a timestamp that coincides with my position (state data) at that timestamp.
I have been playing with the sampling interval and have noticed such behavior. Our optimal sampling rate is yet to be determined (a WAG is 10 Hz). I have been told that consistency of the time interval between updates is important, perhaps even more so than a higher frame rate.
I'm proud to say that I did consider that. I even went so far as to do a FSUIPC_Read of the entire chunk (~700 bytes) of data encompassing my variables in one shot and then parse out the few I needed from there.
Bummer. If I understand you correctly, then I may be out of luck. One of the options I was considering was switching from FSUIPC to SimConnect, but it sounds like my results would be no better there. True?
Another possibility I had considered was using the FSUIPC timestamp found at 0x3374. Based on some preliminary testing, it appears to result in more stable AC motion. Yet another thought I had was grabbing the PC system clock upon return from FSUIPC_Process. Any input you might have on these ideas would be appreciated.
A final footnote is that our ultimate platform with be using ESP. (It has been easier thusfar to do the development on FSX.) Off hand, do you know if my results there would be better?
Thanks again for your time.