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
This commit is contained in:
1 parent
5e31dfaba9
commit
87d7bd2463
36 files changed
+2047
-123
No files matched your search
+20
-1
@@ -167,12 +167,25 @@
|
||||
<div class="route-panel__body">
|
||||
<p class="route-panel__editing" hidden></p>
|
||||
<!-- the itinerary (the Design canvas' Itinerary): the shared trip's name,
|
||||
when it leaves; a day after a night stop starts at "Days start" -->
|
||||
when it leaves; a day after a night stop starts at "Days start"; its note -->
|
||||
<div class="route-panel__trip">
|
||||
<input type="text" name="name" maxlength="80" placeholder="Trip name" aria-label="Trip name">
|
||||
<label>Leave <input type="datetime-local" name="start"></label>
|
||||
<label>Days start <input type="time" name="day_start" placeholder="09:00"></label>
|
||||
<label>Fuel <input type="number" name="fuel_price" min="0" max="10" step="0.01" placeholder="–"> €/l</label>
|
||||
<label>Budget <input type="number" name="budget" min="0" max="1000000" step="10" placeholder="–"> €</label>
|
||||
<textarea name="note" rows="1" maxlength="2000" placeholder="The trip's note" aria-label="The trip's note"></textarea>
|
||||
</div>
|
||||
<!-- is the trip ready (the canvas' Plan, Check): each problem with its stop -->
|
||||
<details class="route-panel__fold route-panel__check" hidden>
|
||||
<summary>Check <span class="route-panel__fold-meta"></span></summary>
|
||||
<ul></ul>
|
||||
</details>
|
||||
<!-- the money (the canvas' Plan, Costs): planned from the route and the stops vs paid -->
|
||||
<details class="route-panel__fold route-panel__costs" hidden>
|
||||
<summary>Costs <span class="route-panel__fold-meta"></span></summary>
|
||||
<ul></ul>
|
||||
</details>
|
||||
<ol class="route-panel__points"></ol>
|
||||
<div class="route-panel__add">
|
||||
<button type="button" class="route-panel__chip route-panel__chip--add" data-action="search">+ Search</button>
|
||||
@@ -191,6 +204,8 @@
|
||||
<span class="route-panel__label">Avoid</span>
|
||||
<label class="route-panel__chip"><input type="checkbox" name="tolls"> Tolls</label>
|
||||
<label class="route-panel__chip"><input type="checkbox" name="highways"> Motorways</label>
|
||||
<label class="route-panel__chip"><input type="checkbox" name="ferries"> Ferries</label>
|
||||
<label class="route-panel__chip"><input type="checkbox" name="unpaved"> Unpaved</label>
|
||||
</div>
|
||||
<details class="route-panel__fold route-panel__directions" hidden>
|
||||
<summary>Directions <span class="route-panel__fold-meta"></span></summary>
|
||||
@@ -249,6 +264,10 @@
|
||||
<label data-for="car">Width <input type="number" name="width" step="0.1" min="1" max="4" placeholder="–"> m</label>
|
||||
<label data-for="car">Length <input type="number" name="length" step="0.5" min="2" max="25" placeholder="–"> m</label>
|
||||
<label data-for="car">Weight <input type="number" name="weight" step="0.1" min="0.5" max="60" placeholder="–"> t</label>
|
||||
<label data-for="car">Wheelbase <input type="number" name="wheelbase" step="0.01" min="1" max="10" placeholder="–"> m</label>
|
||||
<label data-for="car">Track <input type="number" name="track" step="0.01" min="1" max="3" placeholder="–" title="Between the wheels' centres, side to side"> m</label>
|
||||
<label data-for="car">Uses <input type="number" name="consumption" step="0.1" min="1" max="100" placeholder="–" title="Per 100 km: litres (kWh for an electric car), for the trip's costs"> /100 km</label>
|
||||
<label data-for="car">Ramps <input type="text" name="ramps" maxlength="30" placeholder="3 6 9" title="The levelling ramps' steps, cm"> cm</label>
|
||||
<label data-for="bicycle">Bike
|
||||
<select name="bicycle_type">
|
||||
<option value="Road">Road</option>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
<button type="button" id="random">From a random place</button>
|
||||
<button type="button" id="stop">Stop</button>
|
||||
</div>
|
||||
<div class="actions" style="margin-top: 8px">
|
||||
<select id="track" aria-label="A library track"><option value="">A library track…</option></select>
|
||||
<button type="button" id="replay">Replay it</button>
|
||||
</div>
|
||||
<p id="hint" style="color: GrayText; font-size: 0.85rem"></p>
|
||||
<label>Simulated time
|
||||
<select id="speedup"></select>
|
||||
@@ -69,6 +73,15 @@
|
||||
$("route").addEventListener("click", () => send("POST", { trip: true }));
|
||||
$("random").addEventListener("click", () => send("POST", {}));
|
||||
$("stop").addEventListener("click", () => send("DELETE"));
|
||||
$("replay").addEventListener("click", () => $("track").value && send("POST", { track: $("track").value }));
|
||||
// the library's tracks (a recorded one replays at its own speed; one with no times can't)
|
||||
json("/api/library/tree").then((tree) => {
|
||||
const tracks = [];
|
||||
const walk = (node, path) => node.children.forEach((c) => (c.type === "folder" ? walk(c, c.path) : c.kinds?.includes("track") && tracks.push([c.path, [path, c.name].filter(Boolean).join(" / ")])));
|
||||
walk(tree, "");
|
||||
const esc = (s) => s.replace(/[&<>"]/g, (ch) => `&#${ch.charCodeAt(0)};`);
|
||||
$("track").innerHTML += tracks.map(([key, label]) => `<option value="${key}">${esc(label)}</option>`).join("");
|
||||
}).catch(() => {});
|
||||
$("speedup").addEventListener("change", () => send("PUT", { speedup: Number($("speedup").value) }));
|
||||
|
||||
async function refresh() {
|
||||
|
||||
Reference in new issue
Block a user