Comment 14 for bug 579419

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

I'm working on it. Uncommented "line 230 of OpenStreetMapActivity.java" doesn't change the issue.

Who wrote function onLocationChanged in SatNavActivity?
There's a weird "if currentLocation.distanceTo(newLocation) < 100" which means that 2 following locations could not have distance superior at 100m!
If we have enabled network+gps, when we start osn we rely on network location, but when we have a fix the gps is very likely to be more distant that 100m!
I've commented this test and the bug is now fixed :)

I think this could also correct bug 15:
technically the gps chipset runs at 1Hz (1 position per second) but the onLocationChanged is called "when" the gps wants so it could be every second, sometimes every 2 seconds or sometimes every 3 seconds...
The code I removed detects a distance of 100meter for following the next position, so if the gps call onLocationChanged every:
- 1 second it corresponds at 100m/s (360km/h),
- 2 seconds => 100m/2s (180km/h),
- 3 seconds => 100m/3s (120km/h).
It corresponds at my case that on highway (>120km/h) sometimes the gps stops following, it's simply because the gps has called onLocationChanged 3 seconds after the last call.