mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fit file import - Interpolate lrbalance between valid values only
Fixes #4117
This commit is contained in:
@@ -2085,7 +2085,7 @@ struct FitFileReaderState
|
||||
double deltaLat = lat - prevPoint->lat;
|
||||
// double deltaHeadwind = headwind - prevPoint->headwind;
|
||||
double deltaSlope = slope - prevPoint->slope;
|
||||
double deltaLeftRightBalance = (lrbalance>=0?lrbalance:50.0) - (prevPoint->lrbalance?prevPoint->lrbalance:50.0);
|
||||
double deltaLeftRightBalance = lrbalance - prevPoint->lrbalance;
|
||||
double deltaLeftTE = leftTorqueEff - prevPoint->lte;
|
||||
double deltaRightTE = rightTorqueEff - prevPoint->rte;
|
||||
double deltaLeftPS = leftPedalSmooth - prevPoint->lps;
|
||||
@@ -2126,7 +2126,7 @@ struct FitFileReaderState
|
||||
0.0, // headwind
|
||||
prevPoint->slope + (deltaSlope * weight),
|
||||
temperature,
|
||||
prevPoint->lrbalance + (deltaLeftRightBalance * weight),
|
||||
(lrbalance!=RideFile::NA && prevPoint->lrbalance!=RideFile::NA) ? prevPoint->lrbalance + (deltaLeftRightBalance * weight) : RideFile::NA, // interpolate between valid values only
|
||||
prevPoint->lte + (deltaLeftTE * weight),
|
||||
prevPoint->rte + (deltaRightTE * weight),
|
||||
prevPoint->lps + (deltaLeftPS * weight),
|
||||
|
||||
Reference in New Issue
Block a user