This was reported at the forum and it is reproducible with
the supplied home-perspectives.xml, it was likely generated
by an older version, but lets get defensive just in case.
.. applies to all charts in the perspective, so you can create
a perspective called "Running" and set the filter to "isRun"
and all charts in the perspective will only show data from
runs.
.. updated charts on Trends view to honor the perspective
filter, as below:
* Overview
* Trends
* User Chart
* Treemap
* Critical Power
* R Chart
* Python Chart
* Histogram - for metrics
* Summary - no change as deprecating shortly
.. renamed the HomeView to TrendsView in line with some of the
other recent name changes. The class names were set over 10
years ago and no longer reflect the UI concepts.
.. New signal: GcWindow::perspectiveChanged(Perspective *)
When the chart is moved from one perspective to another, likely does
not need to do anything on Analysis view, but on Trends view its
quite likely the filter has changed, so refresh is needed.
.. New signal: GcWindow::perspectiveFilterChanged(QString)
When the perspective filter is updated this signal is called but
only on trends view since it doesn't really matter on Analysis
from the charts point of view.
All sports defined as values for Sport metadata field can have
specifics Power Zones and default to Bike zones otherwise.
Similar to current power zones for Run.
Part 3 of #3280
.. showEfforts was not being initialised when the plot was created
which resulted in sustained efforts always being shown regardless
of the chart setting.
.. mostly straight replacement as qt5 containers are templated
and qSort semantics are the same as std::sort
.. prepping for Qt6.2 which is due late 2021.
Signed-off-by: Mark Liversedge <liversedge@gmail.com>
.. Ride metadata was associated to the athlete rather than a
global setting. This was a serious design flaw since user
metrics can reference metadata.
.. A global metadata.xml file is generated on startup by
consolidating all athlete level settings into a single
configuration.
.. Other dependencies were also moved; SpecialFields,
ColorEngine and UseMetricUnits.
.. We should now be able to remove athlete configuration
from the config dialog and put it into the athlete view
instead.
This will also fixe a long standing issue with
configuring athlete settings when multiple athletes are
open.
[publish binaries]
.. sorry, but the power profile colors are hardcoded (which is fine)
but they are too dark, so fixed that up.
.. also the overview (until it is configurable) doesn't show total work
or variability index. Which I've added as they are quite useful esp.
work as a proxy for load and calories.
.. use powerIndex to select points when t > 120s. This has resulted
in a much higher hit rate at finding performance tests in MMP
data (almost 99% of the time).
.. add option to apply a decay factor to CP and W' when plotting
the model curve in CP Plot.
.. since we always fit to observations <20mins the mostly submax
points at longer durations in the general population do not
impact the fit at all.
.. the decay factors for w' and cp have been fit to the results of:
Effects of Two Hours of Heavy-Intensity Exercise on the Power-
Duration Relationship
Clark IE, Vanhatalo A, Bailey SJ, Wylie LJ, Kirby BS, Wilkins BW,
Jones AM.
https://europepmc.org/abstract/med/29521722
.. using analysis from the opendata proejct we have now
got a normal distribution for CP, W' and Pmax parameters.
.. so we can now plot the percentiles on the CP plot that the
user's values sit in.
.. so you can see how the parameter estimates look when plotted
in work time.
.. this means parameter estimation and model visualisation are
separated -- you can estimate CP/W' using the extended model
and an envelope fit but visualise with the linear work model.
.. add fitting option to fit CP2 model to points using
a linear regress.
.. kinda ironic that the most common and straight forward
method for estimating CP/W' is added so late.
.. honour interval color selected by user when plotting
performance tests on the CP plot
.. performance test symbol size is enlarged if the test is
within the currently selected ride (in activity view).
.. CP plot modelling will fallback when insufficient data
is available to model reliably, with a precedence:
1. Performance tests
2. Filtered MMP
3. All MMP
.. when modelling for a single ride collect bests/performance
data for the period up to that ride.
This is so as you select older rides the model reflects the
training status at that ride, not for the current period.
.. add adhoc season for 'Last 6 weeks' since it is a common
timeframe to use when tracking impact of training
.. tell user what fit or data was used as there is a cascade back
depending on the model selected and the availability of data.
.. the summary is also now in grey to indicate it is supplementary.
.. RMSE for now, just to get a basic sense
.. what type of fit was performed (since there is a fallback)
.. how many datapoints were used in the fit and RMSE calculation.
.. add option to CP chart to fit model to marked performances.
.. works, but very crude UI - no warnings if not enough data and
no constraints on combinations of model, fit and fit data that
can be selected.
.. will tidy up over the next few days.
.. as a first pass lets show the performance tests on the CP
plot to get a sense of how any bests / models align to the
results of our tests
.. we will look to fit to the tests using LMA in another commit.
* fix unclosed file descriptors
* remove various compiler warnings
sometimes it was only ambiguous indentation, sometimes bugs were fixed:
- forgotten `break;` instructions or `fallthrough` annotations:
- src/ANT/ANTChannel.cpp
- src/Charts/CriticalPowerWindow.cpp
- src/Charts/MUPlot.cpp
- src/Core/DataFilter.cpp
- src/FileIO/RideFileCache.cpp
- src/FileIO/RideFileCommand.cpp
- src/Train/DialWindow.cpp
- forgotten braces:
- lmfit/lmmin.c
- src/FileIO/XDataDialog.cpp
- test on the wrong variables:
- src/Gui/Pages.cpp
- wrong parenthesis
- src/Charts/CPPlot.cpp
- missing macro argument
- src/Cloud/WithingsDownload.cpp
- missing `return;` statement
- src/Cloud/Xert.cpp
- unused variables
- src/Gui/DiarySidebar.cpp
- unclear indentation
- src/Core/RideItem.cpp
- src/FileIO/BinRideFile.cpp
- src/Metrics/PaceZones.cpp
- src/Metrics/RideMetadata.cpp
- src/Metrics/Zones.cpp
* remove unnecessary Leaf::Parameters enum value from data filters
lists of parameters don't exist as such outside of the parser, and have
no business using the same type `Leaf` as complete terms anyway
* remove unnecessary argument
`leaf1.print(leaf2,...)` would print `leaf2` and completely ignore
`leaf1`, so now `leaf2.print(...)` is used instead
.. adding an option to select least squares fit to the cp
chart, in addition to the existing envelope fit.
.. additionally, if filter bests option has been selected
the least squares fit will use these points rather than
all the points (since well over 95% will be submaximal).
.. It requires the lmfit library to be available - and this
has been an non-optional install for over a year - we
just haven't used it prior to this commit.
.. Each PD model needs to implement three functions to enable
the least squares fit to work:
* int nparms() - returns the number of parameters
* double f(double t, double *parms) - parametric function
* bool setParms(double *parms) - set the parameters post fit
.. This commit implements it for CP derivatives;
* Classic CP - 2 parameter model
* Morton 3 Parameter - 3 parameter model
* GC Extended CP model - the extended model
BUT: it is implemented and disabled for eCP for now until
we can set parameter constraints correctly.
.. A second commit is needed for the remaining models from
Ward Smith and Mike P. This should also show which of the
filtered points have been used for curve fitting on the
chart (maybe a different color)
.. renaming the 3 metrics they trademarked in 2013:
TSS => BikeStress
IF => BikeIntensity
NP => IsoPower
.. this will break data filters, user formula and
R and Python charts.
.. in the next commit will add user metrics to ensure
backward compatibility.