feat(roadtrip): say when a drive is longer than you drive

Roel and gfRally asked for three things: how far the car goes on a tank, how
long you are willing to sit behind the wheel in one go, and how much driving
belongs in a day. They are one feature. All three are a threshold, a walk over
the legs, and a finding.

Two things they deliberately are not. They are durations and distances rather
than times of day, because with no stop pinned to a clock the cascade produces
no times at all, for any stop, and a limit on an hour would simply never fire.
And the day limit is called driving time, not travel time, because the figure
it is measured against is exactly that: the badge beside it, which counts no
time spent at stops and no leg to a hotel. The card says so out loud rather
than leaving it to be discovered.

The range budget carries across midnight, since a tank does not empty
overnight, and resets after a finding: without that, 1800 km on a 600 km range
flags every leg after the first overrun. Only fuel and charging reset it, never
the other four service kinds — a two-hour lunch fills nothing, and nobody here
knows whether the restaurant has a charger in its car park.

Kilometres in storage, the traveller's own unit on screen. Skipping that round
trip means an imperial user types 400 meaning miles, 400 km is stored, and the
warnings arrive a third too early from then on.

No stop is suggested and no vehicle is modelled. OSM does not know what car
this is and neither do we, so the range is a number you type. Furkot does the
same, for the same reason.
This commit is contained in:
Maurice
2026-09-04 21:59:15 +02:00
committed by Maurice
parent 56266138c6
commit dfb038d90f
34 changed files with 686 additions and 26 deletions
+12
View File
@@ -129,6 +129,18 @@ export interface Settings {
map_provider?: 'leaflet' | 'mapbox-gl' | 'maplibre-gl'
/** Leaflet base layer: default street tiles or a satellite/aerial view. */
map_base_layer?: 'default' | 'satellite'
/**
* The three road-trip driving limits (#1797). All three are personal rather than
* instance configuration — how long you are willing to drive and how far your car goes
* are properties of the traveller, so they are plain per-user settings and stay out of
* the defaultable list.
*
* Stored as numbers; 0 or absent means no limit. Kilometres are always kilometres in
* storage and converted for display, the same rule the corridor widths follow.
*/
roadtrip_leg_minutes?: number
roadtrip_day_minutes?: number
roadtrip_range_km?: number
/** CARTO basemaps watermark keyless tiles; the key is appended as ?key= (#2054). */
carto_api_key?: string
mapbox_access_token?: string