Reputation: 23
I use
[locations firstObject].horizontalAccuracy
In
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
And I know
A negative value indicates that the location’s latitude and longitude are invalid.(horizontalAccuracy)
Question:
1) On what condition horizontalAccuracy
is negative?
And is it means that when horizontalAccuracy
is zero ,the position message is very nice(no miss)?
2) How can I simulate 1)? I want to know when 1) happens ,what will longitude and latitude be.
Thank you very much.
Upvotes: 1
Views: 199
Reputation: 535791
horizontalAccuracy
is -1
while the sensors are warming up and we have no location fix yet. It will never be 0
; the best you will get is likely to be about 10
, if that.
You don't need to "simulate" anything. Run the code on your device and it will very likely be -1
initially.
Upvotes: 2