Commit Graph

76 Commits

Author SHA1 Message Date
Mark Liversedge
2717ec2380 Added W'bal Work In Zone Metrics 2015-11-03 18:55:21 +00:00
Alejandro Martinez
e80a60558a Enable WCPZoneTime when Power Data is present
For consistency sake
2015-11-03 12:37:41 -03:00
Mark Liversedge
5313c31413 Add W'bal Zones - Time above CP
.. to see how much time is spent above CP
   whilst in different fatigued states.
2015-11-03 14:42:36 +00:00
Alejandro Martinez
12ebdfd654 Basic Stryd (Power Meter for Running) support
Enables power metrics for non cycling activities when power data is present.
2015-11-03 11:29:53 -03:00
Alejandro Martinez
4f2e5ed5f4 Made WPrime metrics not relevant for runs and swims 2015-07-13 15:14:50 -03:00
Alejandro Martinez
70454be78f Minor Fixes WPrime::summarize units and Spanish Translation 2015-07-10 11:15:03 -03:00
Mark Liversedge
12e7554af9 Fixup WPrime.cpp translation snafu
.. use 'tr()' not missing 'QT_TRANSALATION_NOOP'
2015-07-08 23:24:16 +01:00
Mark Liversedge
847623c67b Get wbalzone user-visible messages to show up in translation files 2015-07-09 00:45:42 +03:00
Mark Liversedge
749b6f00fc Add W'bal Time In Zone (3c of 3c)
.. add W'bal Zoned to Histogram
   - for a ride
   - for a date range
   - *NOT* for a compared ride
   - for a compared date range

This makes the last of the updates for W'bal
in zone, but highlights the issues related to
W'bal being held in a different structure to
the rest of the ride data.

Need to think on how that might work better
for intervals.
2015-06-17 12:22:00 +01:00
Mark Liversedge
4f1ac967f1 Add W'bal Time In Zone (2 of 3)
.. add metrics and trends chart
2015-06-14 10:52:21 +01:00
Mark Liversedge
c04d8b9370 Fix W' Power metric
.. use all seconds not just those above CP !
2015-06-02 16:22:22 +01:00
Mark Liversedge
9a029c7f91 Add W' Power metric
.. as W' work (joules from time spent above CP) divided by duration.
   This represents the W' contribution to Average Power.
2015-06-02 15:09:32 +01:00
Mark Liversedge
15b0211798 EFFORTS found using metadata only
.. if no zones are configured.
2015-05-31 23:52:02 +01:00
Mark Liversedge
69a45d0b21 TT analysis fixups
.. SEGV on setting CP when no zones configured. Since
   RideItem::updateIntervals() dereferenced a range
   when CP is set, but none existed.

.. fixup use of Metadata field "W'" to override settings
   in Metrics tab.
2015-05-31 22:18:17 +01:00
Mark Liversedge
ceca142ca9 Mark MATCHES that are To Exhaustion
.. name and also red color.
2015-05-31 13:34:22 +01:00
Claus Assmann
a001ffef4f Fix comment spelling errors
.. lots of them !
2014-11-24 15:37:56 +00:00
Mark Liversedge
a88316c9c5 Fix Spline resampling
.. should be periodic not natural

.. should apply to sub-second samples too !
2014-11-09 09:48:59 +00:00
Mark Liversedge
3757241456 Add W'bal TAU Config
.. it is only used in realtime mode
2014-10-23 13:26:51 +01:00
Mark Liversedge
1c2527bea2 Plot W'bal on the fly in train mode
.. uses a fixed TAU of 300s so need to add some
   way of configuring it for on the fly calculations
2014-10-23 12:12:23 +01:00
Mark Liversedge
ca49c8948f Fix W'bal in Train Performance Plot
.. code still needs to be refactored !
2014-10-23 09:15:10 +01:00
Mark Liversedge
ba0666a0ee Fast W'bal integration
Dave Waterworth has fixed my implementation of W'bal to
remove my "optimisations" and fix the math.

The W'bal is now computed in a single pass and is just
as fast as the differential form from Andy Froncioni but
has the benefit that is still uses Tau.

Many thanks to Dave, and I'll write this up shortly.
2014-10-11 12:40:05 +01:00
Mark Liversedge
b383dcc6b1 Matches tidy
.. no need for 1 dp
.. no need for unit description
2014-09-25 22:37:10 +01:00
Mark Liversedge
9dc98ac314 W'bal calc optimise
.. use exp() not pow()
2014-08-28 22:59:23 +01:00
Mark Liversedge
d625a58eb5 Matches metric
.. how many >2kj matches did you burn ?

.. also taken out the power/slope derived data series
   since Jon is migrating it to a fix tool
2014-08-23 20:08:46 +01: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
06553fe998 W'bal integral calculation speed up
.. by stopping decay calculation when its incrementing by
   less than 10 joules, thats almost nothing.
2014-07-12 10:55:19 +01:00
Mark Liversedge
a2e3bbd4ac Limit W' bal integral exp Decay to TAU * 3
.. when computing W'bal decay -- since we know the half-life
   for the decay we might as well use it rather than a pretty
   big constant of 1 hour !

.. it saves about 35% of time to compute metrics
2014-07-11 10:40:05 +01:00
Mark Liversedge
a8b5e2bc0b W'bal invalidate and recompute
.. when formula selection changes
2014-07-10 17:31:17 +01:00
Mark Liversedge
c841b64dfb Enable selection of W'bal formula
.. Differential - uses the Clarke/Froncioni fast differential eqn

