.. add W'bal Zoned to Histogram
- for a ride
- for a date range
- for a compared ride
- for a compared date range
.. still need to update ridesummary to show
summary of w'bal zone distribution (3c)
.. add W'bal distribution to Histogram
- for a ride
- for a date range
- for a compared ride
- for a compared date range
.. still need to revisit to do in zones (3b)
.. still need to update ridesummary to show
summary of w'bal zone distribution (3c)
In activities it depends on selected activity, bests are automatically filtered.
In range mode it can be set by sidebar or home filters for single sport
.. was not refreshed previously (!)
.. need to optimise this to only recompute w/kg stuff
rather than the entire cache for the ride when its
just because the athlete weight changed.
.. ridefilecaches return incomplete flag if data not available
when aggregating (plotting during a refresh).
.. CP plot will refresh as the background update takes place.
.. this occurs even during a comparison.
.. so available for current ride
.. and refreshed() when notifyDataChanged() is called
.. but not many classes call it!
.. we are moving to having the filecache read from the
RideCache rather than straight from disk so we have an
in-memory and persisted version.
.. RideFile - add rounding approach for gear values (different roundings
depending on value) - leading to discrete GearRatio values
.. AllPlot - exclude Gear Ratio from Smoothing (to keep the discrete
value) - and change curve type to "Steps"
.. ScatterPlot - specific handling for GearRatio since values between
0.01 and 1 are relevant for GearRatio and must not be filtered out
.. RideFileChache - add Distribution Data for Gear Ratio and fix
Distribution Cache for DataSeries with > 0 decimalsFor
.. Histogram - add GearRatio to Histograms (both Rides and Trends)
.. added the code to aggregate power data when deriving
model parameter history over time.
.. need to get a class that applies the various models to
generate the parameters we need (so we can reuse) in
part 2.
.. then need to store and turn into a metric of some kind
in part 3.
.. this is largely a checkpoint commit to enable cross platform
testing with Mac and Windows.
.. to extract just the meanmax power data from a ridefile cache
so we can aggregate and derive model parameters for new metrics
to track W', CP, FTP, max-Power.
.. by checking the ride file CRC before recomputing
either the metrics or the ridefilecache.
.. this means that users that routinely copy or backup
or use dropbox to keep things in sync won't see any
unneccessary metric computations.
.. the CP plot curve is a terrible mess. Mostly from
having multiple significant updates from a number
of notable developers; Sean, Dan, Mark and Damien
have all made significant contributions.
.. But the code contains lots of 'smells' and is very
difficult to follow and update
.. this update makes no functional changes but is put
in place before overhauling the code related to
"calculating" and plotting the different curves.
.. to indicate which power-durations are getting worked hardest
.. Calculate a 'heat' score for the power duration curve.
A score that counts how many rides in the aggregate
have a power-duration best that is within 10% of the
best value calculated.
.. next step is to add it to the CP curve (when showing
power) to provide some kind of shade/heat indicator
for the area of the curve.
.. simplified acceleration calculation to convert to m/s before calculation
.. removed distribution for deltas as they were HUGE and introduced a
terrible performance degradation where aggregation took >30s for a
ride set that previously took <5s.
.. Following on from the recent update to add acceleration
this update adds other derived data series based upon the
rate of change.
.. Added to the ride plot and the CP plot.
Not sure of the overall utility of these updates but bear in
mind that they are targetting sprinting and track users and
analysis.
As well as the positive side of this (development of power
cadence etc) we also want to think about and collect data
on fatigue rate (possibly only power and torque)
- fatigue over time
- fatigue over pedal stroke
.. now can show in zones but using the polarised zones
rather than user defined zones.
.. we may need to revisit this since it uses zone 2 rather
than estimate LT1 from CP.
NOTE: The compare mode needs updating to support this option.
When an interval is added to the compare pane we now
compute the RideFileCache so it can be re-used in the
Histogram and CP charts without computing it each time.
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
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.
Added static functions to ridefilecache
to get best and tiz values for series and duration
or zones and glued them in to the datafilter code
recently added.
It uses seek (via QDataStream::skipRawData) and is
quite fast on my Linux development PC.
We now need to update the LTM settings dialogs to
the new mockups so we can plot custom durations for
peak power / NP etc too.
NOTE: Not tried on Windows / Mac, so may not be quite
so fast there, will need to check.
To try this out, in the search filter box type:
best(power, 3600) > 250
to filter only those rides where the best hour
power is greater than 250 watts. It should
return almost instantly.
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
This reverts commit 6fdc55528f.
The performance decrease is considerable. Using mallocs across
my personal ride collection takes 5:19 to compute all the caches.
Using the QVector equivalent took 22:40.
Need to consider looking at QVector across the GC codebase.
The last of a series of recent patches to address performance
degradation from the introduction of the LTMSiebar. This last
patch introduces a CPX aggregates cache to re-use aggregated
CPX data (e.g. for plotting a specific season or date range).
The cache is set to only hold 25 caches, which should be enough
for most folks list of seasons. But won't get unwieldy if they
scroll around in the diary view.
The following will be introduced in the last patch of
this series:
1. Introduce 'events' within a season and plot them on the
LTM chart -- a form of 'annotation' but also the beginning
of planned events in the future too.
2. Implement click functionality on LTM charts but decide if
we use click to annotate or to define a new date range or
both?
Last part of the search/filter functionality;
* SearchBox now incorporates filter and search
with a new widget. We can update this widget
to include more fancy UI/Interactions without
having to change the ride list or charts etc.
* Added search/filter widget to the relevant charts
and screens; Metrics, TreeMap, CP, Histogram,
Activity Log, Ride list (refactored out of MainWindow)
* Added namedsearches.xml and adding/selecting them
from a drop down menu on the search box.
* Fixed some performance bugs related to duplicate
signals and redraw/reprocessing. Also ensured that
CLucene remains optional -- but means no search or
filter functionality unless it is available.
Very basic start, this will now let you plot
VAM on the CP curve. VAM is a measure of climbing
speed and for comparative purposes should be
normalised to the slope climbed.
In this first pass of implementation the VAM metric
is not normalised in any way. It merely represents
the climbing rate, in meters per hour, that was
sustained over each time interval from 5mins to the
ride duration.
If the ride is undulating then only ascension is
included, any time on the flat or descending is
included but meters climbed will be zero. This is
akin to the way we handle power where we include time
when freewheeling.
More sophistication is needed, especially normalising
the value to a common gradient (e.g. 10%). But this
will prove challenging when VAM is comprised of
undulating elements (i.e. gradient is cumulatively
zero, but could contain segments with steep parts).
It may be more appropriate to only measure VAM for
sustained climbing i.e. ignore ride sections when
descending or on the flat.
More thought needed.
Fixes#414.
Mark Rages has developed a super fast and innovative
approach to identifying max-mean intervals. This
approach is 20% faster than the current approach and
importantly does not require "downsampling" of data
yielding much higher resolution for longer intervals.
The code has not been 'adjusted' to adopt QT style
containers (e.g. QVector) and uses malloc/free.
The primary innovations include:
* integrating the data series to reduce the operation
for identifying an interval sum to a single subtract
operation.
* Searching for max sum via a window-search rather
than iterating over the entire series (divide / conquer)
Interestingly, now we have retained high resolution the
xPower algorithm still yields differing results to the
existing metric code. I have contacted Sean to get some
insight into why this might be the case, but suspect it
is related to the implementation of the xPower 25s EWMA.
Tip o' the hat to Mark Rages for this -- sometimes you
just have to accept that no matter how smart you think
you are, there are some folk who /really are/ smart!