Comment 21 for bug 579419

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

kizza wrote:
> I added the < 100 thing.
>
> It was a way of fixing this problem where for one reading the GPS reported a location that was very far away (~1km).

Does anyone had a far away location using the gps? It's not likely possible, except if...

It was introduced by you, with the lines "230 of OpenStreetMapActivity.java"?
These lines seems to deactivate the current provider and reenable the gps one, useful in case the current location is network and gps is more accurate. But very inconvenient in all other cases. Changing a locationProvider has nothing to do in a route recording code.

All these lines were not in the original OpenStreetMapActivity.java .

I don't understand why there's no much difference in your custom file (OpenStreetMapActivity.java):
you currently use 2 location providers (network AND gps) which means that you get twice updates in the same onLocationChanged(SatNavActivity)!
That could correspond to your far away positions sometimes (network interfering with gps location).

I think we must deactivate the network provider as soon as we get a gps fix, in the beginning of onLocationChanged(SatNavActivity.java).