In this part we have now reinstated the sidebar interval tree
but it is refactored out of athlete and into AnalysisSidebar
where it belongs.
* you can hover and select/deselect intervals in the sidebar
Left to do;
* All the interval operations like sort, drag and drop, find
delete etc do not work at present and will require some work
* Add a color button to the tree to let the user change the color
for USER defined intervals
* Add more types of intervals to the discovery; esp routes and
sustained intervals
In this part we have updated all the charts to reference
the RideItem::intervals() members instead of the TreeWidget
and RideFile::intervals().
The code to create/change/delete intervals is not included
so selecting and editing on charts/sidebar is disabled til
part 3 of the update, but hover should work properly.
Still left todo in future updates;
* Updates to the interval sidebar to list intervals
in a tree (by interval type) with a color selector
* Code to create, edit, delete etc the intervals via
the rideitem/intervalitem and see them reflected in
the ridefile
* Update to search for all the different types of
IntervalItems including routes and sustained intervals
I intentionally didn't add the IndendPlotMarkers to all markings,
but only to the interval markers at the top of the plot.
NOTE: the height of the spacing is actually what Qwt tells us
is the textheight.
I think this spacing is rather big.
We might want to reduce it somehow in the future.
Signed-off-by: Simon Egli (Silzo) <smn.egli@gmail.com>
.. and also tidy up use of isPeak() etc
.. starting to wonder if we need to a) auto find intervals on import
and then b) list them in a tree c) allow user to select a 'class'
of intervals to show (i.e. select all climbs)
Especially for Vectors new metrics
- Left and Righ Platform Center Offset - eg: -8mm and -11mm
- Left and Right Top dead Center - eg: 10° and 11°
- Left and Right Bottom dead Center - eg: 203° and 210°
- Left and Right Peak Power Phase Start - eg: 83° and 76°
- Left and Right Peak Power Phase End - eg: 115° and 125°
... correct Alt/Slope behavriour in FullPlot (default = inactive)
... handle Alt/Slope status properly when switching back/forth between
Compare Mode and normal Plot view
.. introduce concept of configChanged(what) to
pass details of what config has been changed
.. fixed zones changes to re-read after write
to correct the save twice to get changes to
zones bug.
.. next parts need to spot changes (part 2) and
then action appropriately (part 3)
.. they are in Athlete::zones() et al now
.. this refactor was missed in the 3.0 mainwindow
refactoring and is part of the prep to use RideItem
as an in memory cache instead of the old metricDB
... handle Gear Ratio as part of the existing logic - just without
smoothing
... solves SEGV problem in Compare Mode (and probably other areas of
AllPlot)
.. 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)
.. as the scales were too high when shared with things like
power and torque and made them difficult to see
.. also now color shared axis according to what are selected;
so if only one series selected it will get that color rather
than e.g. yLeft,0 always being red
.. plotting the new running dynamics data series;
ground contact time, vertical oscillation and cadence
.. plotting the moxy data;
muscle oxygen (absolute) and haemoglobin mass (relative)
.. just added to the controls (AllPlotWindow)
.. part 2 is the slog to add to the plots (ugh)
... add "Slope" curve based on Slope Data in Ride Files (with separate
new color)
... add "Alt/Slope" curve based on "Altitude" data series
... sections on "Alt/Slope" have 3 options - 1min/100 m OR 5min/500 m
OR 10min/1000 m
... color / slope assignments are defined in AllPlotSlopeCurve (to look
it up)
... if a plotted section is wide enough the slope % (distance) / VAM
(time) value is shown above
Problem:
... data points of "Smoothing" settings are set to Zero in result
... this cause e.g. Zero Altitude Values when Plot Smoothing is active
Solution:
... also most left values are "smoothed" now (using only the datapoint
left of them to create the average)
... values in the ride plot deviate from the ride data since smoothing
takes place even if the sample time is equal to the smoothing interval
(for which the expectation is that the original samples are plotted)
.. only show them on power plots
.. don't show text
.. make them /really/ faint
NOTE: This is because crank based powermeters (e.g. SRM) will send
calibration messages every time you freewheel for 3 secs or more and
modern headunits (e.g. Nav2Coach) will record and adopt them.
As you can guess, I have an N2C + SRMs and get > 20 or 30 calibrations
every ride with the latest N2C firmware, so this one is for me.
.. it was accidentally omitted and somehow got lost and
never added back.
.. we now show w'bal in compare mode and its probably one of
the most interesting comparisons !!!!
Fixes#958