Repository navigation
Conversation
- Six routing styles (road, quiet roads, gravel, touring, safest, MTB), chosen per section between waypoints. - Sections are planned one at a time and kept in memory, so an edit only re-plans what changed. - Drag the route to insert a waypoint; undo/redo, reverse, close the loop, out and back. - Make a loop: BRouter round trips of a chosen distance and heading, returned as editable waypoints; "Try another" for a different one. - Breakdown from the OSM way tags: surfaces and road types with distances, shown on the map; climbs listed and shaded on the profile; an estimated time at 75% of FTP from the app's own physics and surfaces. - New core module planner.rs with 8 tests; a live-network loop test; VP_SMOKE_PLAN for the smoke harness. Docs and wiki page updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bigger route finder, inspired by the route planners in apps like Komoot and Calimoto. The features are our own take on ideas from them; none of their code, designs or services are used, and everything here is written from scratch on BRouter and OpenStreetMap.
What's new
How
crates/core/src/planner.rs: reading BRouter's GeoJSON with its way tags, joining sections, classifying ways, the breakdown, the map outline, ride time and loop waypoints.geo::planplans each section separately (four at once, cached);geo::round_tripmakes the loop and seeds the cache so its waypoints plan back to exactly the same loop.geo_plannow takes a style per section; newgeo_round_tripcommand.Plannedgains the climbs, section lengths, breakdown and time estimate.VP_SMOKE_PLAN(lat,lon;lat,lon;…orloop:lat,lon,km).Also adds a roadmap item: a Road ride / Closed race choice per ride, with road rides on open roads that join the real road network.
Testing
npm run checkpasses: 8 new planner tests (154 in total).Docs:
docs/developers/routes.md(new "Planning on the map" section), connectors-and-services, architecture, building-and-testing, the wiki's Routes and the map page, README and HANDOFF.