FusedLocationApi性能问题:精度似乎限制为10.0米 [英] FusedLocationApi Performance Issue: Accuracy seems capped at 10.0 meters

查看:109
本文介绍了FusedLocationApi性能问题:精度似乎限制为10.0米的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个奇怪的问题,即 FusedLocationProviderAPI 不能给我比10.0米更好的精度值。
它像往常一样开始,给了我很多,例如56米... 24 ... 13 ...,然后保持在10.0。

I'm experiencing a strange problem where the FusedLocationProviderAPI does not give me a better Accuracy number then 10.0 meters. It starts like normal giving me a high number of, for example, 56 meters... 24... 13... and then stays at 10.0. Seemingly capped at giving no better then that.

在电话上尝试过 Sony Xperia Z2 & 华为荣耀8

Tried on Phone Sony Xperia Z2 & Huawei Honor 8

location.getAccuracy() //Seems capped at 10.0 meters

奇怪的是,我收到的精确度数值低至3.0米左右,外面的天气很好,我没有记忆更改手机的GPS选项/或与GPS服务等级有关的任何选项。

The strange part is that I was receiving an Accuracy number down to around 3.0 meters with good weather outside and I have no memory of changing the phones GPS options / nor any options related to the GPS Service Class.

我的应用取决于能否获得尽可能最高的准确度。这里可能是什么问题?手机本身?请求的设置?上限的可能原因?

My app is dependant on being able to get the highest accuracy number possible. What could be the issue here? The Phone itself? The settings of the request? Possible reasons of the capped number?

编辑:尝试使用Huwaei时遇到了相同的问题。那么代码似乎有问题吗?就像在x数量的位置请求之后,系统的精度上限为10.0?

Experienced the same problem when trying on the Huwaei. So there seems to be an issue with the code? Like after x amount of location requests accuracy gets capped at 10.0 from system??

我的GPS服务中的相关内容:

Relevant things from my GPS service:

清单

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />

服务

private long UPDATE_INTERVAL = 2 * 1000;  /* 10 secs */
private long FASTEST_INTERVAL = 2000; /* 2 sec */
static final int MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION = 1;

private void requestLocation() {
    locationRequest = new LocationRequest();
    locationRequest.setInterval(UPDATE_INTERVAL);
    locationRequest.setFastestInterval(FASTEST_INTERVAL);
    locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
    gac = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(LocationServices.API)
            .build();
}

@Override
public void onLocationChanged(Location location) {

    locationData = location; //1. Set local field to incoming location
    gpsAccuracy = location.getAccuracy(); //2. Est. horizontal accuracy of location, radial, in meters.
}


推荐答案

看起来10 m是以FusedLocationServicesApi获得最佳最佳近似精度,并以HIGH_ACCURACY为优先。但是,我相信通过使用LocationManager可能可以获得更好的准确性。看看这篇文章:
http:// www.tothenew.com/blog/googles-fused-location-api-for-android/

It looks like 10 m is the best approx accuracy you can get with FusedLocationServicesApi, with HIGH_ACCURACY as the priority. However, I believe it might be possible to get better accuracy by using LocationManager. Check out this article: http://www.tothenew.com/blog/googles-fused-location-api-for-android/

这篇关于FusedLocationApi性能问题:精度似乎限制为10.0米的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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