gpt4 book ai didi

accelerometer - 如何从加速度计数据中获取线性加速度

转载 作者:行者123 更新时间:2023-12-04 03:36:34 25 4
gpt4 key购买 nike

我正在使用 IMU(3 轴加速度计、3 轴陀螺仪、3 轴磁力计),我想从加速度计数据中获取线性加速度。我了解传感器融合以及使用陀螺仪数据(并获取方向)获取重力矢量的能力,从而消除其对相应轴的影响。

我走的路对吗?如果可以的话,你能帮忙吗?


之后我将对加速度进行两次积分以获得如下所示的位置

        CurrentAcceleration[0] = e.Accelerometer[0];
CurrentAcceleration[1] = e.Accelerometer[1];
CurrentAcceleration[2] = e.Accelerometer[2];

//we need to get the linear acceleration instead of the read data !!

CurrentVelocity[0] += (CurrentAcceleration[0] + PreviousAcceleration[0]) / 2;
CurrentVelocity[1] += (CurrentAcceleration[1] + PreviousAcceleration[1]) / 2;
CurrentVelocity[2] += (CurrentAcceleration[2] + PreviousAcceleration[2]) / 2;

Position[0] += (CurrentVelocity[0] + PreviousVelocity[0]) / 2 ;
Position[1] += (CurrentVelocity[1] + PreviousVelocity[1]) / 2 ;
Position[2] += (CurrentVelocity[2] + PreviousVelocity[2]) / 2 ;

PreviousAcceleration[0] = CurrentAcceleration[0];
PreviousAcceleration[1] = CurrentAcceleration[1];
PreviousAcceleration[2] = CurrentAcceleration[2];

PreviousVelocity[0] = CurrentVelocity[0];
PreviousVelocity[1] = CurrentVelocity[1];
PreviousVelocity[2] = CurrentVelocity[2];

最佳答案

Won't work.

您无法获得准确的位置甚至速度。在上面的链接中,您可以找到实际可以做些什么的提示。

顺便弹出这个问题surprisingly often .

关于accelerometer - 如何从加速度计数据中获取线性加速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10965636/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com