Commit Graph

3065 Commits

Author SHA1 Message Date
gcoco
274d3f9580 Add Garmin Forerunner 910XT 2013-11-18 14:27:47 -05:00
Mark Liversedge
9fe5e0c04a Slight cosmetic on new Athlete bests
.. and don't show zero values.
2013-11-16 22:44:43 +00:00
Mark Liversedge
5d77d14b43 Athlete Bests on Summary
Configurable metrics to show top 10 bests for date
range selected.
2013-11-16 21:01:01 +00:00
Mark Liversedge
173f6a10f8 Fix show W' on AllPlot bug
.. redraw didn't happen until you changed smoothing
   or selected a ride file.
2013-11-16 13:39:02 +00:00
Mark Liversedge
a1efef850b Command line parsing
Now allows:

$ GoldenCheetah [[directory] athlete]
$ GoldenCheetah [--version|--help]
$ GoldenCheetah

Passing the athlete on its own is as before, but you can
now also pass the folder name in as well.

I've also added the option to get a help message if you
pass --version or --help.

Lastly, as before, with no command line paramaters you
open the last athlete worked on.

Since we now output the version and build info I have uplifted
the build and version numbers in GcUpgrade.h to reflect the fact
we are now developing v3.1.
2013-11-16 11:14:44 +00:00
Mark Liversedge
7f66a870bd Restart properly when home changes
After fixing up the trainDB problem we can now restart
the mainwindows safely when the athlete directory changes.
2013-11-16 09:38:17 +00:00
Mark Liversedge
e2f4ab73e3 Training DB clean up gracefully
When closing down we left the training database open
and this caused problems when looking to implement
a restart function.

The problems stemmed from the way the QSqlDatabase
code was implemented in TrainDB which was modelled on
code in DBAccess that was cleaned up subsequently.

TrainDB code now mirrors the approach taken in DBAccess
and relinquishes resources correctly. The TrainDB is now
closed as well as being opened in main.cpp at startup.

Also, removed reference to obsolete dbconn member in the
DBAccess class definition since it is no longer used.
2013-11-16 08:33:11 +00:00
Mark Liversedge
3d3657e79b User definable athlete library location
Allow the user to select a directory to use for the
athlete libary. Leaving it blank will continue to use
the default location (dependent on platform).

If it is changed the user will be asked to confirm
and then GC shuts down.

Restart wouldn't work due to issues with the DBAccess
QSqlDatabase connection (which is really annoying). I
will look into this as a restart option would be much
cleaner.

Its only taken 4 years to implement this feature! (ouch).

Fixes #282.
2013-11-15 23:19:04 +00:00
Mark Liversedge
cee2c1b138 Honour "CP" override in W'
W' calculator didn't use the "CP" metadata to override the
CP for the ride.
2013-11-15 18:14:17 +00:00
Mark Liversedge
135f3e366c Fix W' crash smoothing sub-second recording. 2013-11-14 23:02:30 +00:00
Mark Liversedge
58d0b0b9e9 Don't truncate 3 parameter CP curve 2013-11-14 17:17:06 +00:00
Mark Liversedge
d0f0904bde CP Curve tmin
.. accidentally left at 0s now corrected back
   to truncate at tau for the 2 parameter model
   and set to 25s for the 3 parameter mode where
   it seems to breakdown.
2013-11-14 16:21:50 +00:00
Mark Liversedge
9b3c9ab5d2 Estimate CP and W' in CP Estimator
Since we want to track W' and CP now it makes sense
to add W' estimation to the tool.
2013-11-14 14:11:59 +00:00
Mark Liversedge
69f502d044 The CP Model has "parameters" not "points"
Might as well use the right terminology if your gonna
let the user choose and adjust the model!
2013-11-14 12:24:37 +00:00
Mark Liversedge
48d072db4a User Definable CP Model
Let the user define whether to use a 2 point or
3 point model (Morton et al).

In addition, let the user define the interval durations
to use; by default we set to 3 and 30 mins.

For estimating CP against good, recent data both of these
models are more than adequate for the purpose.

