mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 08:59:55 +00:00
Tweak Virtual Power
If cadence is zero when calculating power then we should set power to zero. Speed will not be zero when freewheeling and therefore the calculation will overstate power output. Secondly, the NullController (for testing) did not call the realtimeController post process function. It does now so we can test the virtual power calculation.
This commit is contained in:
@@ -102,9 +102,12 @@ RealtimeController::processRealtimeData(RealtimeData &rtData)
|
||||
// for the data / analysis see: http://wattagetraining.com/forum/viewtopic.php?f=2&t=335
|
||||
rtData.setWatts((0.21*pow(V,3))+(4.25*V));
|
||||
}
|
||||
break;
|
||||
default : // unknown - do nothing
|
||||
break;
|
||||
}
|
||||
// if calculating but no cadence then power must be set to zero
|
||||
if (dc->postProcess && !rtData.getCadence()) rtData.setWatts(0);
|
||||
}
|
||||
|
||||
// for future devices, we may need to setup algorithmic tables etc
|
||||
|
||||
Reference in New Issue
Block a user