Strategy for filtering the data from accelerometers?

With my DIY CAN reader, I've achieved a ~50 Hz refresh rate on a bunch of data channels, including the data from accelerometers of my car's ESC system.

However, there are a couple of problems now:
1) The data from accelerometers is pretty noisy
2) The GPS data channel seems to have a ~0.5s delay compared to the CAN data

See example screenshot here: https://imgur.com/Vdjma0r
Colors: green — accelerator pedal; orange — brake pedal; cyan —combined acceleration from GPS; purples — combined acceleration calculated from the CAN bus data.

I'm thinking that both problems can be worked around by introducing a software 0.5s buffer, and by applying some averaging/filtering to the accelerometer data coming from the CAN bus.

However, is this the right strategy?
Or perhaps RaceChrono could offer some tools to
a) apply configurable averaging/filtering/smoothing for data channels
b) allow offsetting data from individual data sources
?

Should I just wait until such improvements are made, or if they are unlikely to arrive in the next few months, perhaps I should invest into the workaround described above, at least temporarily?
Let me know how to proceed with my project more effectively.
Thanks!

Comments

  • aolaol
    edited October 21
    When creating a commercial device it really makes sense to output synchronised data, as all the built-in delays of the hardware are known. But for DIY device it adds a lot of complications and you could leave that for RaceChrono. I've had the data delay adjust feature on my TO-DO list for a long time, and it should be in v7.1 if I don't run in to problems.

    You can also do averaging on the device, but I have user configurable filtering on my TO-DO list as well, although it won't be done in the very near future. I have many more important ones to do before that.
  • Got it, thanks! Sounds like I shouldn't bother with the delay/offset for now, but might want to experiment with averaging/filtering.

Sign In or Register to comment.