summaryrefslogtreecommitdiff
path: root/ride/ride.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-08 10:05:05 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-08 10:05:05 +0200
commit2c00b74cc02b55e26d68fef108596aae56080d5a (patch)
tree793b37a40979b13f05135151814783003ba6bf44 /ride/ride.go
parent7aa64b0917130fcc1dc9f3da30d8f825136fe541 (diff)
feat: Persist Cotacol ride values
Diffstat (limited to 'ride/ride.go')
-rw-r--r--ride/ride.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ride/ride.go b/ride/ride.go
index ef91272..52f95b8 100644
--- a/ride/ride.go
+++ b/ride/ride.go
@@ -245,8 +245,10 @@ func (r *Ride) ScoreFromKm(start, end float64) float64 {
return Score(*r, i, j)
}
-func (r *Ride) DifficultyScore() float64 {
- return difficultyScore(*r, 0, r.Len()-1)
+const CotacolAlgorithmVersion = "v1"
+
+func Cotacol(ride Ride) float64 {
+ return difficultyScore(ride, 0, ride.Len()-1)
}
func difficultyScore(r Ride, startIndex, endIndex int) float64 {