Commit Graph

6 Commits

Author SHA1 Message Date
Mark Liversedge
16e1ec0a4d User Metric Test Button Works
.. quick push to allow cross platform functional
   and performance testing of User Metric computation
2015-12-16 12:42:53 +00:00
Mark Liversedge
d6c8949355 Major RideMetric compute() refactor
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)
2015-12-16 11:36:02 +00:00
Mark Liversedge
09b2f4355c Tidy up context used
.. datafilter uses a context that was used to create it
   which is fine until it is used in user metrics which
   are global and shared across multiple contexts.

.. so now when evaluating a ride item we use the context
   for the rideitem being evaluated not the context of
   the data filter performing the evaluation

.. next couple of commits will need to look at the way
   we use RideItem and RideFile when computing both
   Ride and Interval metrics.
2015-12-11 19:17:53 +00:00
Mark Liversedge
c9b33c834e temp fix hang on test
.. in case anyone is playing along between
   step 2 and 3 of the user metric code update
2015-12-11 15:18:30 +00:00
Mark Liversedge
c93795ee23 nits from previous commit 2015-12-11 15:05:06 +00:00
Mark Liversedge
d7a179907d User Metric Part 2 of 4
.. User metrics can be created, deleted and edited
   in the preferences pane.

.. A new dialog has been created to create user metrics
   and will need to be updated after step 3 of this multi
   part update completes the UserMetric code and integrates
   it into the RideMetric factory.
2015-12-11 14:03:58 +00:00