Skip to content

Commit

Permalink
More accurate FTP inference from time in zones power data
Browse files Browse the repository at this point in the history
Using lower bound - 0.5 produces more expectant results.
  • Loading branch information
mayfield committed May 2, 2024
1 parent c496a18 commit c0fbc25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ sauce.ns('perf', function() {
info.athlete_weight = sauce.data.avg(data.cp_data.map((x, i) => x.at(-1) / data.cp_data_wkg[i].at(-1)));
}
if (data.range_array) {
const zones = data.range_array.map(x => parseInt(x)); // lower bounds
const zones = data.range_array.map(x => parseInt(x) - 0.5); // lower bounds
if (typeof zones[1] === 'number') {
info.athlete_ftp = Math.round(sauce.data.avg([
zones[1] / 0.55,
Expand Down

0 comments on commit c0fbc25

Please sign in to comment.