Forums

Full Version: logging distance, speed, acceleration data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am a high school Physics and Math teacher and am interested in
using VDrift to teach my students how to interpret
distance-time, velocity-time, and acceleration-time graphs.

Has anyone attempted to make the VTech software report time, distance, velocity, and acceleration in a format to be imported to an Excel file?
Hi

Quote:to make the VTech software report
What is VTech?

Quote:teach my students how to interpret
distance-time, velocity-time, and acceleration-time graphs
You mean along current movement direction(scalar values)?

Some info:
Vdrift is using the Bullet Physics engine for the simulation. This means you have a first-order integrator(semi implicit euler). It is oblivious of acceleration as such, but the value can be calculated from the velocity delta of course.

How are your programming skills? I could hack a patch to enable logging in form of a comma-separated values file(csv):
Acc,Vel,Dist
0,0,0
...
You mean along current movement direction(scalar values)?

Yes
How are your programming skills? I could hack a patch to enable logging in form of a comma-separated values file(csv):
Acc,Vel,Dist
0,0,0

My programming skills are almost nonexistant but I may be able to find someone that can do some programming. The csv file sounds great! Could you add a value for time in seconds?
Quote:programming skills are almost nonexistant
That's OK. I will upload a binary(for windows?).
Yes Windows.

Thanks.
Windows build with two cars and two tracks(I'll upload the patch to github): http://www.gamefront.com/files/20543976/vdrift-log.zip

To run with logging use vdrift-log.bat. It starts vdrift with:
Code:
vdrift -motion-log 30

30 is the sampling frequency. The simulation runs at 90Hz. Thus the sampling frequency is restricted to 1-90Hz. Additionally the sampling period is truncated to be multiple of the simulation time step.

The output is written into log.txt in the executable directory. It contains the forward acceleration, velocity and distance samples in car reference frame.
Wow!

Thank you very much!