Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter outliers based on distance #1986

Closed
Stophface opened this issue Apr 6, 2024 · 2 comments
Closed

Filter outliers based on distance #1986

Stophface opened this issue Apr 6, 2024 · 2 comments
Labels

Comments

@Stophface
Copy link

Your Environment

  • Plugin version: 4.12.0
  • Platform: iOS
  • OS version: 17
  • React Native version (react-native -v): 0.73.0
  • Plugin config
  desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_MEDIUM
  stationaryRadius: 25,
  desiredOdometerAccuracy: 10,
  disableElasticity: true,
  disableLocationAuthorizationAlert: true,
  maxRecordsToPersist: 1,
  stopOnTerminate: false,
  stopTimeout: 5,
  disableMotionActivityUpdates: true,
  debug: false,
  startOnBoot: false,
  forceReloadOnBoot: false,
  logLevel: BackgroundGeolocation.LOG_LEVEL_OFF,
  showsBackgroundLocationIndicator: true,
  allowIdenticalLocations: false,
  foregroundService: true,
  locationAuthorizationRequest: 'WhenInUse',

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.

@Stophface Stophface changed the title Filter outliers Filter outliers based on distance Apr 6, 2024
Copy link

github-actions bot commented May 7, 2024

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

@github-actions github-actions bot added the stale label May 7, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant