0

我从一个套接字中得到一个来自加速度计的数据流,其中有很多噪音。

something like this:
...
-0.014532123
0.183950298
0.003323536
-0.342343526
...

我尝试使用低通滤波器,但无法获得真正平滑的结果。我想我需要使用卡尔曼滤波器,所以我必须实现一个“纠正”流中每个元素的函数

stream_element_out = kalman(stream_element_in)

我正在使用 python,我在网上搜索了很多例子,但我不明白如何将它应用到我的项目中:).. 有人可以向我解释一个简单的方法来实现这个算法吗?:)

4

1 回答 1

1

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.

于 2010-11-23T00:32:20.657 回答