Correct bug in the peakPowerHr formula

This commit is contained in:
Damien
2011-08-09 18:48:53 +02:00
committed by Mark Liversedge
parent 1debc38e98
commit 98ccf5b3a6

View File

@@ -204,8 +204,8 @@ class PeakPowerHr : public RideMetric {
foreach(const RideFilePoint *point, ride->dataPoints()) {
if (point->secs >= start && point->secs < stop) {
hr = point->hr + (points>0?hr/points:0);
points++;
hr = (point->hr + (points-1)*hr) / (points);
}
}
}