mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-13 12:42:20 +00:00
Fixed HRV to HR in SML files
To avoid HR gaps when < 60 bpm Added test file with HRV and no HR
This commit is contained in:
@@ -278,8 +278,8 @@ SmlParser::endElement(const QString&, const QString&, const QString& qName)
|
|||||||
double rr = strRR.toDouble() / 1000.0;
|
double rr = strRR.toDouble() / 1000.0;
|
||||||
if (ewmaRR < 0.0) ewmaRR = rr;
|
if (ewmaRR < 0.0) ewmaRR = rr;
|
||||||
else ewmaRR += (rr - ewmaRR)/ewmaTC;
|
else ewmaRR += (rr - ewmaRR)/ewmaTC;
|
||||||
if (secs + rr >= trunc(secs) + 1.0) {
|
for (int i = 0; secs + rr >= trunc(secs) + i + 1; i++) {
|
||||||
rideFile->setPointValue(rideFile->timeIndex(secs), rideFile->hr, round(60.0/ ewmaRR));
|
rideFile->dataPoints()[rideFile->timeIndex(secs + i)]->hr = round(60.0/ ewmaRR);
|
||||||
}
|
}
|
||||||
secs += rr;
|
secs += rr;
|
||||||
}
|
}
|
||||||
|
|||||||
576071
test/rides/Ambit3-HRVbutNoHR.sml
Normal file
576071
test/rides/Ambit3-HRVbutNoHR.sml
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user