Add GPX race pacing calculator#5
Open
smart-knowledge-systems wants to merge 2 commits intojohnjdavisiv:mainfrom
Open
Add GPX race pacing calculator#5smart-knowledge-systems wants to merge 2 commits intojohnjdavisiv:mainfrom
smart-knowledge-systems wants to merge 2 commits intojohnjdavisiv:mainfrom
Conversation
This commit transforms the single GAP calculator into a dual-mode application with two calculators: 1. Original GAP Calculator (preserved): - Maintains all existing GAP calculation functionality - Uses Minetti polynomial and Black GAM data for energy expenditure calculations 2. New GPX Race Pacing Calculator: - Parses GPX files to extract route elevation profiles - Implements iterative solver to find correct base pace that achieves goal time - Generates lap splits (400m, 1k, 1 mile, 5k) accounting for elevation changes - Uses GAP calculations to adjust pace for grade variations - Provides CSV export for splits Key implementation details: - GPXParser: Calculates distances, grades, and smoothed elevation profiles - GoalPaceSolver: Iteratively solves for base pace using reverse GAP calculations - LapCalculator: Generates splits with GAP-adjusted times for each segment - UI: Toggle between calculators, file upload, goal time input, results display The solver ensures that the calculated lap times, when accounting for all elevation changes along the route, will sum to exactly the target goal time. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add safety-based speed capping for steep downhills (>8% decline) where theoretical GAP speeds are unrealistic and dangerous to achieve in practice. Changes: - Add progressive speed limitation from -8% to -25% grade with max 60% reduction - Cap maximum downhill speed to 1.5x base pace for safety - Track segments where speed capping is applied for transparency - Display visual indicators (⚠️ ) on affected lap splits - Highlight speed-capped laps with yellow background - Show warning message in pacing strategy when adjustments are applied - Add tooltips explaining the safety limitations to users Based on research showing runners cannot achieve metabolically equivalent speeds on steep downhills due to biomechanical constraints and safety concerns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <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.
Summary
Test plan
🤖 Generated with Claude Code