mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Estimate Power: corrected adjustment of CdA when not set (#4051)
When CdA is not set, it is estimated at every sample, using cadence. Beforehand, it was computed with the first sample Co-authored-by: Peret <mail@mail.com>
This commit is contained in:
@@ -230,6 +230,7 @@ FixDerivePower::postProcess(RideFile *ride, DataProcessorConfig *config=0, QStri
|
||||
windSpeed = ((FixDerivePowerConfig*)(config))->windSpeed->value(); // kph
|
||||
windHeading = ((FixDerivePowerConfig*)(config))->windHeading->value() / 180 * MATHCONST_PI; // rad
|
||||
}
|
||||
bool CdANotSet = (CdA == 0.0);
|
||||
|
||||
// Do nothing for swims and runs
|
||||
if (ride->isSwim() || ride->isRun()) return false;
|
||||
@@ -307,7 +308,7 @@ FixDerivePower::postProcess(RideFile *ride, DataProcessorConfig *config=0, QStri
|
||||
|
||||
double vw=V+W; // Wind speed against cyclist = cyclist speed + wind speed
|
||||
|
||||
if (CdA == 0) {
|
||||
if (CdANotSet) {
|
||||
double CwaRider = (1 + cad * cCad) * afCd * adipos * (((hRider - adipos) * afSin) + adipos);
|
||||
CdA = CwaRider + CwaBike;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user