Skip to content

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) / durationMs
watt = 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.

number

Calories accrued over the split.

number

Split duration in seconds.

number

Average power in watts (rounded), or 0 for a zero input.