Commit Graph

17 Commits

Author SHA1 Message Date
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
Alejandro Martinez
a6d7e565b3 Enable Efficiency Factor and Aerobic Decoupling metrics for Running
Fixes #1407
2015-06-17 11:28:58 -03:00
Damien
3dba2c58f5 RideMetrics: add isRelevant for Aerobic Decoupling and SmO2 metrics 2015-01-07 19:36:34 +01:00
Damien
5bc1107f3e AerobicDecoupling: Correct formula
fix #721
2013-12-26 01:13:28 +01:00
Mark Liversedge
05f1d577db Refactor MainWindow Part 2 of 5
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
2013-07-11 14:02:02 +01:00
Mark Liversedge
10ed9af555 Metric Histogram Plot
Update to the histogram plot to now plot long term metrics.
It enables you to plot distribution of say, Intensity Factor
for a season or cycle.

You can select the y-axis metric too, so rather than just
plotting duration you could plot say, TSS accumulated for
different ride intensities.

Fixes #560
2013-04-20 10:35:44 +01:00
Alejandro Martinez
2db48cc1a4 Enable metrics translations
The code setting metric names and units was moved from constructors to
an initialize method, to be called after translator initialization.
English Name is preserved as InternalName for metadata.xlm compatibility
in metric override.
Q_DECLARE_TR_FUNCTIONS(class-name) macro is used to set tr() context
when class-name is not QObject sub-class.
2012-12-04 13:59:49 -03:00
Mark Liversedge
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Damien GRAUSER
830e4efd3d HR Zones and TRIMP Metrics
This patch introduces new functionality for working with
Heartrate based data.

* HR Zones can be defined, from Resting, Maximum and Lactate HR
* TRIMP metrics are calculated; TRIMP, TRIMP100 and Zonal TRIMP
* TRIMP metrics can be used to drive the PMC
* Time In Zone metrics for HR have been added
* Histogram window will now work with Power/HR zones
* User Settings have been added to record gender, weight and others
* RideFile has a new tag "Athlete" which is set to the athlete name

Fixes #140
2010-10-31 18:08:48 +00:00
Sean Rhea
07623bf94f fix metrics for missing data
...by avoiding divide-by-zero errors.
2010-04-02 09:45:19 -04:00
Mark Liversedge
02a60735f0 Simplify RideMetric by using less pure virtual functions
Primarily to make override() a base class function that can be
used for any metric rather than expecting each metric to provide
a local version.

Also, add explicit notion of "average" vs "total" ride metrics, as
it will let us improve how the metrics DB handles averages later.
2010-03-25 09:16:22 -07:00
Mark Liversedge
7bb9cf5462 Long Term Metrics
A user configurable chart for showing ride metrics and
other calculated values over time.

* Uses SQLITE database to store metrics
* Supports any metric available from the metric factory
* Adds new MaxHr, VI, Peak Power and Time In Zone metric
* Also includes LTS/STS/SB for PM charting
* Aggregates in days, weeks, months or years
* Reads and Updates seasons.xml
* Adds cycles and adhoc date ranges in seasons.xml
* Date ranges can be selected on the plot with shift-left click
* Allows users to customise preferences for color, symbols et al
* Allows user to customise metric names and unit names
* Supports smooth curves and topN highlighting
* Has a linear regress trend line function
* Allows users to save charts to charts.xml
* A default charts.xml is built-in
* A chart manager to import/export/rename/delete charts etc
* Provides a tooltip to provide basic datapoint information
* Performance Manager adjusted to use the MetricDB
* User configurable setting for SB calculation (today/tomorrow)
2010-02-25 08:01:43 -08:00
Sean Rhea
e16443e23f aggregateWith takes a const reference 2009-12-22 15:23:02 -05:00
Sean Rhea
d096eb8854 add RideMetric::precision
...which specifies how many digits after the decimal we should show when
displaying the value of a RideMetric.
2009-12-22 15:23:01 -05:00
Sean Rhea
8aa0996e6e add RideMetric::name
The name of a RideMetric is a short string suitable for use as a label in the
ride summary.  It should be translated using QObject::tr().
2009-12-22 15:23:01 -05:00
Sean Rhea
d2b44ec508 rename RideMetric::name to RideMetric::symbol
The symbol of a ride metric is the string by which we refer to it in the
code, configuration files, and caches (like stress.cache).  It should not
be translated, and it should never be shown to the user.
2009-12-22 15:23:01 -05:00
Sean Rhea
dbc3ed9e1c add Joe Friel's "aerobic decoupling" metric to ride summary 2009-10-31 16:22:06 -04:00