An explainer from Robert Chung for a regression method to estimate CdA and Crr from field data.
The key point being the generation of additional laps from a multi-lap run -- e.g. 3 x 18s laps of a velodrome
would normally be considered as 3 laps to fit against. Robert's approach is to create 36 laps from this data (!).
The first lap starts at 0s and lasts for 18s, the second lap at 1s ... up to the 36th lap starting at 37s.
We would then be able to get 36 estimates of Crr/CdA and calculate a mean and confidence interval (!).
The document committed explains how that regression would work mathematically, and how we
would adapt for working in the field (we need really good altitude data).
.. reads .rr file when processing csv and adds the XDATA
series "HRV".
NOTE: the HRV processing data added by Leif Warland will
process the data and calculate SDANN/SDNN and friends
since we use the same convention as for Polar HRV.
.. record hrv R-R data to .rr file in the "records" folder when
R-R data is available in train view.
.. next commit needs to read it in and save to XDATA
.. collect R-R data from ANT+ devices and deliver to
the train sidebar.
.. commit 2 needs to save to a file when recording a
workout in train view
.. commit 3 needs to import the R-R data into XDATA when
importing a train view CSV file
.. mousepad touch events require focus, so we disable
touch events to stop the overview window from
stealing focus from the ride list when scrolling
through rides.
.. 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.
.. when model changes set the fit type to the best practice
we would recommend with that model (and in the case of
multimodels disable unsupported fits)
* CP2/CP3 - LMA and Performance Tests
* Extednded CP - Envelope and all MMP
.. change the default intervals within the models - these
are used when estimating automatically via envelope and
were too long.
.. truncated the data used by the models to avoid using
MMP data beyond 20 minutes for 2/3p model.
.. results in much more robust estimates in CP History.
.. allows constrained fits
.. this is a GPL lib that is included into the
source tree to avoid adding another painful
deendency.
.. for details of the lib please see:
http://users.ics.forth.gr/~lourakis/levmar/
.. returns the number of performance test intervals for the ride.
.. can be used to filter for only rides with tests, or even multiple
tests in the same ride (e.g. 3,7,12 tests).
.. may add additional paramaters later to e.g. filter by duration or
average power etc.
.. 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).
.. right click options to
* mark a user interval as a performance test
* create a performance test interval from a disovered interval
.. this way when interval discovery finds a hard effort that you
want to clone as a performance test, you can do it with one
click.
.. 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.