Matrix
Matrix

Reputation: 7613

Core Location - Accuracy problem in iphone sdk

i have an application installed in two devices, located within 50 meter. Application finds nearby online users within 2000 feets. But i am not able to find another user who is just nearby me (within 50 meter) and definitely online, when checked i have found that device location are such that their difference is more than 2000 feets. So what can be a reasons for that ?? why two users just nearby to each other not finding each other through application within 2000 feet range. I have used corelocation framework to determine users current location. and also set its bestaccuracy level. Also formula for calculating distance between users is also standard

So here issue is about core location accuracy. How to solve this kind of problem ??, Why device is not showing proper location even though bestaccuracy is set.

Upvotes: 1

Views: 1785

Answers (2)

user756365
user756365

Reputation:

Even when you are outside with a clear view of the GPS satellites, it can take Core Location 10 to 30 seconds to pinpoint you location within some useable accuracy. The horizontal accuracy usually starts at around 1750 meters and eventually narrows it down to within 5 meters.

You could try giving you users some visual indication that the app is still trying to locate their phone, and wait until you have an accurate reading.

Also, if you are using iPhone 4, there is another level of accuracy available called kCLLocationAccuracyBestForNavigation, which is apparently a little more accurate than kCLLocationAccuracyBest.

Upvotes: 3

Sig
Sig

Reputation: 5188

Sounds like the device isn't getting a GPS lock. Are you running the app inside?

You can check the accuracy the iPhone has managed to get by checking the horizontal accuracy of the location returned:

- (void)locationManager:(CLLocationManager *)manager
    didUpdateToLocation:(CLLocation *)newLocation
    fromLocation:(CLLocation *)oldLocation
{
    NSLog("%f", newLocation.horizontalAccuracy);
}

Anything too big (hundreds of meters) and you know you havent got a GPS lock yet.

Upvotes: 1

Related Questions