Commit Graph

114 Commits

Author SHA1 Message Date
Mark Liversedge
e70d6c302e Fix crash on apply preset with BESTS data
.. settings.bestresults was not being set
2014-06-10 14:47:14 +01:00
Mark Liversedge
1d3b855f90 Add Estimates /kg to LTMPlot 2014-06-09 18:19:42 +01:00
Mark Liversedge
741528719a Add WPK estimates to PDEStimates
.. but not plotted in LTM or shown o the
   summary chart yet
2014-06-09 12:40:48 +01:00
Mark Liversedge
abc49fdef4 Fix LTM Zone display
.. when no data.
2014-05-25 16:50:56 +01:00
Mark Liversedge
b577b84f11 Fix LTM Plot Legend Colors in Compare
.. they were always black which wasn't good on a
   dark background !
2014-05-24 09:20:05 +01:00
Mark Liversedge
27d062688f Plot Model Estimates on LTM
.. as well as W', CP etc we now support plotting any
   duration model estimate.
2014-05-14 18:34:27 +01:00
Mark Liversedge
de78667b20 Only refresh model estimates when needed
.. since its really only the CP history chart that
   uses them, it can refresh them when needed.
2014-05-11 22:03:22 +01:00
Mark Liversedge
bdda28f280 Skip zero estimates
.. in LTM plot for model estimates
2014-05-11 13:24:20 +01:00
Mark Liversedge
b737fa918b CP history fixups
.. use a rolling 2 month bests window not 3 month (too long)
.. use 2P W' on default chart as it povides a better estimate.
2014-05-11 12:19:48 +01:00
Mark Liversedge
cf6750e313 Fix SEGV on bounds check LTMPlot
.. in createEstimateCurve()
2014-05-10 23:19:43 +01:00
Mark Liversedge
7c887cbd21 Metric Aggregator Model Refresh (Part 3b of 3abc)
.. added to LTM and updated the default layout on trends view
   to include a new 'CP History' chart with W', CP and p-Max
   on it.

.. part 3c needs to update to include Damien's model and also
   once thats done we need to refactor CPPlot to use the new
   PD model classes instead of the code embedded in the class.
2014-05-10 22:05:31 +01:00
Mark Liversedge
4adfc269cd Metric Aggregator Model Refresh (Part 3a of 3abc)
.. Now refreshing the model parameters is done and
   stored in the athlete class.

.. added the selection of a model estimate to the
   LTM chart

.. in part b and c we need to update the LTM chart
   to plot the estimates (createCurveData).
2014-05-10 20:13:43 +01:00
Mark Liversedge
ba2b16e423 Highlight lowest and highest on LTM plot
.. good for weight or TSB / LTS where actually we're more
   interested in the lower values than the higher ones.

Fixes #673
2014-05-06 14:58:06 +01:00
Mark Liversedge
9a09b052dc Fix LTM labels metric conversion bug
.. we converted from metric to imperial TWICE for the labels
   which mean't they were located correctly on the y-axis but
   the label was always wrong !

Fixes #827.
2014-04-30 15:48:35 +01:00
Mark Liversedge
8b431ca0db Hide legend titles for trends/outliers/bests
.. as they are not 'curves' just overlaid onto the
   real curves -- so they are not needed in the legend
2014-04-28 18:06:08 +01:00
Mark Liversedge
6c4280a63b Less transparency on LTM charts 2014-04-17 10:43:36 +01:00
Mark Liversedge
d69ebddb1d Anaerobic TISS
Added Anaerobic TISS from Dr Skiba to complement
the Aerobic TISS added recently.

Added to;
* Metrics
* Ride Plot
* PMC metrics
2014-03-22 10:47:44 +00:00
Mark Liversedge
89017fe2a5 Stress Metric Prototypes
Added a few new training stress metrics whilst discussing
and working on a multicomponent view of training stress.

This is all a wip falling out of discussions around stress
metrics beyond the old TSS/BikeScore models.

For now this just includes;
1. Aerobic Training Impact Scoring System on PM/PMC
2. Work (Kj) above/below CP on PM/PMC
3. Aerobic TISS on the Ride Plot

There is lots more to come; specifically around Anaerobic TISS,
looking again at polarised training and personalised training stress
based upon the individual's CP model.
2014-03-17 20:51:57 +00:00
Mark Liversedge
99aee959a2 Fix LTM legend colours
.. when user changes the background color for charts the
   legend can be difficult to read as it is always in black.