We'll just keep kicking the can down the road whilst we
can rely on published, verified science.
2013-11-14 11:43:55 +00:00
Mark Liversedge
ff035d685c Reinstate 3 point CP model
DJ Connel implemented a 3 point model, after Morton,
which was erroneously removed in a prior commit.

Our thanks to Andy Coggan for pointing this out in a
recent webinar. Nice to know he is following us closely.
2013-11-14 09:22:06 +00:00
Mark Liversedge
a0b8c5be11 Clean CP curve
.. when in range mode (i.e. plotting a CP curve for a date
   range or season rather than for a ride).
2013-11-13 23:00:26 +00:00
Mark Liversedge
86f04b165b UI Nits: Less clunky CP curve
When no shading selected it really does no shading and
the CP model curve is now in a smaller line width.
2013-11-13 21:06:14 +00:00
Mark Liversedge
2430c73d93 Highlight intervals on CP Curve
Will show a CP curve for the selected data series
for each interval that is selected, just like the
rest of the charts.

Fixes #718.
2013-11-13 20:38:06 +00:00
Mark Liversedge
a79b490e42 UX: Add to intervals flow
.. in the find intervals dialog it makes more sense to
   close the dialog once add to activity has been pressed.
2013-11-13 10:29:28 +00:00
Mark Liversedge
a00d77bd97 LTM Speedup
.. don't refresh when not visible!

   This is a side effect of the code updates added
   to handle filtering in chart settings or the global
   search/datafilter box.
2013-11-13 08:25:23 +00:00
Mark Liversedge
44b04dae12 Clear results when switch type
.. to W' bal or Ascent type interval searching
2013-11-12 18:58:40 +00:00
Mark Liversedge
dfb5157ec8 Find Ascents
.. another method for find intervals to find the ascents
   in a ride. Uses the hysteresis as defined in options
   which means a climb ends if there is a descent of that
   or more (by default only 3m).
2013-11-12 18:09:24 +00:00
Mark Liversedge
24e12eb024 Remove References in Dialog
.. you can now choose to remove reference lines in the
   allplot when you double click on the axis.

.. we might want to put the table and buttons for deleting
   references into the chart settings too (?)
2013-11-12 13:16:44 +00:00
Mark Liversedge
613ddb916b UI Nits: Less is more
.. remove grid line from CP plot.
2013-11-12 09:19:05 +00:00
Mark Liversedge
07784615ae UI Nits: Matches markers in CWBAL color 2013-11-11 23:18:51 +00:00
Mark Liversedge
217d6ab7ad UI Nits: Matches markers lower
.. so they don't clash with other interval markers
   most especially user supplied interval marks
2013-11-11 23:11:46 +00:00
Mark Liversedge
735099ea68 UI Nits: Back to black in QA
.. the washed out grey was unpopular and is too
   hard to read.
2013-11-11 22:53:49 +00:00
Mark Liversedge
0fa3da925b UI Nits: Less Ride Plot xBottom
.. no title needed for time, its obvious, but
   still need to show units if its distance.
2013-11-11 22:26:29 +00:00
Mark Liversedge
514b726850 UI Nits: Thinner reference line
2px too thick for a guide, made 1px which is in
line with the rest of the code.
2013-11-11 22:11:38 +00:00
Mark Liversedge
00a52abff4 UI Nits: Less is more
Further removal of chart decorations ala the recent
changes to the ride plot, now applied to the other
charts.
2013-11-11 22:04:06 +00:00
Mark Liversedge
569ddbb46f UI Nits: Declutter ride plot
Too much going on and gets noisy, especially in stack mode.

Might extend this to the other plots, but need to live with
it for a while to see if the ticks were actually useful (!)
2013-11-11 21:25:05 +00:00
Mark Liversedge
f2d8a0792f Zoom Out Menu Option
So you can unzoom in ride plot when you've zoomed in
to an interval -- avoiding having to show fullplot to
do the same thing manually.

