这是计算速度的Andr​​oid是否与QUOT最好的方法;利用GPS手工计算坐标"或QUOT; location.getSpeed​​"? [英] which is best way to calculate speed in android whether "manual calculation using GPS coordinates" or "location.getSpeed"?

查看:348
本文介绍了这是计算速度的Andr​​oid是否与QUOT最好的方法;利用GPS手工计算坐标"或QUOT; location.getSpeed​​"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图计算速度的Andr​​oid设备,但是这是要做就做最好的做法,它已经为location.getSpeed​​()函数中使用全球定位系统,就是用这种方式吗?或者我应该计算速度手动使用GPS获得的坐标?

I am trying to calculate speed in android device, but which is the best practice to do it, already it has location.getSpeed() function using GPS, is this best way to use? or should i calculate speed manually using GPS coordinates obtained?

推荐答案

看来,getSpeed​​()方法并不总是可靠的,尤其是在低速行驶时,GPS覆盖不是最佳的。 你可以看看<一href="http://stackoverflow.com/questions/20398898/how-to-get-speed-in-android-app-using-location-or-accelerometer-or-some-other-wa">this问题和<一href="http://stackoverflow.com/questions/21410698/calculating-speed-for-a-navigation-app-without-getspeed-method">this 之一这两者都是有关getSpeed​​替代品()。 该安卓developper页面但是说你会用得到更好的性能在谷歌定位API。

It seems that the getSpeed() method is not always reliable, especially at low speed and when gps coverage is not optimal. You can have a look at this question and this one which are both about alternatives for getSpeed(). The android developper page however says that you'll get better performance by using the Google Location API.

这样看来,选择取决于您的应用程序的使用情况:如果你的目标缓慢位移差的GPS覆盖(走在木)区域,用你自己的实现。快与好的GPS覆盖区域,使用谷歌定位API。

So it appears that the choice is depending on the usage of your app: if you target slow displacement in area with poor gps coverage (walking in the wood), use your own implementation. Fast in area with good GPS coverage, use the Google Location API.

希望它可以帮助你。

这篇关于这是计算速度的Andr​​oid是否与QUOT最好的方法;利用GPS手工计算坐标&QUOT;或QUOT; location.getSpeed​​&QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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