Planning (the Design canvas' Plan and GridToday, ideas from azedler/roadplanner): a stop's type as its NPS pictogram (marker and list), notes on the trip, its days and stops, + on a leg inserts the next point there; a parking spot per stop (P marker, the route goes there, the walk shown); a link pasted into the search becomes a place (/api/link: the URL's coordinates, else the page's geo meta / JSON-LD / a map link; public addresses only, logged in), added on the leg it lengthens least; avoids for the trip (+ ferries, unpaved) or a day (routed in pieces, joined); Check and Costs folds in the Route panel (no leave time, long days, arriving after sunset, long walks, missing vignettes; fuel from km × consumption × price, stop costs / paid, the budget); Today in drive mode's Menu (stops left, tonight, sunset, Open-Meteo weather, the day's notes, Skip next, Tomorrow). Plugins along the trip's route (Maptool::Corridor, a corridor width; Overpass around:) and plugin settings saved server-side; p4n via a host Firefox's cookies (docs/deployment.adoc). The recording's days (cut where the car stood ≥ 4 h, or by hand) and their export (days, a piece A–B, the whole trip; GPX with times). Track replay in the GNSS simulator. Step advance 5 m past a maneuver. The level gauge (drive mode, from Terrain): lift per wheel to the ramps' steps from roll, pitch, wheelbase and track
CI / check (push) Successful in 23s
CI / deploy (push) Successful in 18s

This commit is contained in:
randy committed 2026-12-03 23:34:25 +01:00
1 parent 5e31dfaba9
commit 87d7bd2463
36 files changed
+2047 -123

No files matched your search

+6 -2
View File
@@ -42,6 +42,10 @@ const LANES_AHEAD_S = 45;
const ARRIVE_M = 30; // this close to the end: arrived (navigation goes on: past it, the route turns back)
const ARRIVE_TYPES = [4, 5, 6]; // Valhalla's destination maneuvers
const DEFAULT_WIDGETS = { inclinometer: true, speed: true, altitude: true, navigation: true, banner: true };
// Step advance after Ferrostar's DistanceEntryExit: a maneuver stays the next one
// until the position is this far past it (not before reaching it: at the turn the
// turn is still shown, "now"), then the one after it
const STEP_EXIT_M = 5;
const THEN_M = 300; // the maneuver after the next one shown with it when it follows this closely
// Voice prompts (speechSynthesis, Valhalla's verbal instructions), on/off in
// drive mode's Menu: "In 400 m, turn right…" from SOON_S ahead, the
@@ -294,7 +298,7 @@ export class DashboardControl {
const nextKm = [...limits, ...roads].map(([km]) => km).filter((km) => km > at).sort((a, b) => a - b).find((km) => limitAt(km) !== limit);
const next = nextKm != null ? [nextKm, limitAt(nextKm)] : null;
const signal = signals.find(([, , km]) => km > at);
const index = maneuvers.findIndex((m) => m.at > at + 0.005);
const index = maneuvers.findIndex((m) => m.at > at - STEP_EXIT_M / 1000);
const maneuver = maneuvers[index];
const then = maneuvers[index + 1];
const onStreet = maneuvers[index - 1]?.street; // the one being driven: the last maneuver's
@@ -307,7 +311,7 @@ export class DashboardControl {
next: next && { limit: next[1], m: (next[0] - at) * 1000 },
country: roads.findLast(([km]) => km <= at)?.[2] ?? null,
signal: signal && (signal[2] - at) * 1000,
maneuver: maneuver && { ...maneuver, m: (maneuver.at - at) * 1000 },
maneuver: maneuver && { ...maneuver, m: Math.max(0, (maneuver.at - at) * 1000) },
then: maneuver && then && then.at - maneuver.at <= THEN_M / 1000 ? then : null,
street: onStreet,
arrived: ARRIVE_TYPES.includes(maneuvers.at(-1)?.type) && (!maneuver || (index === maneuvers.length - 1 && (maneuver.at - at) * 1000 <= ARRIVE_M)),