.. Integral - uses the original Skiba et al 'slow' equation
2014-07-10 17:14:01 +01:00
Mark Liversedge
1d2dc7e1c9 Fix W'bal on Erg Plot
.. it got broken when we moved to the 2nd variation W'bal formula
2014-07-02 23:27:38 +01:00
Mark Liversedge
705b85a483 Fix W' glitch of distance jumps to 0
.. pointed out by Claus Assmann on the list, when he should have
   been celebrating Germany 4 - Portugal 0 ;)
2014-06-16 19:20:59 +01:00
Mark Liversedge
ab3e73fb79 W' Work Calculation
.. should only include joules from W' ie. power above
   CP is accumulated.
2014-05-25 23:19:53 +01:00
Mark Liversedge
529ccdb273 Fix W bal plotting by distance
.. since we only smoothed time

Fixes #803
2014-05-06 11:22:48 +01:00
Mark Liversedge
628fbb1d63 Andy Froncioni W'bal optiimsation (contd)
.. forgot to remove the threaded integrator which is no longer
   needed and then found it is still being used by the minForCP()
   method, so tidied that up.
2014-04-29 21:02:20 +01:00
Mark Liversedge
1cc72fabb4 Faster W'bal algorithm
Using Andy Froncioni's modification to the original
formula that removes the need for Tau and also lets
the exponentials drop out.

Massive speed improvement!
2014-04-24 16:23:42 +01:00
Mark Liversedge
9fb5b39f28 Truncate W'bal going hugely negative
.. this is caused by bad data and/or the spline getting
   spoilt. We need a better way of decritizing the data.
2014-04-09 10:58:53 +01:00
Mark Liversedge
f92d8a5b79 Stress Metric Prototypes
Added a few new training stress metrics whilst discussing
and working on a multicomponent view of training stress.

This is all a wip falling out of discussions around stress
metrics beyond the old TSS/BikeScore models.

For now this just includes;
1. Aerobic Training Impact Scoring System on PM/PMC
2. Work (Kj) above/below CP on PM/PMC
3. Aerobic TISS on the Ride Plot

There is lots more to come; specifically around Anaerobic TISS,
looking again at polarised training and personalised training stress
based upon the individual's CP model.
2014-03-17 20:51:57 +00:00
Mark Liversedge
bd29aa4e69 Fix W' work metric
.. the calculation assumed 1s recording (or was just wrong)
   joules are now calculated properly, this is especially
   important for SRM recordings of 0.5s samples
2014-02-15 00:09:45 +00:00
Mark Liversedge
c0dca04bd8 Limit the CP autosolve for W'bal
.. if its waaaay off then don't try to autosolve for
   CP .. instead just warn that W' is probably set
   incorrectly.
2014-02-14 20:19:56 +00:00
Mark Liversedge
2fb9f10245 W'bal decay set to 1hr, infinite not practical 2014-01-28 20:58:44 +00:00
Mark Liversedge
7c9a83058b W'bal decay to infinity
.. No more cutoff of the decay. Since we use threads its
   not such a big deal as before.

.. We now get a full, smooth decay till the end of the ride
   which was much more noticeable when predicting W'bal for
   a workout, than it was for a ride.
2014-01-28 20:18:20 +00:00
Mark Liversedge
2877ddd6c5 Plot Predicted W'bal in Train mode
.. only plots predicted W'bal for the workout but at least that
   means you can see if the workout is even possible.
2014-01-28 18:32:26 +00:00
Mark Liversedge
4554ce58ac Update WPrime comment
.. to explain how we sped up the W'bal integral calculation
2014-01-26 20:15:20 +00:00
Mark Liversedge
12711685af Fix WPrime CP lookup SEGV
.. when zones or cp not set for the date in question

Fixes #774.
2014-01-26 16:22:00 +00:00
Mark Liversedge
a061a1741f Fix DIV0 SEGV
.. in WPrime, and also don't bother trying to autosolve
   CP when W'bal is negative if W' is not setup
2014-01-26 12:10:13 +00:00
Mark Liversedge
5d5f84acad W'bal use threads
.. to boost performance. Now will compute the integral
   in parallel and saves about 35% in elapsed time on a
   dual core processor.
2014-01-25 22:56:41 +00:00
Mark Liversedge
c40c69a688 Less bounds checking on W'bal calculation
.. to save on computing cost the W'bal decay was only
   calculated to 20mins and also bounds checked to a
   decay of 0.1w, but of course, the decay is more like
   25 minutes and 0.1w * 1500 samples is a lot... so
   I've removed them.

.. the key optimisation is the way the decay is integrated
   and that is skipped for samples where W' exp is zero ..
   that optimisation reduces the amount of computing cost
   to 25% of doing it for all samples.
2014-01-24 18:36:43 +00:00
Mark Liversedge
8fd8cc1c48 W' Exp rename W' Expended
It was too oblique a name, could have mean't a few things...
2014-01-24 18:12:00 +00:00
Mark Liversedge
28db7b7a6c New Metric W' Exp
For maximum W' capacity expended i.e. Min W'bal
expressed as a percentage of W'.

So if W' is 20 kJ and W'bal is 2kJ then 18 kJ
have been expended, which when expressed as a
percentage of W' (18/20 %) would be;

Max W' Exp of 90%

I also cleaned up a few extra instances of WPrime
being created when calculatinf metrics which was
not a big deal for the Metric refresh but would make
interval metrics painful.
2014-01-24 17:27:45 +00:00
Mark Liversedge
7f32cbd35c WPrime don't crash on bad data
.. if duration is overly large we don't want to get some
   massive array, it will exhaust heap and cause a crash ..
   and it is likely to just be bad data.
2014-01-24 15:37:53 +00:00