mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix Derive Power fixup for auto run
.. if power is already present, or alt or speed are missing then the fix derive power postProcess won't try and derive power for the ride .. this is so you can add it as an 'auto' tool and derive power values for rides that don't have power but do have speed and altitude.
This commit is contained in:
@@ -101,6 +101,12 @@ FixDerivePower::postProcess(RideFile *ride, DataProcessorConfig *config=0)
|
||||
{
|
||||
Q_UNUSED(config);
|
||||
|
||||
// if its already there do nothing !
|
||||
if (ride->areDataPresent()->watts) return false;
|
||||
|
||||
// no dice if we don't have alt and speed
|
||||
if (!ride->areDataPresent()->alt || !ride->areDataPresent()->kph) return false;
|
||||
|
||||
// Power Estimation Constants
|
||||
double hRider = 1.7 ; //Height in m
|
||||
double M = ride->getWeight(); //Weight kg
|
||||
|
||||
Reference in New Issue
Block a user