小编chr*_* LB的帖子

从 IMU 的原始加速度计数据中去除重力--> 请批准数学和算法

我正在使用这个设备(http://www.sparkfun.com/products/10724),并且基于这个http://www.sparkfun.com/products/10724的磁力计、加速度计和陀螺仪数据的融合,成功地实现了相当好的工作方向估计。 x-io.co.uk/node/8#open_source_imu_and_ahrs_algorithms实现。现在我想计算动态加速度(测量没有静态重力加速度的加速度)。为此,我想到了以下想法。

计算原始加速度计数据的运行平均值。如果原始加速度稳定一段时间(运行平均值与当前测量的原始数据之间的微小差异),我们假设设备没有移动,并且我们正在测量原始重力。现在将重力矢量和当前方向保存为四元数。这种方法假设我们的设备在没有重力的情况下无法持续加速。

为了计算没有重力的加速度,我现在正在进行以下四元数计算:


RA = Quaternion with current x,y,z raw acceleration values
GA = Quaternion with x,y,z raw acceleration values of estimated gravity
CO = Quaternion of current orientation
GO = saved gravity orientation

DQ = GO^-1 * CO // difference of orientation between last gravity estimation and current orientation

DQ = DQ^-1 // get the inverse of the difference

SQ = DQ * GA * DQ^1  // rotate gravity vector

DA = RA - …
Run Code Online (Sandbox Code Playgroud)

accelerometer gravity sensors

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

accelerometer ×1

gravity ×1

sensors ×1