Skip to content

Tuning the gate

BeekonConfig has exactly two scalars — a minimum time interval between emitted fixes and a minimum distance. They form an AND-gate: a position is emitted only when both conditions are satisfied. That’s the entire signal-processing surface in v1 — no Kalman filter, no outlier rejection, no speed clamp. The OS provider is the source of truth.

FieldDefaultDisable
intervalSeconds300
distanceMeters1000

The defaults (30 s / 100 m) are a balanced battery / density trade-off — fine for general-purpose tracking. Same on every platform.

For each fix the OS provider delivers, Beekon admits it iff:

(now - lastAdmittedTime >= intervalSeconds) AND
(distance(lastAdmittedFix) >= distanceMeters)

The very first fix after start() always passes. After that, both conditions must hold. Set either field to 0 to disable that side of the gate — intervalSeconds = 0 admits a fix as soon as the distance threshold is met regardless of cadence; distanceMeters = 0 admits at most one fix per intervalSeconds.

ScenariointervalSecondsdistanceMetersNotes
Passive background (“where did I go today?”)60150Coarse trail; cheaper on battery
General tracking (default)30100Driving, cycling, multi-hour walks
Active foreground (turn-by-turn, fitness)5102550Foreground-only on real devices; users feel the battery hit in background
Stationary monitoring (geofence-like)0100Emit only on movement, not on cadence

These are starting points, not presets — calibrate against your own GPX corpus.

Call configure(...) again at any time, including while tracking, to update the gate. The new values take effect on the next admitted fix without restarting the underlying location subscription.

// Tighten cadence mid-session
Beekon.configure(
BeekonConfig(intervalSeconds = 5, distanceMeters = 25.0, notification = notification),
)
  • It doesn’t bound the OS provider’s accuracy. A fix with 50 m horizontal accuracy still emits if it passes the gate.
  • It doesn’t smooth the trail. Adjacent emissions can jump if the OS provider’s signal jumps.
  • It doesn’t alter the persistence schema or retention — see Persistence & history.

To filter on accuracy or smooth the trail, do it in your own code on top of the live stream.