transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
652 stars 241 forks source link

It updates a location that is several kilometers away from the actual position #1387

Open naeemtariq6600 opened 4 days ago

naeemtariq6600 commented 4 days ago

Your Environment

Expected Behavior

Plugin should post the accurate location on server.

Actual Behavior

Sometimes, it sends the correct location. However, within the next minute, it updates a location that is several kilometers away from the actual position. This behavior is causing inconsistencies in the location data we store.

Context

We are updating drivers' locations to our server. Based on these locations, we need to draw a route on the map. However, while the plugin updates the locations correctly, it sometimes starts sending inaccurate, far-off locations.

Debug logs

Logs ``` PASTE_YOUR_LOGS_HERE ```
christocracy commented 3 days ago

The plugin does not manufacture location data. It receives the best available location provided by the native Location API at that time, in the current environment.

Yes, sometimes a poor location can be provided by the native location API.

Location accuracy is affected by physical obstructions and GPS works only while outdoors. While indoors, the location will come from Wifi / Cellular.

You are expected to filter your own data (see location.coords.accuracy).

christocracy commented 3 days ago

In my daily testing, I rarely see inaccurate locations. Accuracy issues are not related to the plugin. They are due to the device and/or environment.

Screenshot 2024-11-29 at 10 52 34 AM
naeemtariq6600 commented 14 hours ago

Is our configuration correct? Is there any issue in it that might be causing this problem?

christocracy commented 9 hours ago

Is our configuration correct?

yes.

Is there any issue in it that might be causing this problem?

The device and/or environment (ie: physical obstructions: tall building, bridges, tunnels).

It's up to you to filter your data as-desired. see location.coords.accuracy. A location is not a simple point in space — it's a circle of radius location.coords.accuracy. The real device position is something within that circle.