使用全球定位系统和网络提供商在Android位置服务体验 [英] Experience of Location Services on Android using GPS and Network providers

查看:154
本文介绍了使用全球定位系统和网络提供商在Android位置服务体验的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一张code,以得到什么,当我让他的设备上的位置服务我的出租车预订应用我的客户(出租车司机)将经历一个感觉。我在同一个监听器同时使用网络和GPS提供商基于位置的服务。

I have written a piece of code to get a feel of what my customer (cab driver) will experience when I enable location services on his device for my cab booking application. I enabled location services using both Network and GPS providers on the same listener.

LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
    // God.KM20TIME, God.KM20DISTANCE, (LocationListener) updates);

lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, God.KM20TIME,
            God.KM20DISTANCE, (LocationListener) updates);

我的电池用完了比正常速度要快得多。我也有我的电话升温超过正常值。但我期待的一致性是非常低。我决定不使用GPS,只有网络提供商。我建立一个出租车预订应用程序,所以我需要知道在哪里驾驶室大约为。即使我知道,驾驶室是在大约(300米)的位置约15分钟后,我应该不错。所以我想我的决定同时使用供应商没有结束工程师这个逻辑是正确的。我不知道是否有人能与这里不同的体验?我缺少的东西吗?

My battery ran out much faster than normal. I also had my phone heating up more than normal. But the consistency I was expecting was really low. I have decided to not use GPS, and only Network provider. I am building a cab booking app, so I need to know where the cab is approximately. Even if I know that the cab was at a approximate (300 meters) location about 15 mins back, I should be good. So I guess my decision to not over engineer this logic by using both providers is correct. I wonder if anyone can relate to a different experience here ? Am I missing something ?

推荐答案

从我的经验,网络供应商的质量有很大不同。

From my experience, the quality of the Network provider can vary quite a bit.

网络提供商使用的WiFi和手机信号塔信息的组合来提供位置信息。

The network provider uses a combination of WiFi and Cell tower information to provide location information.

如果你刚好是接近到WiFi网络,这是在城市化地区常见,但不是外面的城市,你通常得到一个非常良好的精度。

If you happen to be close to a Wifi network, which is common in urbanized areas, but not outside of cities, you usually get a very good accuracy.

然而,一个无线的范围之外,你在手机信号塔的摆布。在这里,precision取决于质量和手机信号塔的功能,以及可用于三角您的位置信号发射塔的数量。

However, outside of range of a Wifi, you're at the mercy of the cell towers. Here, the precision depends on the quality and features of the cell tower, as well as the amount of cell towers that can be used to triangulate your position.

在这些情况下,质量可变化的很多的,这两个位置之间,而且还取决于该载体使用,其细胞塔之间的距离,还需要什么使与发电电池塔它们有。较新的有关于位置的详细功能,并可能例如提供关于其自身的影响。

In these situations, the quality can vary alot, both between locations, but also depending on which Carrier you use, the distance between their cell towers, but also what make and generation of cell towers they have. Newer have more features regarding location, and might for example provide bearing on its own.

我的应用程序在瑞典运行,并在我国的一些地区,运营商可能会非常大的区域内只有一个塔。在这种情况下,所有经度/纬度修复直接结束了在塔,用甚至达到20.000一个precision - 30.000米

My application runs in Sweden, and in some areas of our country, a carrier might have only one tower within a very large area. In those cases, all lon/lat fixes end up directly on the tower, with a precision of even up to 20.000 - 30.000 meters.

基本上,我的观点是,使用网络供应商的时候,如果你不是附近的无线网络,我会非常满意300米的精度。

Basically, my point is that when using the network provider, if you're not near a Wifi, i'd be very satisfied with 300 meters accuracy.

关于电池/热 - 与你的要求,你可以围绕了很多的时间/距离参数发挥获得足够好更新不含税手机尽可能多频率

Regarding the battery / heat - with your requirements, you can play around a lot with the time / distance parameters to get a "good enough" update frequency that doesn't tax the phone as much.

这篇关于使用全球定位系统和网络提供商在Android位置服务体验的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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