是否有可能通过一段时间整合加速计数据来计算速度?有可能、速度、数据

2023-09-06 03:58:58 作者:智障老伴i

我想知道如果我可以使用(线性)加速度计和罗盘来计算速度,而无需使用定位服务。我想这样做,通过计算加速度分量由南/西/上轴和整合他们在一段时间。

I'm wondering if I can use (linear) accelerometer and compass to calculate velocity without using location services. I want to do that by calculating acceleration components by north/west/up axes and integrating them over time.

将这项工作?

推荐答案

在理论上,你可以做到这一点;在实践中,没有

In theory, you could do this; in practice, no.

您必须假设你知道的初始速度,但假设你从0开始的速度是没有这样一个坏的假设。

You would have to assume you know an initial velocity, but assuming you start at 0 velocity isn't such a bad assumption.

您还必须知道设备在整个期间的实际方向。否则,你不能区分变化的加速度,由于实际的加速度随刚轮换设备。

You would also have to know the actual orientation of the device throughout the whole period. Otherwise you can't differentiate change in acceleration due to actual acceleration versus just rotation the device.

(记住,你必须拿出加速度由于从读数重力!)

(Remember you have to take out the acceleration due to gravity from the readings!)

最后,这些错误会加起来超过一定的时间,这不仅是因为加速的措施是不完美的,但是因为你只能得到离散采样随着时间的推移。

Finally, the errors would add up over some time, not only because the measure of acceleration is imperfect, but because you only get discrete samples over time.

除了所有这些事情,当然,它的工作原理!该API不告诉你哪个单位的读数的(米/秒^ 2)。你可以问传感器非常快速的更新。我认为这将是有趣的,看看(上)准确的是通过编写一个应用程序,做到这一点,然后把手机平,然后向前走,并用它停止。如何接近0的阅读呢?

Other than all those things, sure, it works! The API does tell you what units the readings are in (m/s^2). You can ask the sensor for very rapid updates. I think it would be interesting to see how (in)accurate it is by writing an app that does this and then putting the phone flat and then walking forward and stopping with it. How close to 0 is the reading then?