xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.53k stars 505 forks source link

Inaccurate geolocation coordinates #2047

Open gpsaliola opened 1 year ago

gpsaliola commented 1 year ago

I written a little app that writes a GPX file contains a track composed with returned locations. The app is based on the app described in https://github.com/jfversluis/XFBackgroundLocationSample. The coordinates are not very precise, there are jumps in places where they shouldn't be. The test.gpx file is the file saved after the test and the test.jpg image illustrates the track on a map (the red path is the real one, the blue one is the recorded one). How can this behavior be improved? Unfortunately, this is not acceptable in a track recording app.

Steps to Reproduce

I've attached the app.

  1. Give permissions to the app:
    • App - Location => Allow all the time
    • App - Location => Use precise location
    • App - Battery => Unrestricted
    • Battery => Power saving off
  2. After launch tap on Start/stop button, walk a couple of blocks and tap the button again.
  3. Go in Documents directory. You can find a file named test.gpx.
  4. Open the gpx file in a map application/web site and look at the track and compare it with the traveled track.

Expected Behavior

The recorded track and the track traveled should be similar

Actual Behavior

The recorded track contains many inaccurate points

Attachments

test.zip

XFBackgroundLocationSample-modified.zip