iphone - CLLocationManager saying I moved 1200+ft when I'm still sitting in my chair -
I am getting awkward readings while using CLLocationManager I place on the report of wave / long, but distance away from travel is. I have implemented the following delegate method as follows:
. H: CLLocationManager * mLocationManager; CLLocation * mStartDistance;
.m: - (zero) Location Manager: (CLLocationManager *) Manager updated Tue location: (CLLocation *) from the new location location: (CLLocation *) oldLocation {NSLog (@ "% g", new location.Cordinate.latidadit); NSLog (@ "% g", new location. Cordinate lame); NSLog (@ "% g", new location.limitid); NSLog (@ "% g", new location. Current qualification); If (mStartDistance == zero) {mStartDistance = newLocation; } CLLocationDistance dist = [newLocation getDistancefrom: mStartDistance]; NSLog (@ "% g", dist); }
And when I run it on my device, I get the following (late / long masks to protect the guilty / head):
< Code>] xx.xxxx] -yyyyyy] 0] -1] 0m] xx.xxxx] -yy.yyyy] 0] -1] 0m] xx.xxxx] -yy.yyyy] 0] -1] 376.133 M & LT; - Watt ?I do not understand why I have been saying + 376 meters..this + 1200 feet!
If you also log in your newLocation.horizontalAccuracy
Maybe you will see that it is more than 400 meters for the first two updates, it is not using the GPS (you are inside and it gives you 1 for vertical accuracy of height), and the cell phone is very bad at the triangular start Sometimes my initial space is accurate at just 10 miles, but it's still the best guess Once it gets locked well, then that point can move very fast.
Some parts of the move to use CoreLocation are determining to guess or reject an update to make its own guess. To consider some things, horizontal accuracy, updating time has been spent, and the number of previous updates you received. I have seen that a lot of plans have been discussed on this site.
Comments
Post a Comment