feat(roadtrip): let a day drive along an imported track

An imported GPX track was a line drawn beside the day: the map showed the
scenic route while the day kept driving the motorway, so the distance, the
drive time and every warning belonged to a road nobody was taking. Norway
publishes its scenic routes that way, and so does every touring club worth
importing from.

A track becomes a route the day takes by refinement, not by conversion. Route
through what we have, find the point of the track the road misses by the most,
make that point a via, go again. Each round roughly halves the worst miss,
because the new via lands in the middle of what the last one left unfollowed,
so a scenic route usually fits inside ten vias — and the loop stops when the
road is close enough rather than after a fixed count. Every point of the track
would route exactly and take a hundred requests; two would route in seconds
and follow nothing.

The day is routed whole per round, not leg by leg: it is a single request
already, and per-leg would multiply every round by the number of legs against
a host that answers one request a second. The track is oriented to the day
first, because half of Norway's routes are published southbound, and the legs
it covers are cleared before the new chain lands, so applying a track twice
does not stack.

Offered from the day's own badges, and only once something has been imported.
Tinted while the day carries vias: the rail draws none of them, so that badge
is the only place a drive shaped by hand differs from one the router picked.
This commit is contained in:
Maurice
2026-09-05 00:22:44 +02:00
committed by Maurice
parent 620f4c6ecd
commit 761ec4e66f
35 changed files with 1807 additions and 3 deletions
+18
View File
@@ -46,6 +46,24 @@ const roadtrip: TranslationStrings = {
'roadtrip.poi.free': 'Kostenlos',
'roadtrip.poi.wholeDay': 'Ganzer Tag',
'roadtrip.poi.midLeg': 'Auf halber Strecke, {from} bis {to}',
'roadtrip.track.title': 'Tag {number} folgt einer Spur',
'roadtrip.track.hint': 'Diesen Tag einer importierten Spur folgen lassen',
'roadtrip.track.badge': 'Spur',
'roadtrip.track.untitled': 'Namenlose Spur',
'roadtrip.track.empty': 'Keine Spuren in dieser Reise',
'roadtrip.track.emptyHint': 'Importiere eine GPX- oder KML-Datei, dann stehen ihre Spuren hier.',
'roadtrip.track.length': '{distance} lang',
'roadtrip.track.gap': '{distance} von diesem Tag entfernt',
'roadtrip.track.onDay': 'entlang dieses Tages',
'roadtrip.track.explain': 'Die Fahrt wird mit einigen Zwischenpunkten auf die Spur gezogen. Vorhandene Zwischenpunkte dieser Etappen werden ersetzt.',
'roadtrip.track.action': 'Dieser Spur folgen',
'roadtrip.track.working': 'Fahrt wird an die Spur angepasst, Runde {round}',
'roadtrip.track.done': '{count} Zwischenpunkte gesetzt. Die Fahrt bleibt bis auf {distance} an der Spur.',
'roadtrip.track.capped': '{count} Zwischenpunkte gesetzt. An der weitesten Stelle bleibt die Fahrt {distance} von der Spur entfernt.',
'roadtrip.track.already': 'Die Fahrt folgte dieser Spur bereits.',
'roadtrip.track.errorRoute': 'Der Routendienst hat nicht geantwortet.',
'roadtrip.track.errorSave': 'Die Zwischenpunkte konnten nicht gespeichert werden.',
'roadtrip.track.clear': '{count} Zwischenpunkte entfernen',
'roadtrip.poi.rest': 'Rastplatz',
'roadtrip.poi.campsite': 'Campingplatz',
'roadtrip.poi.food': 'Essen',