Commit Graph

80 Commits

Author SHA1 Message Date
Mark Liversedge
edd89d9eeb Add another /10 for Workbeats
.. brings it back to same scale as BikeScore
2015-04-24 10:37:21 +01:00
Mark Liversedge
0d2bea605c Workbeat Stress
.. heartbeats x joules, when unfit you may generate low watts
   but with a high hr, as opposed to the other way around.

.. an attempt to combine central and peripheral stress, can be
   used to compare with power only stress metrics
2015-04-24 10:01:47 +01:00
Mark Liversedge
7121bb8084 Added heartbeats metric
.. count of heartbeats per interval
2015-02-23 16:10:43 +00:00
Alejandro Martinez
aa68d56ef5 Adjust decimals for distance metric and max rows in LapsEditor 2015-02-13 22:31:03 -03:00
Mark Liversedge
d6257f5b58 Revert RideMetric::imperialPrecision()
.. introduced within bae36e6b
2015-02-09 22:07:29 +00:00
Alejandro Martinez
2be7f495bf Fixed GOVSS and SwimScore estimation when there is no speed channel but distance is overriden
Distance/Duration is a better approximation for Avg Speed than 0.0
and Duration is better than Time Moving in GOVSS/SwimScore estimation
for these cases.
2015-02-03 21:32:16 -03:00
Alejandro Martinez
b7dd06aeae Fixed Pace and Swim Pace units setting
Pace and xPace metrics use GC_PACE units setting
Pace Swim and xPace Swim metrics use Swim GC_SWIMPACE units setting
2015-02-03 20:19:08 -03:00
Alejandro Martinez
679089f67c Fixed lower-is-best for Pace metrics
Also removed isTime since time formatting assumes seconds and they are in minutes,
it remains pending to change formating to mm:ss.
2015-02-03 15:06:10 -03:00
Mark Liversedge
d7f3bc8137 Time Riding renamed to Moving
.. to reflect multsport use
2015-01-30 16:51:29 +00:00
Mark Liversedge
d9eb2aec8c Rename Ride to Activity
.. across the code, except where it clearly is a ride
   e.g. importing PowerTap or SRM
2015-01-30 10:59:56 +00:00
Damien
e5bcc5edee Metrics: Add Calories based on average HR
fixes #1249
2015-01-14 22:37:20 +01:00
Joern
a2d1455eee TE/PS - Average Calculation
... change calcuation of Averages for TE/PS by using the delivered
samples with valid values (> 0) and the number of delivered data samples
> 0 as the basis
2015-01-12 19:46:40 +01:00
Alejandro Martinez
c2c4b8e673 Make Pace not relevant only for swims
Since Pace Swim conveys the same information in units more usual for swimming
For backward compatibility it is kept relevant for any other sport
2015-01-11 21:56:59 -03:00
Mark Liversedge
0b198dd481 Hide irrelevant interval metrics
.. in the interval sidebar
2015-01-11 09:43:14 +00:00
Alejandro Martinez
cbe098dcf1 Added Swim Metrics
SwimScore, xPace and Pace for Swimming
TriScore for combined PMC
2015-01-09 21:59:27 -03:00
Damien
858efd5866 RideMetrics: add isRelevantForRide for HR and cadence (avg and max) 2015-01-07 22:32:22 +01:00
Damien
724b282f90 RideMetrics: add isRelevant for Aerobic Decoupling and SmO2 metrics 2015-01-07 19:36:34 +01:00
Mark Liversedge
8e76db307a Ratios are averages not peaks
.. for Power/HR and NP/HR ratio metric aggregation
2015-01-07 17:31:38 +00:00
Damien
e12ce4c654 BasicRideMetrics: Add Power Phase length 2015-01-06 22:39:04 +01:00
Damien
3a0da792ff BasicRideMetrics: Avg for Power Phase only when we have a phase end 2015-01-06 21:45:25 +01:00
Damien
5b1c58d362 BasicRideMetrics: Correct copy-paste error 2015-01-06 21:21:48 +01:00
Damien
fb7f6d70d5 Garmin Cycling Dynamics : Switch on Power Phase 2015-01-06 18:44:27 +01:00
Damien
e64aad87aa Garmin Cycling Dynamics : Switch off Power Phase 2015-01-06 00:15:08 +01:00
Damien
9f756b86cb BasicRideMetrics: Add metrics for Garmin Cycling Dynamics - part 1 (Avg) 2015-01-05 23:00:44 +01:00
Mark Liversedge
a3c7bc41be Use C++ <cmath> not C <math.h>
.. it clashes, and also its deprecated for C++ sources
2014-12-25 20:38:18 +00:00
Mark Liversedge
bf78eeaec7 Ridecace Measures deprecated from SQLite
This is quite a big patch with lots of nasty interdependencies
all collected together but essentially it deprecates;

* Measures are no longer stored in SQL tables
* Zeo support has been dropped (they went bust)

To achieve this there are a large number of updates;

* Withings json is now cached in /cache and in the Athlete
  class. So can be traversed in memory rather than SQL

* All "measures" on LTM have been removed and the only metric
  left is "Athlete Weight" that cascades from withings to ride
  "Weight" metadata value to athlete settings to a 80kg default

* RideCache is now refreshed, but only for metadata. This is needed
  to cache the "Weight" metadata from rides when calculating weight.

* JsonRideFile parser is now re-entrant since it will run in parallel
  during RideCache refreshes (using the QtConcurrent::map()
  framework).

BUT NOTE

