Location history and sampling
What gets stored, what gets charged, and why a successful ingest can return history_written=false.
Tracking ingest accepts every valid position, but Location History stores keyframes rather than every event. The two behaviours are separate on purpose: live state and realtime stay exact, while history stays small enough to read quickly and cheaply.
When a position becomes a history keyframe
After the first point of a session, a position is written to history when any of these server-side gates is met:
- The position is at least 200 m from the last keyframe.
- At least 60 seconds have elapsed since the last keyframe.
- The heading changed by at least 45 degrees from the last keyframe heading.
Only GOOD or DEGRADED accuracy fixes may add a keyframe, where an accuracy of up to 250 m counts as GOOD and a missing accuracy is treated as GOOD. These are server-side defaults: a client-side sampling choice cannot force a keyframe, and raising your send rate does not increase history resolution.
What each operation costs
| Operation | Effect | Charged |
|---|---|---|
| Send a location | Live state, and a history keyframe only when a gate is met | One Tracking Point |
| Retry the same client_event_id | No additional state or history effect | Nothing |
| Read latest state | Current position only | Nothing extra |
| Read history | Sampled keyframes only | One History Read credit in the Free Sandbox |
| Send a heartbeat | Liveness state only, no location | Nothing |
Rejected, malformed and duplicate events do not consume a Tracking Point. That asymmetry is deliberate: a device that retries aggressively after a network failure must not be able to spend a wallet.
Designing around it
- Do not reconstruct a path from the stream alone: stream frames are live, and history is sampled.
- To measure a trip distance, use the history keyframes or the route returned by Directions, and say which one you used.
- If you need every point, store them on your own side as they are accepted. Bardiya deliberately does not keep a raw event log.
- Tune your own send cadence for battery and bandwidth, not for history resolution: the gates decide that.
