react-native-background-geolocation@5.0.0-beta.1
    Preparing search index...

    Variable LocationFilterPolicyConst

    LocationFilterPolicy: { PassThrough: 0; Adjust: 1; Conservative: 2 } = ...

    Defines the filtering policy applied to incoming raw GPS samples before they are accepted, averaged, or rejected by the LocationFilter.

    The filtering policy determines how aggressively the plugin removes noisy, inaccurate, or redundant location updates. It represents the first stage in the SDK’s data-quality pipeline — before Kalman smoothing, burst averaging, or other denoising steps are applied.

    Choosing the correct policy depends on your app’s tolerance for jitter versus responsiveness:

    • Fitness or vehicle-tracking apps often prefer stronger filtering.
    • Survey or scientific apps may prefer capturing unmodified raw samples.

    Profiles

    Policy Description Use Case
    LocationFilterPolicy.PassThrough No filtering. Every received sample is recorded, even if noisy or identical to the previous one. Debugging, diagnostics, scenarios requiring raw data.
    LocationFilterPolicy.Adjust Balanced filtering. Smooths and rejects only clearly invalid samples. (Default) Most use cases — walking, cycling, automotive tracking.
    LocationFilterPolicy.Conservative Strict filtering. Strongly smooths data and rejects high-variance samples, prioritizing stability over responsiveness. Analytics, long-term background logging, noise-sensitive applications.

    Notes

    Examples

    Balanced default filtering:

    BackgroundGeolocation.ready({
    geolocation: {
    filter: {
    policy: LocationFilterPolicy.Adjust
    }
    }
    });

    No filtering — capture all raw locations:

    BackgroundGeolocation.ready({
    geolocation: {
    filter: {
    policy: LocationFilterPolicy.PassThrough
    }
    }
    });

    Maximum smoothing for analytics:

    BackgroundGeolocation.ready({
    geolocation: {
    filter: {
    policy: LocationFilterPolicy.Conservative
    }
    }
    });

    See also

    Type Declaration

    • ReadonlyPassThrough: 0

      No filtering — accept all samples. Useful for debugging.

    • ReadonlyAdjust: 1

      Balanced (default) — applies moderate filtering to reject noisy samples.

      Dynamically adjusts acceptance thresholds for incoming samples, but never alters the raw latitude/longitude coordinates.

      When using LocationFilterPolicy.Adjust (the default), the SDK computes motion metrics such as:

      • distance deltas
      • implied speed
      • accuracy variance
      • heading stability

      It then applies adaptive gating rules to decide whether each sample should be:

      • accepted
      • ignored
      • rejected as noise

      Coordinates are never modified. This policy adjusts which samples are included, not how they are positioned.

      If LocationFilter.useKalman is enabled, additional smoothing may occur, but the physical coordinates of each accepted sample remain untouched.

    • ReadonlyConservative: 2

      Aggressive — filters heavily, preferring stability over responsiveness.