如何获得加速度计的轴和运动矢量之间的旋转? [英] How to get the rotation between accelerometer's axis and motion vector?

查看:18
本文介绍了如何获得加速度计的轴和运动矢量之间的旋转?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Android 上开发行人导航系统.我目前正在尝试获取 3 轴加速度计参考和应用于设备的运动之间的旋转矩阵.

I'm working on a Pedestrian Navigation System on Android. I am currently trying to get the rotation matrix between the 3-axis accelerometer referential and the motion that is applied to the device.

假设您拿着设备笔直向前走,但是加速度计的 Y 轴(因此设备的 Y 轴)与您自己的方向不同(基本上是您)以尴尬的方式重新握住设备).然后,如果我想应用距离(基于步长检测),将它们应用到加速度计参考(我知道方向)是错误的:它必须根据运动航向进行相应旋转.

Let's say you are walking straight forward with the device in your hand, but the Y axis of the accelerometer (thus the device's Y axis) is not oriented in the same direction as the one you're heading yourself (basically you're holding the device in an awkward way). Then if I want to apply distances (based on step detection), it would be wrong to apply them to the accelerometer referential (which I know the orientation) : it has to be rotated accordingly to the motion heading.

这就是为什么我想知道您是否可以启发我有关计算加速度计读数以将它们转换为旋转角度(或矩阵)的方法.这种方法必须避免对加速度进行一次积分,因为在廉价的加速度计上误差非常大(否则我认为执行起来会很容易).

This is why I would like to know if you could enlighten me about a method to compute the accelerometer readings to turn them into rotation angles (or a matrix). Such a method has to avoid integrating the acceleration even once, as the error is abyssal on cheap accelerometers (otherwise it would be pretty easy to perform I think).

磁力计和陀螺仪可帮助您找到设备的方向,即使在静止状态下,但不允许您知道设备移动的方向.我有第一个,我正在寻找第二个.基本上:

EDIT : Magnetometer and Gyroscope help you to find the device's orientation even when stationnary, but doesn't allow you to know in which direction the device is moving. I have the first one, and I'm searching for the second. Basically :

人类参考(运动方向)-> 设备参考(或加速度计参考)-> 地球参考

Human Referential (motion direction) -> Device Referential (or accelerometer referential) -> Earth Referential

我正在寻找方法来找到旋转矩阵来计算从 HR 到 DR 的距离,然后我将其应用于我发现从 DR 到 ER 的旋转矩阵.

and i'm searching the way to find the rotation matrix to compute distances from HR to DR, which I would then apply to the rotation matrix I found to go from DR to ER.

推荐答案

我找到了一篇可能有用的文章,这里是 链接.
该想法基于获取 3 轴上的加速度计数据,(即 n 乘以 3矩阵)并找到矩阵的 PCA(主成分分析).PCA是矩阵中能量最高的3个向量).
理想情况下,主向量(具有最高能量)的方向是向上的,第二个是航向的方向.您可以在文章中阅读所有内容.我尝试在 matlab 中实现该算法,结果还可以.(不是很好)希望你能做得更好(我想听听好的结果).

I found an article which might be useful, here is the link.
The Idea is based upon acquiring the accelerometer data in the 3 axis, (which is an n times 3 matrix) and finding the PCA (principle component analysis) of the matrix. The PCA is the 3 vectors with the highest energy of the matrix).
Idealy, the main vector (with the highest energy) direction is upwards, and the second is the heading direction. You can read it all in the article. I tried implementing the algorithm in matlab, the result is o.k. (not great) Hope you can do better (I would like to hear about good results).

希望能帮到你

爱丽儿

这篇关于如何获得加速度计的轴和运动矢量之间的旋转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