检查CLLocation是基于GPS还是手机 [英] Check whether a CLLocation is based on GPS or cellular

查看:176
本文介绍了检查CLLocation是基于GPS还是手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用3G GPS设备(即iPad 3G)有没有办法知道报告的 CLLocation 是否基于GPS信号,而不是不准确的蜂窝数据?

解决方案

CLLocation类有一个名为 - horizo​​ntalAccuracy:。这会给你一些关于测量精度半径的想法。这可能比询问是否是GPS更好,因为根据接收条件和卫星可见度,GPS读数也可能非常不准确。

With a 3G GPS device (i.e. iPad 3G) is there a way to know if a reported CLLocation is based on a GPS signal, and not the inaccurate cellular data?

解决方案

The CLLocation class has a method called -horizontalAccuracy:. This will give you some idea of the radius of accuracy of that measurement. This is probably better than asking just "is it GPS" because GPS readings can also be pretty inaccurate, depending on receiving conditions and satellite visibility.

这篇关于检查CLLocation是基于GPS还是手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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