Android应用程序开发中如何使用加速度计测量距离
我只是应用程序开发行业的初学者。我知道加速度计可用于返回沿三个轴的当前加速度,以米每秒平方 (m/s2) 为单位。但我开始知道加速度计也可以用作速度计。
我想知道如何使用加速度计来确定 Android 设备在兴趣点之间行驶的距离。如果可以的话,我该如何实现呢?我看到过类似的问题“如何使用加速度计测量 Iphone 行驶的距离”如何使用加速计测量 iPhone 行驶的距离?。但我没有说到点子上。
谢谢你, 阿尔斯兰
I am just a beginner in the application development industry. I know the accelerometer can be used to return the current acceleration along three axis in meters per second squared (m/s2). But I have come to know that an accelerometer can also be use as speedometer.
I want to know how I can use accelerometer to determine distance traveled by Android device between points of interest. If it is possible, then how can I implement it? I have seen a similar question "how do I measure the distance traveled by an Iphone using accelerometer" How do I measure the distance traveled by an iPhone using the accelerometer?. But I didn't come to a point.
Thank You,
Arslan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过对线性加速度进行两次积分来获得位置,但是误差非常可怕。它在实践中毫无用处。
这是原因的解释(Google 技术讲座) 23:20。我强烈推荐这个视频。
类似问题:
在没有 GPS 的情况下跟踪 iphone 的小动作
手机加速度计用于定位时的真实准确度是多少?
如何计算手机从静止状态到垂直方向的移动量?
iOS:3D 空间中的运动精度
You get position by integrating the linear acceleration twice but the error is horrible. It is useless in practice.
Here is an explanation why (Google Tech Talk) at 23:20. I highly recommend this video.
Similar questions:
track small movements of iphone with no GPS
What is the real world accuracy of phone accelerometers when used for positioning?
how to calculate phone's movement in the vertical direction from rest?
iOS: Movement Precision in 3D Space
您可以将其与 GPS 定位结合起来,并使用卡尔曼滤波器过滤数据。
GPS 提供粗略但稳定的位置,而加速计提供更准确但漂移的位置。
You can combine it with GPS positioning, and filter data with Kalman filter.
GPS give rough but stable position, while accelerometer give more accerate but drifting position.