Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Time PID and Raw Accelerometer Data

Pages: [1]
Author Topic: Time PID and Raw Accelerometer Data
skylin4
Member
Posts: 1
Post Time PID and Raw Accelerometer Data
on: March 26, 2024 (GMT)

I am trying to make PIDs that will calculate jerk and jounce from the accelerometers on the phone. I was able to build a functional version using this equation for jerk:

([ff1251]-RDLY(2:[ff1251])/.01*9.80665

and this equation for jounce:

(([eabe3e]-[eacc75])/.01)/1000

Where the two PIDs are the PIDs for the current jerk and the jerk for the previous timeframe. For both I had to lock the minimum refresh rate at 10ms.

It works but there are issues in the precision of accelerometer data and in calculating the derivative without being able to access the timestep between data pulls. The accelerometers are only using a 2 digit precision but when the sensor data is saved by the data logger they show far more precision available.

I also cannot figure out how to reference the time of each poll or the timestep between two polls. It would be nice if there was a simple time derivative function available but I’d imagine the time stream can be referenced somehow? I just cant figure out how!

Tl;dr- is it possible to call the raw data stream for the g sensors like the data logging function does in a PID formula? And is there a way for me to access the time that a sensor was polled in a PID formula?

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.006 seconds.

  Follow me on twitter