Check whether a CLLocation is based on GPS or cell

2019-07-31 11:08发布

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?

1条回答
一纸荒年 Trace。
2楼-- · 2019-07-31 11:25

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.

查看更多
登录 后发表回答