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

+28
View File
@@ -0,0 +1,28 @@
require_relative "test_helper"
require "maptool/corridor"
class CorridorTest < Minitest::Test
C = Maptool::Corridor
# 30 km east along 48° N, as a vertex every ~0.75 km
LINE = (0..40).map { |i| [17.0 + i * 0.01, 48.0] }
def test_circles_cover_the_corridor_with_no_gap
circles = C.circles(LINE, 2.0)
assert_in_delta 2.5, circles.first[1], 1e-9
# every point 2 km off the line, all along it, inside a circle
(0..300).each do |i|
lon = 17.0 + i * 0.4 / 300
edge = [lon, 48.0 + 2.0 / C::KM_PER_DEG]
assert circles.any? { |center, r| C.km(center, edge) <= r + 1e-6 }, "gap at #{lon}"
end
assert_operator circles.size, :<=, (C.km(LINE.first, LINE.last) / 3.0).ceil + 2
end
def test_distance_to_the_line_and_thinning
assert_in_delta 1.0, C.distance_km([17.2, 48.0 + 1.0 / C::KM_PER_DEG], LINE), 1e-3
assert_in_delta C.km([16.99, 48.0], LINE.first), C.distance_km([16.99, 48.0], LINE), 1e-9 # past an end: to the end
thin = C.thin(LINE, 2.0)
assert_equal [LINE.first, LINE.last], [thin.first, thin.last]
assert thin.each_cons(2).to_a[0..-2].all? { |a, b| C.km(a, b) >= 2.0 }
end
end