.. we now update the legend and it's widgets to change the text
   color when the chart is refreshed.
2014-03-12 11:54:27 +00:00
Mark Liversedge
83cb089908 LTM Compare Fixup Tooltip
.. now shows a tooltip on the stack charts so will also
   fix normal mode stacked too.
2014-02-06 16:33:02 +00:00
Mark Liversedge
d213a90324 LTM Compare Fixup Markers
.. show event and season markers on the compare plot
   helps to provide context against the week/month offsets

.. also fixed up how bars are lined up and that each plot
   in the compare stack has the same x-axis
2014-02-06 15:52:47 +00:00
Mark Liversedge
317f83d72b LTM Compare Fixup legend
.. always hide the meaningless legends for trend, outlier
   and best curves since they are the same color as the
   curves already listed in the legend.

We should apply this to the normal view too.
2014-02-06 12:52:23 +00:00
Mark Liversedge
7a83da2ee6 Compare mode for LTM
You can now compare seasons / date ranges across or between
athletes on the LTM charts.

This is only shown on the stack chart as we need one chart
per data series - in a similar vein to the AllPlot chart.

There are some tidy ups left to do over the next few days;

- Data table needs updating to support compare mode
- Event markers need to be shown and in the right color
- PMC curve data is slow, needs some kind of optimisation
- The tooltip is missing and needs to be put back
- Ensure the new stack frame looks correct when using a
  dark plot background (or anything other than white)
- Consider how to handle zooming when there is only one
  data series and hence only one chart for compare
2014-02-05 20:40:24 +00:00
Mark Liversedge
88daadd8b6 Fix shading zorder
.. so power shading doesn't hide altitude

Fixes #772
2014-02-03 20:18:09 +00:00
Mark Liversedge
971901c773 Small circle topN
.. when no symbol chosen (instead of a hideous
   great rectangle, yuck).
2014-02-03 19:37:38 +00:00
Mark Liversedge
ecaacca5b3 LTM Data Table Fixups
.. fix PMC SEGV
.. fix for summary of NO data

Will now skip all zero values when summarising
by day, but not for week, month or year.

Fixes #782
2014-02-01 21:50:04 +00:00
Mark Liversedge
c8edba547d Labels for topN need a bit more spacing
.. because there is a big symbol too
2014-02-01 11:31:09 +00:00
Mark Liversedge
1d7e7c1492 LTM labels on topN
.. coz the first thing you tend to do is hover over the
   point to see what the value is anyway!
2014-02-01 11:22:15 +00:00
Mark Liversedge
9b0d8f09df Fix Data Label placement of last point
.. the if/else block was never called for the last point on a
   curve due to a logic error.
2014-01-31 22:55:44 +00:00
Mark Liversedge
cca9b7221b Fix SEGV on data labels with 1 data point
.. references offset -1 in array
2014-01-31 19:44:55 +00:00
Mark Liversedge
94c3681ad7 LTM Labels Fixes
.. for bar chart
.. and set axis
2014-01-31 17:16:04 +00:00
Mark Liversedge
ce2deef793 LTM Data Labels
.. option to show a label on chart points
2014-01-31 16:29:43 +00:00
Mark Liversedge
ea493a4405 Fix PMC LTM SEGV
.. cut and paste error!
2014-01-19 19:01:22 +00:00
Mark Liversedge
df15888b0b AllPlot Compare Mode
.. extending the interval compare to the allplot chart.
2014-01-03 14:59:20 +00:00
Mark Liversedge
613e7ebf39 LTM chart user selectable trend lines
.. now allows the user to select the type of trend
   line for a curve, only two options at present;

   * linear (linear regress)
   * quadratic (quadratic lsm)
2013-12-19 11:48:55 +00:00
Mark Liversedge
a7ac061114 Accidentally comitted increase in trend points
..was experimenting with fewer and more points on the trend
  line and accidentally committed it alongside the changes
  to fix the LTM axis scale setting.
2013-12-18 21:15:26 +00:00
Mark Liversedge
0bd6b77003 Fix LTM axis scale setting
.. dumb bug set all scales to same value!
2013-12-18 20:41:49 +00:00
Mark Liversedge
618cce57ee Quadratic Least Squares Trend Line
Added a quadratic least squares trend line for the LTMplot
as the linear regression was generally too blunt.

