The online racing simulator
OutSim communication frequency
(2 posts, started )
OutSim communication frequency
I want to send the telemetry data by OutSim to a C++ programe using UDP. And I have succeeded to receive data in my C++ programe. But there is a problem that when i exit the game, my C++ programe continue to receive datas until a few seconds later which appears that the communication between OutSim and my C++ programe is delayed.

The frequency in my C++ code is 10ms, i would like to ask what is the frequency of the OutSim and how can i match it with my C++ programe in UDP?

Furthermore, when i output the data of Time and ID, the numbers look a little strange as shown in the following.What are the meanings of Time and ID in the OurSim data?

Time: 3155158152
ID: -1155076736
Angular Velocity (x,y,z): -0.0119994,-0.0404766,-0.0833928

You should note that 10ms between outSim packets is only valid as long as you have a rock-solid 100fps in the game. If it drops below 100fps, packets will no longer have 10ms separation, therefore - you may lose the sync between your app and LFS.

The ID of the outSim packet is just an identifier number such that you could in principle send different packets from 2 LFS instances to the same app, they would differ in this preset ID number.

Time has the units of milliseconds I think. For both time and ID, it seems like you are not converting the bits correctly into a number, you may want to check that, have a look into inSim.txt and outSim_packets.txt

OutSim communication frequency
(2 posts, started )
FGED GREDG RDFGDR GSFDG