Repository navigation
Description
Goal
Ride OpenBikeNet's new shared track, Herne Hill Velodrome (herne-hill-450, and herne-hill-450-clockwise for the other way round), in OpenRadlr. Both velodromes move onto the island (map valley), so everybody sees each other: riders on the roads, on either track, and riders of other apps on the tracks. Lanzarote stays a world of its own.
VeloPopuli has already built Herne Hill in, both ways round (velopopuli#75), using the same oval as the shared route. A real track that two apps already ride has a better chance than the made-up 250 m oval of becoming the place where riders of different apps actually meet.
Depends on OpenBikeNet/protocol#6, which adds the two route files and GPX tracks (reviewed, not merged yet). After it merges, the OpenBikeNet server needs its protocol submodule bumped and openbikenet.cloud redeployed: the server only accepts routes it knows and answers others with unknown_route.
What we already have
| Piece | Where | Reuse |
|---|---|---|
| Shared velodrome, its own world, no bots | routes/velodrome.json ("openbikenet": "velodrome-250"), ADR 0020 |
Pattern for the new route files |
| Oval generator | tools/velodrome-route.mjs |
Generalise to a radius and length, or add a sibling for Herne Hill (450 m, bend radius 45.3 m, as in protocol#6's tools/herne_hill_gpx.py) |
| Several routes in one world | map.id in route files, grouped in server/crates/server/src/app.rs; ADR 0010. "Riders of other routes show where they are in view" (docs/routes.md, One map, several routes) |
This is what makes both tracks visible to each other |
| No bots in a shared world | sim_config_for in app.rs: any route with openbikenet sets target_riders = 0 |
Works as is |
| OpenBikeNet link, outbox, remote riders | server/crates/server/src/obn/ (link.rs, outbox.rs, remote.rs) |
Works for one route; see below |
| Riders on other routes listed apart | client/public/js/ride/roadRiders.js (ridesElsewhere, elsewhereName) |
Riders drawer |
What is missing
The server assumes one shared route per world, 250 m long:
app.rspicks the first route withopenbikenet(group.iter().position(...)) and starts one link for it.GameCore::with_openbikenet(index, route, frames)takes a single route.obn/mod.rs:OBN_LENGTH_M = 250.0is a constant. It scales distances both ways (outbox.rs,remote.rs). Herne Hill needs 450.link.rssends onesubscribe. The protocol allows several on one connection (spec v0 §3, §6.2), andjoin/updatecarry the route, so one link can serve all shared routes.
Proposal
- On the island: give
velodrome,herne-hillandherne-hill-clockwisethe island'smap.id(valley). Place each oval on a flat spot near a road, so riders on the road see the track, like the spin studio across from the Valley Café. The tracks are not part of the road network (no junctions), so bots can't turn onto them. Check that the client draws them: the island is built fromroutes/maps/valley.json, which doesn't know the tracks.- Bots: today any world with a shared route gets no bots (
sim_config_for). On the island that would remove every bot. Change it to "no bots on shared routes": bots ride the roads, never the tracks, so other apps never see our bots. - Riders of other apps are shown today only to riders on the shared route (
GameCore::with_remotes). They should be shown to everybody in the world who has them in view, like riders of other routes.
- Bots: today any world with a shared route gets no bots (
- Both directions as two OpenRadlr routes on the same oval (identical points, reversed order). This matches the two shared route IDs. Riders going opposite ways pass each other, which is fine: this is about presence, not racing (ADR 0020: no drafting or races with remote riders).
- Server: shared routes per world instead of one, with the OpenBikeNet length per route (from the route file, or a new field next to
openbikenet) instead ofOBN_LENGTH_M. One link per server subscribes to every shared route. - Client: start menu entries with Shared as today, plus descriptions in
en.jsandde.js. Lean: show Herne Hill once with a direction choice, as VeloPopuli does, rather than two near-identical cards. - Docs: an ADR that amends 0020. It says the velodrome is now a world shared with other tracks, and that several shared routes are possible; "No other route is ever shared" becomes "only routes with
openbikenetare shared". Also updatedocs/routes.md.
No geo for Herne Hill: rides stay virtual, as on the 250 m velodrome. The world origin doesn't move.
Open questions
- Where on the island the tracks go. Lean: flat spots next to a road the island routes use, in view from the road.
- Herne Hill as one start-menu entry with a direction choice, or two entries. Lean: one entry.
First version
- protocol#6 merged
-
routes/herne-hill.jsonandroutes/herne-hill-clockwise.jsongenerated, 450 m to within 0.01 m,openbikenetset,map.idvalley, likevelodrome - Server shares several routes per world, each with its own OpenBikeNet length; one link subscribes to all of them (tests in
obn/andtests/openbikenet.rs) - Bots ride the island's roads, never the tracks
- Riders on the roads and on both tracks see each other in 3D, including riders of other apps on the tracks
- OpenBikeNet server:
protocolsubmodule bumped,openbikenet.cloudredeployed - Start menu shows Herne Hill as Shared when
OPENRADLR_OBN_URLis set, in English and German - ADR amending 0020, plus
docs/routes.md
Activity
[-]Ride Herne Hill Velodrome next to the 250 m velodrome, shared with other apps[/-][+]Put both velodromes on the island, Herne Hill shared with other apps[/+]