transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.54k stars 424 forks source link

Filter outliers based on distance #1986

Open Stophface opened 1 month ago

Stophface commented 1 month ago

Your Environment

Expected Behavior

I am trying to filter out outliers which occur when the device is moving fast and has bad (GPS) reception (i.e. in a train). After using it for a while, there are often points which are unreasonable off. I think the only way to do this is measuring the distance of the new location and the previous location. If the distance exceeds a certain threshold, I mark it as an outlier. However, this is a bit tricky when disableElasticity is set to false, because I cannot assume a constant distance between new location and previous location to detect an outlier, since the interval of the emitted locations change with the speed: The higher, the bigger the distances between the emitted locations are and vice versa. That is why I wonder if there is any way to get the value of distanceFilter the plug in calculates or the formula the plug in uses to calculate distanceFilter based on speed (so that I can calculate a value based on the speed myself)? The documentation mentions this:

distanceFilter is auto-scaled by rounding speed to the nearest 5 m/s and adding distanceFilter meters for each 5 m/s increment.

But I do not understand it.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity.