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': 'Δωρεάν',
'roadtrip.poi.wholeDay': 'Ολη η ημερα',
'roadtrip.poi.midLeg': 'Στα μισα, {from} προς {to}',
'roadtrip.track.title': 'Η ημέρα {number} ακολουθεί ένα ίχνος',
'roadtrip.track.hint': 'Κάντε αυτή την ημέρα να ακολουθεί ένα εισαγόμενο ίχνος',
'roadtrip.track.badge': 'Ίχνος',
'roadtrip.track.untitled': 'Ίχνος χωρίς όνομα',
'roadtrip.track.empty': 'Δεν υπάρχουν ίχνη σε αυτό το ταξίδι',
'roadtrip.track.emptyHint': 'Εισαγάγετε ένα αρχείο GPX ή KML και τα ίχνη του θα εμφανιστούν εδώ.',
'roadtrip.track.length': 'μήκος {distance}',
'roadtrip.track.gap': '{distance} από αυτή την ημέρα',
'roadtrip.track.onDay': 'κατά μήκος αυτής της ημέρας',
'roadtrip.track.explain': 'Η διαδρομή τραβιέται πάνω στο ίχνος με μερικά ενδιάμεσα σημεία. Τα υπάρχοντα σημεία σε αυτά τα σκέλη αντικαθίστανται.',
'roadtrip.track.action': 'Ακολούθησε αυτό το ίχνος',
'roadtrip.track.working': 'Προσαρμογή διαδρομής στο ίχνος, γύρος {round}',
'roadtrip.track.done': 'Τοποθετήθηκαν {count} ενδιάμεσα σημεία. Η διαδρομή μένει εντός {distance} από το ίχνος.',
'roadtrip.track.capped': 'Τοποθετήθηκαν {count} ενδιάμεσα σημεία. Στο πιο πλατύ σημείο η διαδρομή απέχει {distance} από το ίχνος.',
'roadtrip.track.already': 'Η διαδρομή ακολουθούσε ήδη αυτό το ίχνος.',
'roadtrip.track.errorRoute': 'Η υπηρεσία δρομολόγησης δεν απάντησε.',
'roadtrip.track.errorSave': 'Δεν ήταν δυνατή η αποθήκευση των ενδιάμεσων σημείων.',
'roadtrip.track.clear': 'Αφαίρεση {count} ενδιάμεσων σημείων',
'roadtrip.poi.rest': 'Χώρος ανάπαυσης',
'roadtrip.poi.campsite': 'Κάμπινγκ',
'roadtrip.poi.food': 'Φαγητό',