Update of all metrics to work with a RideItem
not directly with a RideFile.
When iterating over the activity samples we now
use a Specification and RideFileIterator to bound
the set of samples used. This means that we can
compute metrics for intervals without having to
create a temporary ridefile.
RideItem now has first class members for zoneRange,
hrZoneRange and paceZoneRange to avoid calculating
for every metric which are stored in RideDB.json.
Compare pane continues to construct a ride file
when working with intervals since it is used lots
of charts, this is unlikely to ever change.
A SEGV in compare intervals has been fixed where
interval items were repointed to temporary compare
pane objects that are deleted - see RideItem::setFrom.
THIS COMMIT CONTAINS 3 REGRESSIONS:
1. TcxRideFile no longer computes metrics
2. FitlogRideFile no longer computes metrics
3. WorkoutWizard no longer computes metrics
-- The workout wizard will be replaced with a new
Workout editor, whilst the RideFile metrics
may be deprecated (but considering options)
.. useful for simplifying iteration over the ride
samples in the metric compute() method and possibly
elsewhere in the code
.. will iterate for rides and intervals.
When the Diary checkbox is set for a metric
"Name: value" is added to Calendar Text.
The "Weight" field is special cased to "Athlete Weight" metric.
Calendar Text is no longer stored in json files, just cached
from Metadata Configuration, Tags and Metrics values.
Fixes#1563
... change storage format to .INI files (which is QTs cross-system format)
... differentiate between System, Global and Athlete specific settings
... store the Global Settings in the AthleteDirectory (root)
... store the Athlete specific Settings in the Athletes Names subdir /config
... migrate existing Settings from current location into new formats "on-the-fly"
.. when retreiving an activity using the API
you can now specify the format you want the
data to be returned in.
it can be one of;
tcx - garmin training centre xml
pwx - training peaks xml
json - goldencheetah json
csv - all available data (not powertap csv)
.. along the way the file writers for the respective
formats now accept a NULL context to work standalone.
this may be useful as a file conversion tool.
.. passed to eval and symbols now recongised.
.. sample data is referenced using symbol names
in all caps to make it clear you are referencing
ride dample data.
.. the next commits will add defining formulas and plotting
the derived data series in allplot.
.. we have been granted permission to use the TCore algorithm
and so the attributions have been added to the code and about
box.
.. Mark Buller should be added to the contributors too.
.. select which kind of intervals we want
.. makes it faster and also reduces the size of
the rideDB.json file quite dramatically which
may be useful for some users.
.. New derived data series representing an estimate of core temperature
on the basis of HR changes.
* shown on AllPlot and RideSummary
* 2 new metrics; max and avg core temperature
.. This has been based upon "Estimation of human core temperature from
sequential heart rate observations" Mark J Buller, William J Tharion,
Samuel N Cheuvront, Scott J Montain, Robert W Kenefick, John
Castellani, William A Latzka, Warren S Roberts, Mark Richter,
Odest Chadwicke Jenkins and Reed W Hoyt. (2013). Physiological
Measurement. IOP Publishing 34 (2013) 781–798.
.. 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)
For multi-sport files, the bike section might record vertical oscillation or
ground contact time from the HRM-RUN sensor when moving in and out of
transition.
.. so we can keep a reference to the user interval
in a ridefile from the rideitem and not worry about
trying to match or handle index offsets into the array
.. this is required to fixup the relationship between
an IntervalItem and a RideFileInterval in RideItem
and RideFile respectively.
.. they're pretty rare, but this code will find
any TTE efforts between 1hr and 2 minutes.
.. it will be extended to find sustained efforts
but this is just to get the code started
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
Computes the metrics for an interval and creates a temporary
ridefile locally so you don't have to.
.. previous design should have pushed this into the
class instead of performing it in RideItem
.. now there should be no reason to create a ridefile
during interval discovery.
.. 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°
.. removes across the code base
.. need to fixup RideFileCache and Lucene refresh
within the RideItem/RideCache framework, they will
NOT be refreshed at present
.. need to look at how charts get refreshed on data
changes now RideItem provides a more granular
mechanism (look for XXXREFRESH in code)
.. New Intervals code will definitely NOT compile
and needs to be redesigned/reimplemented to fit
in with the ride cache