如何确定 iphone CoreLocation 是否使用卫星或手机信号塔三角测量来查找当前位置?

发布于 2024-08-24 13:48:02 字数 285 浏览 3 评论 0原文

我正在使用 CoreLocation 查找用户当前位置并将其显示在地图上。我想在使用卫星建立位置时显示一个带有天线的图标,当使用塔单元三角测量时显示一个带有塔的图标。在我的测试应用程序中,我将所需的精度设置为 kCLLocationAccuracyNearestTenMeters,如果使用塔式单元三角测量,这可能永远无法达到,但当它使用卫星时,我得到了有希望的结果。

我如何确定检索当前位置、卫星或塔的模式,我应该看看 CoreLocation 提供的精度是否低于所需的精度,然后使用卫星,如果不是,则使用塔单元三角测量还是有另一种方法?

I'm using CoreLocation to find a users current location and display it on a map. 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.

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谁的年少不轻狂 2024-08-31 13:48:02

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

The framework does not expose the method(s) by which it determined the location.

另类 2024-08-31 13:48:02

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

One way to distinguish GPS updates: the altitude parameter is set.

我不在是我 2024-08-31 13:48:02

虽然该框架不会公开哪个硬件设备正在提供位置信息,但它确实提供了具有以下属性的精度信息:horizo​​ntalAccuracyverticalAccuracy。您可以通过查看这些值的精确程度来伪造它。

While the framework does not expose which hardware device is providing location information, it does provide accuracy information with the properties: horizontalAccuracy and verticalAccuracy. You can fake it by looking at how precise those values are.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文