mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Avoid to mischaracterize OW swims as Pool swims
When GPS data was available before the first distance tick,
includes test file contributed at the forum.
Fixes #4251
Also reverts the TCX part of 1f094f5 since it is incomplete,
and not such a good idea anyway.
This commit is contained in:
@@ -209,6 +209,7 @@ TcxParser::endElement( const QString&, const QString&, const QString& qName)
|
||||
// If sport was Other and we have distance but no GPS data
|
||||
// we assume it is a pool swimming activity and first
|
||||
// distance is pool length
|
||||
if (swim == MayBeSwim && !badgps) swim = NotSwim; // not a pool swim if we have GPS data
|
||||
if (swim == MayBeSwim && badgps && distance > 0) {
|
||||
swim = Swim;
|
||||
rideFile->setTag("Sport", "Swim");
|
||||
@@ -373,8 +374,8 @@ TcxParser::endElement( const QString&, const QString&, const QString& qName)
|
||||
if (swimXdata) swimXdata->datapoints.append(p);
|
||||
lastLength = secs + round(lapSecs);
|
||||
}
|
||||
// expand even if Smart Recording is not enabled
|
||||
if (swim == Swim && distance == 0) {
|
||||
// expand only if Smart Recording is enabled
|
||||
if (swim == Swim && distance == 0 && isGarminSmartRecording.toInt()) {
|
||||
// fill in the pause, partially if too long
|
||||
for(int i = 1; i <= round(lapSecs) && i <= 300*GarminHWM.toInt(); i++)
|
||||
rideFile->appendPoint(secs + i,
|
||||
|
||||
37237
test/swims/OWswim.tcx
Normal file
37237
test/swims/OWswim.tcx
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user