GPS V.S.加速度计来计算距离 [英] GPS V.S. accelerometer to calculate distance

查看:586
本文介绍了GPS V.S.加速度计来计算距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现一个健身应用程序,可以追踪的运行速度和运行距离的Andr​​oid。

I am trying to implement a fitness app that can keep track of the running speed and running distance in Android.

它看起来像我可以用GPS或加速度计来计算这些信息。

It looks like I can either use GPS or Accelerometer to calculate these information.

由于一个运动员可以把他的手机在手,肩膀上或放在口袋里,我的第一直觉是使用GPS获取位置和计算运行速度和运行距离。但最近有人telled我,我也可以用加速度计也做到这一点。

Since a runner may put his phone in hand, on the shoulder or in his pocket, my first intuition is to use GPS to get locations and calculate running speed and running distance. But recently someone telled me that I can also use Accelerometer also does that.

我的问题是:在Android中,哪种方法更好的计算运行速度和跑动距离,GPS和加速计

My question is: In Android, which approach is better to calculate running speed and running distance, GPS or Accelerometer?

推荐答案

我怀疑计步器基于加速度计,因为加速度计成本比GPS使用。其实我觉得很多计步器甚至不尝试测量距离。只是加速颠簸这等于步骤。然后如果他们给你一个距离测量,它是由一个猜测或平均步长乘以检测步骤。

I suspect that pedometers are based on accelerometers because accelerometers are cheaper than GPS to use. in fact I think a lot of pedometers don't even try to measure distance. just acceleration jolts which equal steps. and then if they give you a distance measurement, it's by multiplying detected steps by a guessed or average step size.

GPS(如果你在它工作的区域!)会做的距离很好测量。即使一个非常便宜的GPS接收机。所有被基本确定,你应该会开始和结束位置,以在10m以内,因此对于一公里的旅行,你有uncertianty,也就是2%,总距离uncertianty 20米。这uncertianty下降线性行驶距离(即2公里运行将有1%uncertianty 4公里运行将有0.5%uncertianty等)的问题,这里将成为你的实时显示(从卫星切换GPS位置跳给大量的速度值或信号的直接损失给予的一切,立即显示的数据丢失)

GPS (if you are in an area where it works!) will do a very good measurement of distance. Even with a very cheap GPS receiver. All being basically OK, you should expect start and end positions to within 10m, and so for a 1km travel, you have 20m of uncertianty, which is 2% total distance uncertianty. This uncertianty goes down linearly with distance travelled (ie a 2km run will have 1% uncertianty, 4 km run will have 0.5% uncertianty, etc) the issues here will be with your realtime displays (GPS position jumps from satellite switching giving massive speed values, or immediate loss of signal giving a loss of all immediately displayable data)

我想,有了一个良好的加速度,从停止开始,你可以不断地整合信号来获得速度,并不断整合的结果得到的距离......我只是不能确定什么样的加速度计质量的你在任何给定的电话?您可能需要为噪音甚至垃圾数据过滤..而且你还需要考虑什么精度有。在传感器20%的准确度将使一个非常不好的距离跟踪器。所以,你可能与步数和步长瞎猜工作。

I think that with a good accelerometer, starting from stopped you can continually integrate the signal to get speed, and continually integrate that result to get distance... I am just unsure what kind of accelerometer quality you get in any given phone? you may need to filter for noise or even garbage data.. And you also need to consider what accuracy it has. 20% accuracy in your sensor would make for a very bad distance tracker. So you might have to work with step counting and step size guesstimates.

也许两者的组合可以工作?

perhaps a combination of both could work?

我会尝试使用加速计数据(无论是整合还是步数取决于什么永远是可行的)来跟踪速度和距离在较短的时间内,然后用更长的时间内,广义的GPS数据可以用来纠正或缩放来自加速度计的数据。特别是如果你在任何特定时间过滤基于uncertianty测量/阻止GPS数据。

I'd be tempted to use the accelerometer data (either integrating or step counting depending on what will always work) to track speed and distance in short timeframe, then with much longer timeframe, generalised GPS data could be used to correct or scale that data from the accelerometer. Especially if you filtered/blocked GPS data based on uncertianty measurement at any given time.

这篇关于GPS V.S.加速度计来计算距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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