开发者

Check whether a CLLocation is based on GPS or cellular

开发者 https://www.devze.com 2023-03-25 10:30 出处:网络
With a 3G GPS device (i.e. iPad 3G) is there a way to know开发者_Python百科 if a reported CLLocation is based on a GPS signal, and not the inaccurate cellular data?The CLLocation class has a method ca

With a 3G GPS device (i.e. iPad 3G) is there a way to know开发者_Python百科 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消