如何用加速度计和陀螺仪通过电话测量汽车的速度? [英] How to measure the speed of car by phone with accelerometer and gyroscope?

查看:23
本文介绍了如何用加速度计和陀螺仪通过电话测量汽车的速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道汽车的当前速度并确定经过的路径.我有一部带有加速度计和陀螺仪的 Android 手机,它向我发送了数据.这是电话坐标系中的数据,可能与汽车坐标系不同.

I want to know current speed of car and make a passed path. I have an Android phone with accelerometer and gyroscope which sent me data. This is the data in phone system of coordinate that probably wouldn't the same as coordiante system of car.

如何将加速度和旋转转换为汽车坐标系?

How I can transform this accelerations and rotations to car system of coordinate?

推荐答案

一般问题的一般答案是no.加速度衡量速度的变化,因此您可以从加速度中获得最好的结果是速度变化.

The generic answer for your generic question is no. The acceleration measures the changes in the speed, so the best you could get from acceleration, is the speed variation.

要获得绝对速度,您必须拥有初始速度并将其添加到速度变化中:

To get the absolute speed you would have to have the initial speed and add it to the speed change:

v(t) = v0 + a*t

因此,如果您让汽车沿直线行驶,并且您的设备固定在汽车上,则可以轻松获得速度变化(尽管测量误差会累加并迅速导致差异)

So, if you would have a car moving along a straight line, and your device was fixed to the car, you could get easly the speed changes (although measurements errors will add up and quickly lead to discrepancies)

在实践中,你会在尝试实现它时面临许多问题,即:

In practice you will face many issues trying to implement it, namely:

  • 您需要根据与加速度相同的参考来确定初始速度.这将需要一些测量和大量的三角测量,因为您将从不同的传感器以不同的速率获得这两个值.
  • 汽车不会直线移动,因此您的加速度参考将不断移动(更多的是三角学和微积分).
  • 如果设备在用户手中,设备相对于汽车的运动会增加更多的计算(和累积误差).
  • You need the initial speed to be determinate based on the same referential as the acceleration. This would require some measurements and a lot of trignometry, as you would get both values from different sensores at different rates.
  • The car will not move in a straight line, so your acceleration referential will be constantly moving (a lot more of trignometry and calculus).
  • If the device is in the user hand, the device movements in relation to the car will increase even more the calculations (and accumulated errors).

问候.

这篇关于如何用加速度计和陀螺仪通过电话测量汽车的速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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