RenCloud / scs-sdk-plugin

ETS2 (Euro Truck Simulator 2) & ATS (American Truck Simulator) SDK plug-in. Telemetry data is shared via SharedMemory/Memory Mapped Files.
MIT License
185 stars 35 forks source link

Data collect timestamp #74

Closed Cheltone closed 3 years ago

Cheltone commented 3 years ago

Hello and great work with the SDK! Could you explain how I can extract a timestamp for each point in the exported CSV? Thanks!

RenCloud commented 3 years ago

Hi and thanks.

The project didn't create a csv. It creates a shared memory map. The client then read the shared memory and creates a c# object from it. From that you could create a csv.

What exactly did you expect to have as result?

As timestamp there exist different kind of values

Cheltone commented 3 years ago

Thanks for getting back to me! Overall, I am hoping to record vehicle velocity or speed in m/s, acceleration, steering wheel angle, RPM, and breaking. I hope to have each correlated with either the Simulation timestamp or Telemetry and export a CSV for the sim. Is this possible?

Does the Sim timestamp record while the mission is ongoing? If so that might be best.

Cheltone commented 3 years ago

Does that all make sense?

RenCloud commented 3 years ago

Sorry for the delay. As far as i understand you this should be possible.

With mission you mean a job? Than yes. All 3 timestamps are changing when the simulation is running (truck drives). Only the telemetry timestamp will stop if stop the simulation. Also all 3 timestamps coming from the sdk.

When you take a look at the demo application you see that it displays the data every 100ms. Instead of rendering the values you would write the needed datafields to a file. If 100ms to slow you could reduce the refresh rate, but that can lead to errors when its to low. Which could be fixed when you only need these few data fields.

To be more correct when using the update flag the data will only be refreshed when the simulation is running. That should be the case for the demo application, but you could change this line to see the behavior if you ignore it. When you ignore that flag the data will be still be updated, but no value will change. Beside one or two.