Repository navigation
Add a GPX track for the velodrome - #5
Merged
Merged
Conversation
Apps that only ride GPS routes, such as Incyclist, can import routes/velodrome-250.gpx. tools/velodrome_gpx.py writes it: OpenRadlr's 250 m oval at a fixed anchor, scaled to 250 m by the haversine formula, closed by repeating the first point. The validator checks that each GPX track matches its route's length within 1 cm and closes on a loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Apps that only ride GPS routes can't use
routes/velodrome-250.jsondirectly. Incyclist is the first of these. This adds a GPX track of the same route, so those apps can import it.What's in it
routes/velodrome-250.gpx: OpenRadlr's 250 m oval (two 50 m straights, two semicircles, a point every ~2.5 m on the bends). It starts at 47.0 N, 8.0 E, round numbers chosen on purpose, not a real velodrome. The track is closed: the last point repeats the first.tools/velodrome_gpx.py: writes the file and gives the same output byte for byte on every run. It scales the oval so the track measures 250 m within 1 mm, using the haversine formula on a 6378.1 km sphere, the radius Incyclist uses.tools/validate.py: checks everyroutes/<id>.gpx. A route<id>must exist, the track must be the route's length within 1 cm, and on a loop it must end at its first point.Checked
tools/validate.pypasses (with the pinnedjsonschema4.23.0). It fails as expected on a track with the closing point removed: "track is 247.501 m long, expected 250" and "the track does not end at its first point".GPXParser(fromincyclist/services) imports the file as a 250.0005 m loop and keeps all 63 points. Its route hash is3d74c4d2601274d54323be94319d8207. Incyclist will recognise the velodrome by that hash, so this file must not change once merged (spec 4.2).🤖 Generated with Claude Code