Android应用开发中如何使用加速度计测量距离 [英] How to use Accelerometer to measure distance for Android Application Development

查看:24
本文介绍了Android应用开发中如何使用加速度计测量距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是应用程序开发行业的初学者.我知道加速度计可用于返回沿三个轴的当前加速度,以米每秒平方 (m/s2) 为单位.但我知道加速度计也可以用作速度计.

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.

我想知道如何使用加速度计来确定 Android 设备在兴趣点之间移动的距离.如果可能,那么我该如何实施呢?我看过一个类似的问题如何使用加速度计测量 Iphone 行驶的距离"如何使用加速度计测量 iPhone 行驶的距离?.但我没有说到点子上.

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.

谢谢,阿尔斯兰

推荐答案

你可以通过对线性加速度进行两次积分来获得位置,但错误很可怕.实践中没用.

You get position by integrating the linear acceleration twice but the error is horrible. It is useless in practice.

这是 23:20 的解释原因(Google 技术讲座).我强烈推荐这个视频.

Here is an explanation why (Google Tech Talk) at 23:20. I highly recommend this video.

类似问题:

在没有 GPS 的情况下跟踪 iphone 的小动作
手机加速度计用于定位时的真实世界精度是多少?
如何从静止状态计算手机在垂直方向上的移动?
iOS:3D 空间中的运动精度

这篇关于Android应用开发中如何使用加速度计测量距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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