开发者

Know the precision of Core Location for iPhone?

Is there any way to know approximately the precision given by Core Location? Or to determine whether that location comes from using cellular data / w开发者_C百科ifi / GPS?

Thanks.


Yes there are two properties on CLLocation

@property(readonly, nonatomic) CLLocationAccuracy verticalAccuracy;
@property(readonly, nonatomic) CLLocationAccuracy horizontalAccuracy;

Looking in the header files and the docs often pays of.


In my experience of writing a GPS-based speedometer app, the reported GPS accuracy of the iPhone can be fairly far off, based on many dynamic factors: weather, tall buildings, being inside a building (even near a window) or in a vehicle, etc. The device will report its best guess at accuracy but it's just that, an approximation. It can claim down to about 16 meters resolution at best, and if you're out entirely in the open on the prairie in sunshine and blue skies with direct lines to the GPS satellites, you might get that.

The CLLocation class offers properties of altitude, position, course, horizontal and vertical accuracy, speed, and time -- but not source of the CLLocation (wifi, gps, etc.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