diff options
Diffstat (limited to 'rideanalysis')
| -rw-r--r-- | rideanalysis/analysis.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rideanalysis/analysis.go b/rideanalysis/analysis.go index 90be629..55f77b8 100644 --- a/rideanalysis/analysis.go +++ b/rideanalysis/analysis.go @@ -39,7 +39,7 @@ func Analyze(parsed ride.Ride, passes []mountain_pass.MountainPass, officialClim claimedClimbs := make([]AnalyzedClimb, 0) claimedRanges := make([]ride.Range, 0) for _, official := range officialClimbs { - for _, matched := range official_climb.MatchClimbs(parsed.Coords, official, matchPolicy.EndpointRadiusM) { + for _, matched := range official_climb.MatchClimbs(parsed.Coords(), official, matchPolicy.EndpointRadiusM) { 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)) } @@ -72,7 +72,7 @@ func analyzedClimb(parsed ride.Ride, segment ride.Climb, name string, officialID Name: name, Category: ride.CategoryOf(cotacol).String(), DistanceM: segment.EndDistanceM() - segment.StartDistanceM(), - SlopePercent: ride.Slope(parsed, segment.StartIndex(), segment.EndIndex()) * 100, + SlopePercent: ride.Slope(parsed.Distances(), parsed.Elevations(), segment.StartIndex(), segment.EndIndex()) * 100, Cotacol: cotacol, OfficialClimbID: officialID, OfficialName: officialClimbNameForID(name, officialID), |
