feat: a stop ticked for a race reaches 500 m from that race's line - #197
Merged
Merged
Conversation
The Mankato organizer spaced the race lines apart on purpose, so stop A is 284 m off the Half. Ticked stops now reach STATED_MAX_OFFSET_M; unticked stops keep 250 m. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QkbtsMnQEe8HZ7xyxXHYHB
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.
Why
The Mankato organizer spaced the Full, Half and 10K lines apart on purpose so each race shows on the map where they share road. That put water stop A 284 m from the Half's line - beyond the 250 m limit - so A had no Half mile and the Half's first leg had no pace or ETA. There is no corrected file to wait for: the offset is the design.
What
progress.STATED_MAX_OFFSET_M = 500.0: a stop the club ticked for a race (poi_course) reaches that far on that race.CourseIndex.progression(..., stated=)applies it per stop;place_positionspasses its (all-ticked) stops,leaders._leader_forpasses the race's ticked stops.DEFAULT_MAX_OFFSET_M(250 m), which is what stops a stop on a neighbouring road getting a confident wrong mile.Tests
Four new tests in
tests/test_place_miles.py(ticked stop at 284 m gets its race's mile; unticked does not; ticked at 900 m does not; leader progression measures a ticked far stop). Full suite: 895 passed, 1 skipped before a test-only fix (the test placed a stop backwards along the north-to-south Half); progress tests re-run green after.Not yet checked against the real
Half.kmz; the mile is as good as the offset line.🤖 Generated with Claude Code
https://claude.ai/code/session_01QkbtsMnQEe8HZ7xyxXHYHB