I'm having the following problem in my iPhone app:
I enable the location manager on a regular basis and I do wait for multiple location updates. When receiving a new location, I check the timestamp property of the new location to know whether it's an old location or not:
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation {
numberOfUpdatesInInterval++;
NSLog(@"%d;%f;%f;%.0f;%@;%@;%@",
numberOfUpdatesInInterval,
newLocation.coordinate.latitude,
newLocation.coordinate.longitude,
newLocation.horizontalAccuracy,
newLocation.timestamp,
[self getCurrentDateAsString],
newLocation);
}
The problem I'm having now is that I receive new locations where the timestamp is new but the coordinates are still old locations I received earlier. I tested this when I was driving my car at 120km/h receiving the same coordinates multiple times but with different timestamps. I'm having the same problem in iOS 4 & 5.
How is this possible? Or how can I deal with this problem?