Sunday, 1 December 2019

Calculating G Force deceleration using linear accelerometer with low pass filter

all.

So basically I'm trying to calculate acceleration in g force using accelerometer. For this I decided to go with Linear accelerometer (because I'll be testing car driving behaviour) with low pass filter.

Code for implementation is found here: code

So now I get x, y, z values. What I want to do is calculate G force using following formula:

sqrt(x*x + y*y + z*z) / 9.8

Whenever I walk I get fgorce from 0.3 to 0.6 g force, but I'm not sure if this is the correct way to calculate gforce. I tried to do test drive and whenever I did a hard brake, I could not get negative acceleration (what I should get, whenever I do hard brake). Also, getting 0.3 - 0.6 gforce isn't too much?

enter image description here

I've a feeling that calculated gforce is too big. Is that true? Is there something missing in my solution?

General idea is to catch not only acceleration, but also deceleration - which should be negative.



from Calculating G Force deceleration using linear accelerometer with low pass filter

No comments:

Post a Comment