GPS定位准确性问题 [英] GPS Location Accuracy Issue

查看:181
本文介绍了GPS定位准确性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款使用高分辨率GPS数据的Android应用。它被设计用于汽车,所以我不太担心电池寿命。我注意到当我在Google导航应用程序运行时运行我的应用程序时,我的GPS数据精确度在几(<10)米之内。

I'm working on an Android app that uses high-resolution GPS data. It's designed to be used in a car, so I'm not too worried about battery life. I've noticed that when I run my app while the stock Google navigation app is running, my GPS data has accuracy within several (< 10) meters.

然而,当我在没有导航应用程序的情况下运行我的应用程序时,我的位置数据开始准确,但很快变得很差(在1000米内)。我的应用程序位于 PARTIAL_WAKE_LOCK 中,因此CPU保持运行,但屏幕可以关闭。

However, when I run my app without the navigation app, my location data starts off precise, but soon becomes poor (within 1000 m). I have my app in a PARTIAL_WAKE_LOCK so the CPU keeps running, but the screen can shut off.

这是怎么回事我要求GPS位置:

Here's how I'm requesting GPS location:

requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,GPSListener);

有没有人知道更精确地请求数据的方法? Android文档声称这意味着单独的GPS通话之间的时间或距离没有下限。但显然股票导航应用程序正在采取不同的做法。有没有人有任何想法?在此先感谢。

Does anyone know of a way to request data more precisely? The Android Docs claim this means there is no lower limit on the time or distance between separate GPS calls. But clearly the stock navigation app is doing something differently. Does anyone have any ideas? Thanks in advance.

推荐答案

您应该使用 requestLocationUpdates
(long minTime,float minDistance,Criteria criteria, PendingIntent intent)

并将条件设置为ACCURACY_HIGH以及您可能探索的其他一些选项。如果您也使用WiFi网络,那么您还可以获取单元格位置以提供更高的准确性。

You should use requestLocationUpdates (long minTime, float minDistance, Criteria criteria, PendingIntent intent) And set the criteria to ACCURACY_HIGH and some other options you may explore. If you are using the WiFi network too then you can also get the cell locations to provide more accuracy.

这篇关于GPS定位准确性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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