There are probably other places to add functionality
for zooming out, will deal with those as they arise.
2013-11-11 19:56:31 +00:00
Mark Liversedge
17b1edab65 Match duration fencepost error. 2013-11-11 18:04:50 +00:00
Mark Liversedge
a3ae770965 Find Matches as Intervals
Now let the user add 'match' intervals in
the find intervals dialog by setting a minimum
cost for the match.
2013-11-11 17:53:58 +00:00
Mark Liversedge
265d85f75b UI Nits: Axis background color
Changed to match the ride plot background. This makes
it easer to read axis that use light colours (e.g.
using yellow for power).
2013-11-10 22:06:34 +00:00
Mark Liversedge
29dd3139a7 Find Matches
Added auto finding matches in Wprime, but there are
two areas to develop further;

1. Use the W'bal data to find matches instead of the
   power above CP (which is really being used as a proxy
   for the better approach).

2. Update the 'find intervals' dialog to allow you to
   find matches and add them as normal intervals.

Pushing to repo as a version checkpoint, this function
will definitely need refining before 3.1 is released.
2013-11-07 20:43:51 +00:00
Mark Liversedge
0bfe3574d0 UI Nits: Center Preferences/Options pane 2013-11-07 14:30:57 +00:00
Mark Liversedge
9488abe855 User definable color for W' bal curve 2013-11-07 14:23:42 +00:00
Mark Liversedge
9680b3aef3 Fix crash on tmp reference line at 0w 2013-11-07 13:58:42 +00:00
Mark Liversedge
740ac2ed21 Fix smoothing bug in Allplot for xPower and aPower 2013-11-07 12:55:11 +00:00
Mark Liversedge
c0a7552faa Add Derived Series to Ride Plot
You can now plot NP, xPower and aPower on the
ride plot.

This has been done to provide transparency &
insight into the relationship between the derived
values and the recorded power values,
2013-11-07 12:04:44 +00:00
Mark Liversedge
e99651e6d7 Read reference lines in WKO+ files
Added support for reading the 'references' or 'guide lines'
from a WKO+ ride file.
2013-11-07 09:58:40 +00:00
Damien
42e8890a60 AllPlot: Add Reference Line for Power (Watts) 2013-11-06 23:49:07 +01:00
Mark Liversedge
cbb0dd04d6 Histogram aPower
Added aPower to histogram, although not zoned.
2013-11-06 18:50:29 +00:00
Mark Liversedge
b23ed51fa4 Best aPower
Peak aPower durations now computed and cached;

* updated RideFileCache to work with aPower
* CP curve now allows you to plot aPower
* LTM plot allows you to plot aPower peaks
* DataFilter allows 'best(apower, duration)' function
2013-11-06 16:41:25 +00:00
Mark Liversedge
4026ff87bd Added Effect of Altitude (%)
A metric of the %age of power that has been lost due
to riding at altitude.
2013-11-05 21:31:31 +00:00
Mark Liversedge
86c54c7e47 Add citation and references for aPower
Added comment in ridefile.cpp to reference the book
and research paper that aPower is based upon:

// Calculate derived data series, including a new metric aPower
// aPower is based upon the models and research presented in
// "Altitude training and Athletic Performance" by Randall L. Wilber
// and Peronnet et al. (1991): Peronnet, F., G. Thibault, and D.L. Cousineau 1991.
// "A theoretical analisys of the effect of altitude on running
// performance." Journal of Applied Physiology 70:399-404
2013-11-05 20:18:06 +00:00
Mark Liversedge
4dff955424 Average aPower
Added an average aPower metric.

I also and found and fixed a couple of bugs along the way;

* intervals create a ridefile and need to explicitly call
  recalculateDerivedMetrics()

* the aPower calculation was using the calculated vo2max
  percentage the wrong way around (!)
2013-11-05 20:06:09 +00:00
Mark Liversedge
bf21b55658 Add aPower
Introduce altitude adjusted power 'aPower'.

This is a new ride data series that takes into account
the effect of altitude on power output.

At present we are only adding this as a derived data series
with the intention of making it possible to plot it on
the ride chart.

We will also introduce alternate metrics for average power,
bikescore etc that are based upon the aPower value.
2013-11-05 18:54:06 +00:00