This is a hack to get the code into the repo -- will know work
on refining the LTMPlot settings to enable users to specify
the kind of trend line they want.

The new trend line might also be useful for other curve fitting
functions (e.g. realtime virtual power curve, a peak power chart
by cadence/pedal speed).
2013-12-18 13:52:37 +00:00
Mark Liversedge
8aee630180 Fix LTM trend line
.. broken on All Dates selections.

It must be time to introduce a polynomial fit or somesuch
as the linear regress is a little simplistic for most cases.
2013-12-17 13:35:58 +00:00
Mark Liversedge
80cb8f464d LTM Plot honour plot background color
.. more of the same as recently updated similarly for
   CP, PfPv, Histogram, AllPlot etc
2013-12-15 23:28:18 +00:00
Damien
7230c1822d LTMPlot: fix show/hide legend 2013-12-12 23:40:24 +01:00
Mark Liversedge
e80243eea1 QWT 6.1 canvas() revert and LTM ToolTip fixups
Reverted the update to the QWT 6.1 code to make QwtPlot::canvas()
return a QwtPlotCanvas -- it now returns  QWidget.

This means our local copy of Qwt is the same as the published version
so we should be able to stop maintaining our own copy when Uwe pushes
the multiaxis stuff with 6.2.

Also fixed the LTM tooltip - the zoomer has been removed.
2013-12-11 17:58:35 +00:00
Mark Liversedge
f2e85366a4 Fix LTM plot x-axis 2013-12-11 15:48:24 +00:00
Mark Liversedge
a6007c11ed Fix LTM chart axes
.. using QwtAxisId type instead of an int cured most ills.
2013-12-11 13:27:13 +00:00
Mark Liversedge
f8763e6379 REGRESS: Remove translateMetrics() from LTMPlot
This is a regression to remove the metric translation
functionality from LTMPlot.

WE WILL REINTRODUCE BEFORE RELEASE!

It has been regressed because;

1. It crashes on QT5 with Win32

2. It has significant performance penalties;

   It really should not instantiate an LTMTool object
   (Ale did discuss this with me and I gave it the go
   ahead, so my bad).

3. It should be executed on applySettings() not on
   each refreshPlot().

4. It has a bug regarding uunits being lost and breaking
   sharing of a common axis.
2013-12-10 19:54:00 +00:00
Mark Liversedge
baba5cc9d2 QT5 -- Part 3 of 3
Fixup crashes and major issues created by porting
to QT5. These have included;

* Fix CP plot log scale
* AllPlot axes and tooltip
* DBAccess prepare/bind bug
* LTMSettings crash
* LTMWindow zoomer/picker crash
* LTMPlot axes hack

There are still issues remaining but we can start
working through them at leisure -- the product now
builds and runs.
2013-12-09 21:21:51 +00:00
Mark Liversedge
c3a189b25c QT5 -- 2 of 3
Fixup all the GC code to use the QWT 6.1 code.
It needed canvas() to be patched to return a
QwtPlotCanvas and not a QWidget.

We could probably get round that with a cast.

When we switch to QWT 6.2 with the multiaxis
support formally baked in we can fix the code
as needed.

Now compiles and links without issues.
2013-12-09 12:26:55 +00:00
Mark Liversedge
aa8605e8d5 QT5 -- 1 of 3
Porting the codebase to QT 5 (5.2) to get the
latest bug fixes, performance and improved platform
support.

This first part is to fixup the codebase to compile
on Qt 5, but some aspects have been broken (video).

The second part is to migrate from Qwt 6.0.1 to the
latest Qwt for multiaxis support.

The third part will be to fixup any platform specific
issues or issues identified at runtime.
2013-12-09 09:57:13 +00:00
Mark Liversedge
4d6b78f222 Cache StressCalculator in LTMPlot
A bit of a compromise since really we should move the
stress calculators to the Athlete class and reuse when
no filtering is applied.

This code fix just means the SC is not recalculated for
each of the individual curves (LTS, STS etc) and pretty
much halves (or better) the time taken to refresh the
LTMPlot.

For those with very few rides (<500) this isn't much of
an issue, but for some with lots (2000 or more) it can
be quite tedious.
2013-12-06 19:32:41 +00:00
Mark Liversedge
1914b6c31c 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