mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
feat(roadtrip): suggest where to fill up, not just warn that you cannot
The range budget has always been able to say "you have driven 245 km on this tank" and never "and here is where to do something about it". The review put it plainly: the value is in the suggestion, not in the warning. The warning sits on the stop the car ARRIVES at, which is where somebody finds out. The fuel runs out earlier, often most of a leg earlier, and a filling station offered at the warning is one the car cannot reach. So the dry point is computed where it actually is, a search runs around it on request, and what comes back is filtered to what can be reached. Three filters, each one there because its absence gives a wrong answer rather than an untidy one. Only what lies before the tank empties, because a pump past it is on the far side of an empty tank. The detour counts double, because 8 km off the road is 16 km of driving. And a reserve is kept back, because the range figure is a round number from a manual, not a measurement. Sorted by the detour rather than by how far it gets. Measured on a real day between Hamburg and Berlin: the station that got furthest was 9.2 km off the road for one kilometre more of range, while one 0.9 km off sat almost as late. Deduplicated by name and half a kilometre, which also came out of that measurement. OSM maps a charging site as one node per socket: the first three offers were the same "autostrom plus GmbH" three times over. The four nodes sat in two pairs 6 m and 7 m apart with 450 m between the pairs, while genuinely different branches of one chain were 18 to 36 km apart — so anything from 500 m upwards separates the two cases. An empty answer says which kind of empty it is. "Nothing on the reachable stretch" after a request that failed or was cut short states something that was never checked, and the server flags both cases itself. Offline it does not offer at all: the place write queues offline but the day assignment does not, so accepting one would leave an orphan. Nothing is searched until it is asked for, and one press is one request against a small circle rather than the sixteen boxes a corridor run costs. Accepting hands the choice to the same popup a corridor hit goes through, so the stop kind, the dwell time, the position, the via re-anchoring and the re-route are the paths that already work. The dry point counts DRIVING metres only. The day's drawn line concatenates every run, ferries and walks included, while the budget skips those, so walking that line to the same figure would overshoot by the length of any crossing and put the marker out at sea.
This commit is contained in:
@@ -38,6 +38,14 @@ const roadtrip: TranslationStrings = {
|
||||
'roadtrip.avoid.badge': 'تجنُّب {count}',
|
||||
'roadtrip.avoid.missed': 'لا مفر من {classes}',
|
||||
'roadtrip.avoid.missedHint': 'لا يوجد في هذا اليوم طريق بديل، لذلك تمر الرحلة منه. أما بقية الأيام فتظل تتجنب ما تستطيع.',
|
||||
'roadtrip.refuel.dry': 'ينفد الخزان في هذه المرحلة، بعد {distance}',
|
||||
'roadtrip.refuel.find': 'ابحث عن وقود',
|
||||
'roadtrip.refuel.looking': 'جارٍ البحث على طول الطريق…',
|
||||
'roadtrip.refuel.spare': 'يتبقى {distance}',
|
||||
'roadtrip.refuel.add': 'إضافة {name} كمحطة تزود بالوقود',
|
||||
'roadtrip.refuel.none': 'لم يُعثر على شيء في المسافة التي يمكن بلوغها.',
|
||||
'roadtrip.refuel.incomplete': 'اقتُطع البحث، لذا لم تُفحص هذه المسافة بالكامل.',
|
||||
'roadtrip.refuel.failed': 'لم يستجب البحث عن الأماكن.',
|
||||
'roadtrip.stop.none': 'وجهة',
|
||||
'roadtrip.stay.mode.pause': 'استراحة',
|
||||
'roadtrip.stay.mode.night': 'مبيت',
|
||||
|
||||
Reference in New Issue
Block a user