From 077aa1700fbcaf3f499c2178e0e58e89ae9dcaf8 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 25 Sep 2026 08:46:58 +0200 Subject: Chart power vs time for official climb attempts Snapshot average power per attempt in a nullable average_power_w column (backfilled from stored rides), plot each powered attempt on the climb page as duration vs average watts with ride hover and click-through, and show avg power in the attempts table. --- rideanalysis/attempts.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rideanalysis/attempts.go') diff --git a/rideanalysis/attempts.go b/rideanalysis/attempts.go index faf02e9..0a89895 100644 --- a/rideanalysis/attempts.go +++ b/rideanalysis/attempts.go @@ -9,6 +9,7 @@ import ( func Attempts(rideID int64, analysis Result, parsed ride.Ride) []official_climb.Attempt { occurrences := make(map[int64]int) attempts := make([]official_climb.Attempt, 0) + powers, _ := parsed.Powers() for _, analyzed := range analysis.Climbs { if analyzed.OfficialClimbID == 0 { continue @@ -23,7 +24,7 @@ func Attempts(rideID int64, analysis Result, parsed ride.Ride) []official_climb. Cotacol: analyzed.Cotacol, StartIndex: analyzed.Interval.Start, EndIndex: analyzed.Interval.End, - }, parsed.Timestamps())) + }, parsed.Timestamps(), powers)) } return attempts } -- cgit v1.3