From 765ea1fffcc1bd1af2e6e9645d6f138dfd4ae0eb Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 21 Aug 2026 22:09:21 +0200 Subject: Require a 3.5% minimum slope on detected climbs, re-segmenting gentler stretches A detected climb must now average at least 3.5% slope with re-segmentation: gentle drags are split into their qualifying steeper parts instead of being reported wholesale or dropped. Qualifying climbs keep their previous boundaries exactly; only regions whose classic best climb averages below the threshold get re-segmented (full-scan for the best qualifying sub-segment, found=false when none exists). QA: A/B across data/rides (362 rides) went from 137 to 133 climbs, 23 rides changed; the 7 fully-dropped rides were audited to contain zero qualifying sub-segments. Example-ride tests updated for the new behavior; the resolved "minimum slope" TODO was removed. --- rideanalysis/analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rideanalysis/analysis.go') diff --git a/rideanalysis/analysis.go b/rideanalysis/analysis.go index f055676..fae64b8 100644 --- a/rideanalysis/analysis.go +++ b/rideanalysis/analysis.go @@ -46,7 +46,7 @@ func Analyze(parsed ride.Ride, passes []mountain_pass.MountainPass, officialClim claimedRanges = append(claimedRanges, ride.Range{Start: matched.StartIndex, End: matched.EndIndex}) claimedClimbs = append(claimedClimbs, analyzedClimb(parsed, parsed.ClimbFromIndexes(matched.StartIndex, matched.EndIndex), official.Name, official.ID)) } - for _, detectedClimb := range parsed.DetectClimbs(claimedRanges) { + for _, detectedClimb := range parsed.DetectClimbs(claimedRanges, ride.ClimbSlopeMinimum) { displayClimb := detectedClimb if matchedPass, ok := mountain_pass.MatchClimb(displayClimb, passes, passMatchRadiusM, passMatchElevationToleranceM); ok { displayClimb.Name = matchedPass.Name -- cgit v1.3