docs(train): how routes are planned and followed (ADR 0030, D44, D45)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-28 23:25:56 +01:00
commit 8325d2a08b
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1,11 +1,12 @@
# ADR 0030: Halkyon Train, what it does and where its data comes from
- **Status:** decided 27–28 Oct 2026, by the developer (D1–D43 below). The shell (D12)
- **Status:** decided 27–28 Oct 2026, by the developer (D1–D45 below). The shell (D12)
is built; recording (D13–D28) is built on Android, iOS waiting for a Mac; Health
Connect (D29–D31) is built; the Loop's setup and keeping (7a, D34–D36) and its
daily data (7b, D37, D38), its sessions (7c, D39) and its firmware (D10, D40) are
built, and its live heart rate (7d, D41); intervals (D42, D43) are built: the plans
(8a), the service running them (8b) and the laps a workout keeps (8c).
(8a), the service running them (8b) and the laps a workout keeps (8c); routes (D44,
D45) are being built.
- **Numbering:** 0025 is held by the federation draft (stashed), 0026–0029 by the .NET
rewrite on the local branch `rewrite-dotnet`, abandoned on 27 Oct; Train takes the next
free number so that neither is ever read as this one.
@ -849,6 +850,37 @@ Strava. What was found, 27 Oct:
average (its pace, speed or split over its moving time and distance, its heart
rate, stroke rate or watts) lies within it. The charts shade the work steps.
Health Connect gets the session as before, without laps for now.
- **D44 Planning a route** (recommended, the developer's, but the region; 28 Oct):
waypoints are tapped on the map, dragged, the last one undone, the first where the
phone is; searching for places comes later, as a Photon sidecar of its own (Apache-2.0;
over Photon now, Germany's database alone a 7.5 GB download and a few GB of RAM, and
over komoot's public instance, which sees the places searched and promises nothing).
The instance's BRouter and PMTiles sidecars cover **Europe** (the developer's choice,
over Germany alone, recommended for its few GB, and over Germany, Austria and
Switzerland): tens of GB of segments and tiles on the server, refreshed monthly; the
sizes are written into the deploy's notes when it is built. Six profiles: Run, a
profile Train writes (paths, parks and quiet roads first, any surface; BRouter has
none for running), Hike (`hiking-mountain`), Road bike (`fastbike`), Trekking bike
(`trekking`), Gravel (`gravel`) and MTB (`mtb`), the route's activity choosing one by
default (over BRouter's alone, its hiking profile sending runners up steps, and over
one profile an activity). As it is planned, a route shows its line, its distance, its climb and
descent, an elevation profile under the map and the surfaces it runs on as BRouter
tells them (over distance and climb alone, and over loops of a given length, which
BRouter can't make and Train would only guess at).
- **D45 Following a route** (recommended, the developer's; 28 Oct): the recording
screen keeps its figures first and swipes to a map with the route, the track so far
and the position, north or heading up as tapped, with a route or without (over the
map always above the figures, and over no map). The recording service guides,
offline, as it runs a plan: BRouter's turn hints spoken about 50 m before a turn (on
a bike about 100 m) after the tone, the next turn shown; more than 40 m off the route
for 10 s, a cue and the way back (the direction and distance to the route's nearest
point), told again on rejoining (over cues off route alone, and over rerouting by
itself online). Maps offline along a route on request: *Keep offline* downloads its
corridor, 2 km each side at zooms 10 to 16, on that device alone, until switched
off (over every route's on every phone, and over none yet). Routes go out as GPX
(to CoMaps or anything, with waypoints and turn hints) and come in as GPX shared to
Train or opened in it, snapped to a profile or kept as drawn (over out alone, and
over neither yet).
## Consequences