* This is about deprecating the Measures table more than anything
  else. Functionally we are in pretty much the same place; just that
  data is stored in a different place.

  e.g. metric/imperial handling of weight is not fixed yet, no
  metrics are in the cache yet, load/save of the cache is not done
  so startup is slow etc.
2014-12-08 16:48:58 +00:00
Mark Liversedge
2ef71f6df3 Add RideMetric::toString(bool useMetricUnits)
.. so we can now call that instead of doing the conversion
   and formatting all over the code !

NOTE: it still needs to be /called/ in the code, that change
      will need to be applied everywhere a metric is displayed
      to the user.
2014-12-03 12:36:40 +00:00
Mark Liversedge
f14a276ece Add Min, Max, Average SMO2
.. and add to summary
2014-11-26 22:01:46 +00:00
Mark Liversedge
c329cd403d Added Watts:RPE ratio
.. compare average power to the rpe rating.
2014-11-21 19:33:41 +00:00
Rainer Clasen
213e9f7083 fix "Time Riding" for rides without kph
"Time Riding" was only calculated when the ride had kph values - although
it's then also including time without kph but cadence. This caused it to
skip all time spent on the trainer (... if there's no sensor on the rear
wheel).

This patch makes it consistently calculate "Time Riding" if there's kph or
cad... might be worth to count time with pwr or similar running metrics,
too.
2014-11-02 16:26:43 +01:00
Mark Liversedge
83a5f74c3c Add HrNp Ratio
.. to echo HrPw
2014-09-09 16:11:02 +01:00
Mark Liversedge
84f373dda5 Add HrPw Metric
.. as a ratio of Average Power to Average Heartrate
   hrpw = ap / ahr
2014-09-07 22:15:12 +01:00
Joern
b2bab736fe New Metrics for MTB - Bike Carrying Time/Elevation Gain
... 2 new metrics (estimates) mainly relevant for MTB or Race bike steep
passes
... a) Time Carrying = moving < 8kph, gaining height, no power, no
cadence
... b) Elevation Gain carring = same criteria, but adding up the
elevation gain

Since there is a certain level of error, the metrics is named as "Est".
2014-09-05 13:31:21 +02:00
Joern
8b20da0f7c Add new metric - Elevation Loss
... for rides having different start/end points (e.g. stage races) this
metric adds information
2014-08-20 19:42:47 +02:00
Mark Liversedge
708b9d5b4d Below CP Work + W' Work = Total Work
.. previously we have computed below cp work as only that
   work when power was at or below CP

.. since we want to track energy from CP and W' it makes more
   sense to make below CP work include all work not from W' stores.
2014-07-13 09:38:15 +01:00
Mark Liversedge
727d214dbb Forgot to set aggregateZero() to true for Temperature ! 2014-06-20 13:14:10 +01:00
Mark Liversedge
a084ec96e6 Fix Average Temperature Issues
.. Don't include -255 in average

.. Don't show -255 in ride navigator

.. Don't show a value on summary if not preset
2014-06-20 12:59:03 +01:00
Mark Liversedge
9f59a8f816 Pedalling metrics, ignore zeroes in Average
.. when averaging lr balance, pedal smoothness etc we now
   ignore values when cadence is zero.

.. the zero values are not meaningful and skew the average to
   render them almost useless !
2014-06-19 10:08:12 +01:00
Mark Liversedge
b7eafd7b40 Add Athlete Weight Metric
.. and add to summary window

.. uses getWeight() so therefore uses;
   1. 'Weight' metadata
   2. last withings weight
   3. global athlete weight
2014-05-20 09:15:47 +01:00
Mark Liversedge
3233bbfb30 Add Averages for Pedal Data
.. pedal smoothness and torque effectiveness
2014-04-14 10:39:36 +01:00
Mark Liversedge
4026ff87bd Added Effect of Altitude (%)
A metric of the %age of power that has been lost due
to riding at altitude.
2013-11-05 21:31:31 +00:00
Mark Liversedge
4dff955424 Average aPower
Added an average aPower metric.

I also and found and fixed a couple of bugs along the way;

* intervals create a ridefile and need to explicitly call
  recalculateDerivedMetrics()

* the aPower calculation was using the calculated vo2max
  percentage the wrong way around (!)
2013-11-05 20:06:09 +00:00
Mark Liversedge
8df5cf8778 A little less MainWindow.h
.. slowy removing it everywhere.
2013-07-18 09:37:32 +01:00
Mark Liversedge
0fcbbe1b77 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
a16c4d1615 BasiRideMetric handle no speed/distance gracefully 2013-05-13 20:05:32 +01:00
Mark Liversedge
75974fa910 Less heap more stack
.. for LTMOutliers, just trying to eliminate as much
naked new as possible.
2013-02-11 17:18:10 +00:00
Eric Murray
8e1d2240c1 User Configurable Hysteresis
Still defaults to the original value of 3 meters. Because
the metrics need to be recalculated when it changes we also
add the hysteresis factor to the zone fingerprint CRC.
2012-12-07 21:56:11 +00:00
Alejandro Martinez
299867550a 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
Alejandro Martinez
872842b920 Change Pace metric to follow metric/imperial units as configured
Fixes #718
2012-07-31 14:15:33 -04:00
Mark Liversedge
a04375f20d Manual entries compute metrics
A few months ago I commented out the calculation of metrics
for manual ride files. This was a hack to avoid fixing the code
to handle metric calculations from overrides where there are no
data points.

This annoyingly meant that the 'rides' metric was zero for manual
ride files, and any derived metrics similarly were zero.

This patch fixes that.
2012-07-08 16:22:40 +01:00