Commit Graph

670 Commits

Author SHA1 Message Date
Jamie Kimberley
74cbddff5b update developers guide for patch qwt
Removed qwt from the list of dependencies. Changed build instructions to
reflect the use of the patched version of qwt.
2009-11-28 18:50:47 -05:00
Mark Liversedge
d83ba74ae3 Fix Stress.Cache refresh on wrong tab 2009-11-28 11:51:11 -05:00
Sean Rhea
828562ec3d bug fix: xPower shouldn't count coffee breaks
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.
2009-11-28 11:42:34 -05:00
Sean Rhea
39ef9efc4d bug fix: don't compute Daniels Points if no CP set 2009-11-27 22:55:41 -05:00
Sean Rhea
3429f2d5a4 add DanielsPoints metric
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).
2009-11-27 18:23:52 -05:00
Mark Liversedge
d4f8ce5b07 Remove Notes Tab and place notes on Summary Tab
Adding splitter for the ride summary/notes layout
2009-11-27 18:19:18 -05:00
Sean Rhea
7324ebda06 fix season selector in cp plot 2009-11-27 16:46:09 -05:00
Sean Rhea
411abf55b8 stop PM chart at max(today, latest ride)
I've been using the manual ride feature to plan my weeks in advance, so it's
helpful to have the x-axis on the PM chart extend past today's date.
2009-11-27 16:46:09 -05:00
Mark Liversedge
82ac0f5e1f add realtime mode
Joint work between Mark L, Justin, and Steve Gribble.
2009-11-23 10:42:48 -05:00
Mark Liversedge
e3426c1024 win32 and linux build fixes
- change SeasonParser include from <> to "" for Windows
- include stdio.h in PowerTapUtil for Linux
2009-11-21 17:21:47 -05:00
Sean Rhea
6394483df4 link to msg about building on windows 2009-11-21 15:27:41 -05:00
Sean Rhea
e7b762333d ugly fix for zones file without a BEGIN
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.
2009-11-21 15:23:04 -05:00
Sean Rhea
51aafe7ede rest during intervals counts against averages
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.
2009-11-21 14:34:49 -05:00
Jamie Kimberley
182843896d test file with two intervals in first 10 secs
Good for testing what happens in the Ride Plot when there are interval
markers within the first smoothing period.
2009-11-21 14:33:36 -05:00
Sean Rhea
6914185680 don't plot intervals before first smoothing window 2009-11-21 14:27:13 -05:00
Sean Rhea
ab28d32b65 rename ergomo csv files 2009-11-21 14:03:43 -05:00
Sean Rhea
5c3896b6cc fix intervals for ergomo csv 2009-11-21 14:02:37 -05:00
Sean Rhea
25e8658592 fail gracefully if rec_int changes mid-ride
Includes test ride that demonstrates the problem.
2009-11-21 13:48:23 -05:00
Sean Rhea
6d33d10944 inject a little philosophy onto the front page 2009-11-15 20:03:14 -08:00
Sean Rhea
02cf0ac83d need <algorithm> for std::lower_bound in Linux
Thanks to Mark Liversedge for pointing this out.
2009-11-15 19:53:18 -08:00
Sean Rhea
93d62cc5c2 fix Ride Plot shading bug introduced in 79ced76
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.
2009-11-15 08:52:23 -08:00
Sean Rhea
db943fbcd6 make ride plot work for manual rides
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.
2009-11-09 09:20:24 -08:00
Sean Rhea
1edd8c0767 add y-axis shows work mode to CP 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.
2009-11-09 09:05:03 -08:00
Sean Rhea
3912c2474c "Tools"->"Critical Power Calculator" 2009-11-09 10:21:43 -05:00
Sean Rhea
6d20bea968 don't show CP values off the end of lines
I.e., if the user selects a time to the left of the red dashed CP line,
we shouldn't show a value in the "CP Curve" box.
2009-11-09 10:03:50 -05:00
Sean Rhea
aef876e817 use foreach 2009-11-09 09:56:48 -05:00
Sean Rhea
ae5dd3feb3 prefer most recent season in CP plot 2009-11-09 09:54:34 -05:00
Sean Rhea
82934425ab fix bug in 2f8d101, need to strip path
The filename argument actually contained the whole path.  This fix passes
the filename and directory separately, so that the anchored regex works.
2009-11-09 09:50:51 -05:00
Sean Rhea
632bb6ddd1 whitespace cleanup -- no functional changes 2009-11-07 14:42:14 -05:00
Sean Rhea
4ee57a25b0 misc cleanup 2009-11-07 14:42:09 -05:00
Sean Rhea
14f59f8e5e delete NULL is a no-op 2009-11-07 14:27:01 -05:00
Sean Rhea
dfc7e88f26 drop read_cpi_file, cleanup read_one 2009-11-07 14:23:51 -05:00
Sean Rhea
3d6d9ad86d don't fill in bestDates for today's ride 2009-11-07 14:19:46 -05:00
Sean Rhea
a9ddd40dda errors should be QMessageBoxes, not printfs 2009-11-07 14:15:36 -05:00
Sean Rhea
5ac70a9a98 simplify very confusing code 2009-11-07 13:53:33 -05:00
Sean Rhea
9029be7ccc little bits of CpintPlot cleanup
Cleanup whitespace, use scoped_ptr, prefer QVector over QList, etc.
2009-11-07 13:52:22 -05:00
Sean Rhea
a7df8c48b3 progress dialog doesn't need to be a class member
We can also allocate it on the stack.
2009-11-07 13:52:09 -05:00
Sean Rhea
79ced76347 setAllPlotWidgets doesn't need to call show*
It's only called from setData, which calls AllPlot::setData right afterwards,
and the latter will do all the things that the show* functions do.
2009-11-07 10:32:00 -05:00
Sean Rhea
2f8d1013be anchor regexp
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.
2009-11-06 23:43:35 -05:00
Sean Rhea
c71f38ecb0 clean up and sorten cpi_filename_to_date 2009-11-06 23:36:43 -05:00
Sean Rhea
c8c0cf395a ~qwt_plot_item calls detach 2009-11-06 09:13:59 -05:00
Sean Rhea
846f95d5b3 use foreach, tidy up code 2009-11-06 08:49:54 -05:00
Sean Rhea
19f905d2d1 fix leaked CPCurve 2009-11-06 08:38:38 -05:00
Sean Rhea
288d0ce7c6 allocate QPen objs on the stack
This fixes a memory leak.
2009-11-05 20:01:02 -05:00
Sean Rhea
5e3692a1b4 use QVector<double> 2009-11-05 19:59:00 -05:00
Sean Rhea
ae94021a21 fix tabs and eol spaces -- no functional change 2009-11-05 11:40:07 -05:00
Sean Rhea
c5240d1c0c compute time in zones in computeMetrics
...not in htmlSummary, so that the WeeklySummaryWindow doesn't have to
generate the full htmlSummaries for a week.
2009-11-01 22:01:53 -05:00
Sean Rhea
cb50314915 use colors from RideList in htmlSummary
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.
2009-11-01 21:03:30 -05:00
Sean Rhea
cae4d092c9 highlight every other interval 2009-11-01 20:05:09 -05:00
Sean Rhea
0789c68f30 srm intervals names match those on PowerControl 2009-11-01 20:01:20 -05:00