mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Serious bug fix: while interval duration SHOULD be computed by using
previous data point (i.e., q->secs - p->secs), the duration to multiply the wattage value by SHOULD NOT be. Instead, should multiply by rec_int. (My ride from Jul 31, 2007 demonstrates the problem. I started an interval with a 1-sec wattage of 773 after a ~48 second rest. Using the old code, that gets credited as 773 watts for 48 secs!)
This commit is contained in:
@@ -200,7 +200,7 @@ update_cpi_file(cpi_file_info *info,
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
sum += (q->secs - prev_secs) * q->watts;
|
||||
sum += data.rec_int_ms / 1000.0 * q->watts;
|
||||
double dur_secs = q->secs - p->secs;
|
||||
double avg = sum / dur_secs;
|
||||
int dur_secs_top = (int) floor(dur_secs);
|
||||
|
||||
Reference in New Issue
Block a user