OptionalpolicyDefines 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:
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
OptionaluseEnables the Kalman filter to smooth incoming location speed and position.
When true, the SDK applies a Kalman filter to reduce noise and stabilize
velocity and distance calculations. Defaults to true.
OptionalkalmanEnables verbose Kalman debug output in logs.
When true, the SDK logs additional diagnostic data about the Kalman
filter’s internal state (for example, variance and innovation) for
each incoming sample.
OptionalkalmanSpecifies the preset tuning profile for the Kalman filter used in location denoising.
Each profile adjusts the Kalman filter’s process and measurement noise parameters, trading off between responsiveness and smoothness:
| Profile | Behavior |
|---|---|
defaultProfile |
Balanced — General-purpose; suitable for most movement types. |
aggressive |
Aggressive — Fast response; minimal smoothing. |
conservative |
Conservative — Maximum smoothing; slowest response to changes. |
defaultProfile is applied.aggressive for fast-changing activities requiring rapid updates.conservative when stability and track smoothness are more important
than immediate responsiveness.This maps directly to native Kalman tuning implementations on both Android and iOS.
OptionalrollingNumber of samples in the rolling window used for burst averaging.
Higher values produce smoother averaged locations but introduce greater latency in responsiveness to movement.
Default: 5.
OptionalburstDuration (in seconds) of each burst window used for averaging samples.
The plugin groups all locations received within this time window into a single averaged output sample.
Default: 10 seconds.
OptionalmaxMaximum distance (in meters) between samples considered part of the same burst.
Prevents the filter from merging location samples that are too far apart into a single averaged point.
Default: 300 meters.
OptionaltrackingMinimum acceptable horizontal accuracy (in meters) for a sample to qualify for tracking.
Locations with an accuracy value greater (worse) than this threshold are discarded and will not be used in path or odometer calculations.
Default: 100 meters.
OptionalmaxMaximum implied speed (in meters/second) permitted before a location sample is rejected.
If a raw sample implies a speed greater than this threshold, it is considered an unrealistic outlier and will be discarded by the filter.
Default: 60 m/s (≈ 216 km/h).
OptionalfilterEnables verbose debug logging for the filtering engine.
When true, the SDK logs detailed decisions for each incoming sample,
including whether it was ACCEPTED, REJECTED, or IGNORED by the
filtering pipeline.
OptionalodometerApplies a Kalman filter only to odometer calculations, independent of LocationFilter.useKalman.
When true, the odometer’s internal distance-accumulation logic applies a
Kalman filter to smooth incoming samples, reducing jitter and noise without
modifying the recorded track points.
This is useful when you want smoother odometer readings while preserving the raw location stream for mapping, analysis, or debugging.
If both LocationFilter.useKalman and
LocationFilter.odometerUseKalmanFilter are true, the SDK maintains
independent Kalman filter instances for tracking and odometer calculations.
Default: true.
OptionalodometerMaximum horizontal accuracy (in meters) allowed for a sample to affect the odometer.
Any location whose accuracy exceeds this threshold is ignored for
odometer updates.
Default: 20.
Defines how raw GPS samples are filtered, denoised, and smoothed before being recorded or used for odometer calculations.
LocationFilteris supplied via GeoConfig.filter and provides fine-grained control over how the SDK handles noisy or inconsistent location data from the underlying platform.Overview
The native platform continuously produces raw
CLLocation(iOS) orLocation(Android) samples. TheLocationFilterapplies:These produce smoother paths, reduce jitter, and improve odometer stability.
Example
Filtering Flow
Parameters
true).10.300.100.60(~216 km/h).ACCEPTED,REJECTED, etc).100.Notes
Disable all filtering
Example