M2-09: Speed and distance from the track #36

Closed
opened 2026-08-08 19:56:53 -04:00 by agent · 0 comments
Member

Derive distance, duration and speed from the track and show them on the detail view.

Wes: "Gives me speed and route, and things to do with that data later." The route is M2-08; this
is the other half, and it is the thing the data was actually wanted for.

Scope

  • Total distance, moving time, average speed, and maximum speed.
  • Derived from the track at read time, not stored. The track is the record; a cached summary is a
    second source of truth that can disagree with it.
  • Units follow the device locale.

Accuracy is the whole problem here

GPS noise inflates distance. A phone standing still produces scattered fixes that a naive
point-to-point sum reads as movement, and over forty minutes that is not a rounding error.

CLLocation carries horizontalAccuracy and speed, and M2-06 records both precisely so this
issue can use them. The plan should say which filter it applies and why — an accuracy threshold, a
minimum displacement, the device's own speed reading, or some combination — and the tests should
include a synthetic stationary track that must report approximately zero distance.

A number that is confidently wrong is worse than no number. If a filter cannot be made to
behave on real walk data, show distance and drop speed rather than shipping something that reads
as authoritative.

Done when

  • A real walk reports a plausible distance against a known route.
  • A synthetic stationary track reports approximately zero distance, not GPS drift.
  • A partial track says the figures cover only part of the recording.

Milestone 2 of the Stash v3 rebuild. M2 is still app-side — no sync, no account, no server. It
turns a list of memos into something you can open, listen to, read and see the route of. Sync
arrives in M3. There is no milestone/M2 label yet (creating org labels needs owner rights), so
the title carries the milestone.

Working agreement for every issue in this repo: feature branch, tested before the PR opens
(on-device where the label says so), then Wes reviews the PR and we walk the code together. Docs
update in the same commit. A PR that takes more than 20 minutes to review is too big — say so and
split it.

Derive distance, duration and speed from the track and show them on the detail view. Wes: *"Gives me speed and route, and things to do with that data later."* The route is M2-08; this is the other half, and it is the thing the data was actually wanted for. ## Scope - Total distance, moving time, average speed, and maximum speed. - Derived from the track at read time, not stored. The track is the record; a cached summary is a second source of truth that can disagree with it. - Units follow the device locale. ## Accuracy is the whole problem here GPS noise inflates distance. A phone standing still produces scattered fixes that a naive point-to-point sum reads as movement, and over forty minutes that is not a rounding error. `CLLocation` carries `horizontalAccuracy` and `speed`, and M2-06 records both precisely so this issue can use them. The plan should say which filter it applies and why — an accuracy threshold, a minimum displacement, the device's own speed reading, or some combination — and the tests should include a synthetic stationary track that must report approximately zero distance. **A number that is confidently wrong is worse than no number.** If a filter cannot be made to behave on real walk data, show distance and drop speed rather than shipping something that reads as authoritative. ## Done when - [ ] A real walk reports a plausible distance against a known route. - [ ] A synthetic stationary track reports approximately zero distance, not GPS drift. - [ ] A partial track says the figures cover only part of the recording. --- *Milestone 2 of the Stash v3 rebuild. M2 is still app-side — **no sync, no account, no server**. It turns a list of memos into something you can open, listen to, read and see the route of. Sync arrives in M3. There is no `milestone/M2` label yet (creating org labels needs owner rights), so the title carries the milestone.* *Working agreement for every issue in this repo: feature branch, tested before the PR opens (on-device where the label says so), then Wes reviews the PR and we walk the code together. Docs update in the same commit. A PR that takes more than 20 minutes to review is too big — say so and split it.*
wk closed this issue 2026-08-10 12:09:03 -04:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Stash/stash-ios#36
No description provided.