mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Fix Average Speed aggregation
It didn't set count so it defaulted to duration, when it should use Moving Time for that purpose. Also changed Recovery Points to 2*ln(RMSSD).
This commit is contained in:
@@ -1055,6 +1055,7 @@ class AvgSpeed : public RideMetric {
|
||||
}
|
||||
|
||||
setValue(secsMoving ? km / secsMoving * 3600.0 : 0.0);
|
||||
setCount(secsMoving);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -1062,6 +1063,7 @@ class AvgSpeed : public RideMetric {
|
||||
assert(deps.contains("workout_time"));
|
||||
secsMoving = deps.value("workout_time")->value(true);
|
||||
setValue(secsMoving ? km / secsMoving * 3600.0 : 0.0);
|
||||
setCount(secsMoving);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -827,7 +827,7 @@ public:
|
||||
if (item->getHrvMeasure("RECOVERY_POINTS") > 0)
|
||||
setValue(item->getHrvMeasure("RECOVERY_POINTS"));
|
||||
else if (item->getHrvMeasure("RMSSD") > 0)
|
||||
setValue(1.5 * log(item->getHrvMeasure("RMSSD")) + 2);
|
||||
setValue(2 * log(item->getHrvMeasure("RMSSD")));
|
||||
else
|
||||
setValue(0.0);
|
||||
setCount(0);
|
||||
|
||||
@@ -166,8 +166,9 @@
|
||||
// 156 18 Mar 2021 Ale Martinez Added Time and % in Zones I, II and III
|
||||
// 157 27 May 2021 Ale Martinez Added Pace Row
|
||||
// 158 28 Feb 2024 Ale Martinez Enabled Pace for Walking
|
||||
// 159 28 Apr 2024 Ale Martinez Fix Avg Speed aggregation
|
||||
|
||||
int DBSchemaVersion = 158;
|
||||
int DBSchemaVersion = 159;
|
||||
|
||||
RideMetricFactory *RideMetricFactory::_instance;
|
||||
QVector<QString> RideMetricFactory::noDeps;
|
||||
|
||||
Reference in New Issue
Block a user