开发者

Filter out the accelerometers noise using Kalman filter in Python

I get from a socket a stream of data from an accelerometer with a lot of noise.

something like this:
...开发者_如何学Go
-0.014532123
0.183950298
0.003323536
-0.342343526
...

I tried with low pass filter but I can't get a really smoothed result.. I think I need to use Kalman filter so I have to implement a function that "corrects" every element of the stream

stream_element_out = kalman(stream_element_in)

I'm using python and I searched all over the web, finding many examples, but I can't understand how I can apply it to my project :).. someone can explain me an easy way to implement this algorithm please? :)


Taking an average of the last x results could do the smoothing.

x would be a constant that can be tweaked for the best results depending on your application

You can also filter out input that is more than y off from the average of the last x numbers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