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).
.. 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.
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.
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.
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.
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.
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.
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.
It TREBLES the amount of time required to refresh the
metrics, so will need to be optmised before 3.1 is released.
But it should only need to run once.
I've also added a 'RideMetric::Low' type which we could
also apply to weight.
Updated RideFileCache and LTMWindow/Plot to
plot the user defined durations for peak power.
Actually we support all the different meanmax
measures available in the CP chart, so you can
now track peaks for user defined durations of;
* Power
* Watts per Kg
* xPower
* NP
* Heartrate
* Speed
* Cadence
* Torque
* VAM
I have not spent much time optimising for performance
but reusing the same 'seek' approach used by the recent
update for best() and tiz() functions in the datafilter.
Fixes#322.
.. to make sure the v2 LTMSettings
uses the bestSymbol.
Just pushing this (WIP) to make sure
we don't get half baked LTM settings
from people building against the previous
commit.
Update to let users specify a custom duration
to plot on LTM for peak power, vam, wpk etc.
This update is to the LTM chart settings and
the reading/writing of chart settings.
Next update will update LTMWindow/LTMPlot to
retrieve and plot the values from the CPX files.
Note: the values will not plot yet, the next
commit in this series is required.
The definition of curves is rationalised to match the
new design mockups in readiness for introducing user
defined peak durations for power et al.
For now this patch cleans the UX and makes it much
easier to add/edit/remove curves.
Fixes#548
There still some assert left in the code, but removed
a fair number of the examples where, its just as easy
to handle the condition gracefully, without crashing.
By 3.1 we will have eradicated assert from the code.
.. Minor oopsie with references to context->mainWindow->athlete
instead of simply context->athlete.
The MainWindow refactor will be complete when references to
the mainWindow class is for gui reasons only.
Decoupled classes from MainWindow to reference Context
and Athlete (and introduced a couple of new headers).
We no longer pass around a MainWindow pointer to children
but pass a context instead.
There are still a few pieces left in MainWindow that need
to move to a better place;
* Setting/clearing filter selection
* Working with Intervals
* Adding/Deleting Rides
* Save on Exit
As mentioned previously there are lots of other parts to
this refactor left to do;
* break MainWindow Gui elements into Toolbar and Views
* migrate from RideItem and Ridelist to ActivityCollection
and Activity classes that are not tied into gui elements.
* introduce Application Context and AthleteCollection
Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.
Further updates will need to;
- break MainWindow Gui elements into Toolbar and Views
- migrate from RideItem and Ridelist to ActivityCollection
and Activity classes that are not tied into gui elements.
- introduce Application Context and AthleteCollection
Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
When the user free text searches or applies a data filter in
the top right toolbar search box it gets applied to any charts
that plot data from many rides, including;
- CP curve
- Calendar
- Histogram
- LTM
- TreeMap
- Summary
I need to update on a Mac to no longer use a Mac text search box
but now use a search filter box on the top right.
.. go back to more GC-like color defaults, which became a little
too vibrant in a recent update to introduce linear gradients to
the CP, Histogram and LTM plots.