简体   繁体   English

我如何确定iphone CoreLocation是否正在使用卫星或蜂窝塔三角测量来查找当前位置?

[英]How can i determine if iphones CoreLocation is using satellites or cell tower triangulation to find the current location?

I'm using CoreLocation to find a users current location and display it on a map. 我正在使用CoreLocation查找用户当前位置并将其显示在地图上。 I want to show an icon with an antenna when the location is established using satellites and a icon with towers when it uses tower cell triangulation. 当使用卫星建立位置时,我想显示带有天线的图标,当使用塔式细胞三角测量时,我想显示带有塔的图标。 In my test app i set the desired accuracy to be kCLLocationAccuracyNearestTenMeters if using tower cell triangulation this may never be reached but when it uses satellites i had promising results. 在我的测试应用程序中,我将所需的精度设置为kCLLocationAccuracyNearestTenMeters,如果使用塔式细胞三角测量,这可能永远不会达到,但是当它使用卫星时我有很有希望的结果。

How can i determine the mode of retrieving the current location, satellites or towers, should i see if the accuracy provided by CoreLocation is less than the desired one then is using satellites and if not is using tower cell triangulation or there is another way? 我如何确定检索当前位置,卫星或塔的模式,我应该看看CoreLocation提供的精度是否小于所需的精度然后使用卫星,如果没有使用塔式细胞三角测量或有另一种方式?

框架不公开确定位置的方法。

区分GPS更新的一种方法是:设置高度参数。

While the framework does not expose which hardware device is providing location information, it does provide accuracy information with the properties: horizontalAccuracy and verticalAccuracy . 虽然框架没有公开哪个硬件设备提供位置信息,但它确实提供了具有以下属性的准确度信息: horizontalAccuracyverticalAccuracy You can fake it by looking at how precise those values are. 您可以通过查看这些值的精确程度来伪造它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM