Commit 420b2b6 introduced a bug whereby it used the total workout time,
rather than the time riding, to compute xPower. This should only affect
your data if you take long breaks during rides, like to stop for brunch,
or if you store multiple rides in the same ride file--i.e., you don't
use the split ride feature. Nonetheless, it's worth deleting your
stress.cache file after applying this commit, just in case.
I've also added three rides, notes, and a zones file to the test directory to
illustrate the differences discussed above. The first ride is just an hour at
CP/FTP. It should have a BikeScore of very close to 100, and Daniels Points
very close to 33. The next ride is the same as the first, but followed by 20
minutes of coasting. Its Daniels Points should be the same as the former,
but its BikeScore should be a good bit higher. The final ride is the same as
the first, but interrupted partway through by 30 minutes of no riding at all,
as though the cyclist stopped for coffee and a pastry. It should have
nearly identical BikeScore and Daniels Points to the first ride. In the
broken implementation of xPower that this commit fixes, it did not.
Dan C: I reverted your changes to the xPower calculation in this commit and
went back to my implementation. It's just easier for me to think about the
code that way. My apologies. I kept the other changes you made, though.
Fit a curve to the points system in Table 2.2 of "Daniel's Running Formula",
Second Edition, assume that power at VO2Max is 1.2 * FTP, further assume that
pace is proportional to power (which is not too far off in running), and scale
so that one hour at FTP is worth 33 points (which is the arbirary value
Daniels chose).
Just attribute all earlier rides to the first zone. We should do better in
the future, maybe by complaining to the user in a dialog, but for now,
not crashing definitely seems better than crashing.
This seems like the right call to me. If I'm doing an interval and I stop
riding for some reason, I'm resting, and that should affect my average power.
I thought it was always this way, but apparently not.
The default position of the power combo box in the Ride Plot is to shade
power. Change the default value of the shade_power variable to match. This
didn't matter before 79ced76, since prior to that commit we (mostly
redundantly) called showPower from setAllPlotWidgets, whereas now we only call
showPower after a change in the combo box.
I don't like disabling the ride plot tab when I select a manual ride,
because I frequently scroll through the ride list to search for a ride
by the shape of its ride plot, and every time I hit a manual ride I get
bounced to the CP plot tab. So rather than disable the ride plot tab,
just make it show an empty plot.
This mode is fun because the "CP Curve" is a straight line,
just like in the model:
work = CP * time + AWC
You can also see that the AWC is the y-intercept.
Anchoring this regexp (i.e., making it start with a "^") reduces the time
it takes to load the first CP plot from 10 seconds to 6.5 seconds on
Sean's three years of rides. Unbelievable, but repeatable.
Rob Carlsen suggested that the htmlSummary should use the same colors as in
the ride list. I agree, but they're a little to light, so bump the saturation
a bit. While we're at it, go ahead and do the zones list, too.