Enzo Tran
Enzo Tran

Reputation: 5850

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 / wifi / GPS?

Thanks.

Upvotes: 1

Views: 864

Answers (2)

Bogatyr
Bogatyr

Reputation: 19323

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.)

Upvotes: 0

GorillaPatch
GorillaPatch

Reputation: 5057

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.

Upvotes: 1

Related Questions