computeBikeAvgPower
computeBikeAvgPower(
calories,durationSeconds):number
Defined in: console-sdk/src/units/index.ts:319
Bike average power (whole watts) inverted from a split’s calories and
duration, replicating app_motion_compute_cal_to_watt:
calPerMs = (calories · 1000) / durationMswatt = calPerMs / (0.000239 · factor(calPerMs))The factor comes from bikeFactorFromCalRate. The watt is rounded (not
floored) because the console’s real-time watt readout rounds even though the
stored value is a uint16_t.
Parameters
Section titled “Parameters”calories
Section titled “calories”number
Calories accrued over the split.
durationSeconds
Section titled “durationSeconds”number
Split duration in seconds.
Returns
Section titled “Returns”number
Average power in watts (rounded), or 0 for a zero input.