Commit Graph

93 Commits

Author SHA1 Message Date
grauser
1956ac93d0 RideFileCache : XPower in MeanMaxComputer
Exponential moving average from first point for Xpower in MeanMaxComputer
2015-08-01 00:05:24 +02:00
grauser
642c83e3ba RideFileCache : Correct weighting factor for Xpower in MeanMaxComputer
fix #1480
2015-07-31 23:35:51 +02:00
Mark Liversedge
82ddf4acaa Reduce MeanMax search space
.. to speed up extracting the mean maximals.

.. we still work at 1s intervals for very short durations
   but gradually increase to longer as the duration gets
   over an hour.

.. for almost all usage this will not make a difference to the
   values extracted since the actual values are largely rounded
   to integer values (and therefore the granularity was already
   being disposed after the search).

.. the exact durations are;

        Duration    Increment
        <120        1
        <600        2
        <1200       5
        <3600       20
        <7200       120
        >= 7200     300
2015-07-05 21:37:43 +01:00
Mark Liversedge
eff23d9bfb Fix SEGV in W'bal ridefilecache
.. when computing the distribution due to problems
   casting double to int for nan/inf values.
2015-06-15 22:00:01 +01:00
Mark Liversedge
d8063d4980 Add W'bal Time In Zone (3a of 3c)
.. 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)
2015-06-15 10:43:28 +01:00
Mark Liversedge
d6690cd5ae Add W'bal Time In Zone (1 of 3)
.. adding it to the CPX file
2015-06-14 09:32:01 +01:00
Alejandro Martinez
8496e66dd4 Set Pace Zone Shading and Pace units according to sport in CV chart
In activities it depends on selected activity, bests are automatically filtered.
In range mode it can be set by sidebar or home filters for single sport
2015-06-12 21:38:21 -03:00
Mark Liversedge
efe7a5d0dd Fix RideNavigator::cursorRide()
.. new ridecache model and proxy interaction needed
   fixing up -- cursorRide() was not working at all !

Fixes #1300
2015-02-04 20:34:54 +00:00
Mark Liversedge
907ba634c2 Refresh RideFileCache when Weight changes
.. was not refreshed previously (!)

.. need to optimise this to only recompute w/kg stuff
   rather than the entire cache for the ride when its
   just because the athlete weight changed.
2015-02-02 13:38:52 +00:00
Mark Liversedge
92a065fc5d Ignore points not in zone not add to Z7
.. by returning -1 from whichZone if the value doesn't
   match any zone definition.
2015-01-12 08:23:49 +00:00
Alejandro Martinez
e556b398b2 Enabled Pace Zone shading and bining for swimming in speed histogram 2015-01-08 19:31:11 -03:00
Mark Liversedge
19ec794fb2 CP replot during background refresh
.. ridefilecaches return incomplete flag if data not available
   when aggregating (plotting during a refresh).

.. CP plot will refresh as the background update takes place.

.. this occurs even during a comparison.
2014-12-30 13:25:39 +00:00
Mark Liversedge
3c3b8e91e4 Interval Season Ranking
.. how does this interval rank for the season it
   belongs to ?

.. if out of season then rank for all time.
2014-12-29 19:30:30 +00:00
Mark Liversedge
c40630c1ca Fix RideFileCache refresh bugs
.. didn't update mean max array

.. always ignored very first data point (!) which was usually
   unnoticed since first point usually lots of zeroes.
2014-12-29 15:54:52 +00:00
Mark Liversedge
98720f099e 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
7ad2bda418 RideFileCache now refreshed in RideItem
.. and fixed sort order problem
2014-12-25 13:59:38 +00:00
Mark Liversedge
fdf3760dee Migrate CRC from DBAccess to RideFile
.. and wipe a few more SummaryMetric references
2014-12-19 19:30:18 +00:00
Mark Liversedge
d1d1d885de Migrate LTM Compare and Bests to use RideCache
.. still PMC fixups to remove SummaryMetrics left

.. Data Table now broken, needs fixing too.
2014-12-18 18:45:35 +00:00
Mark Liversedge
1025aa95f7 Migrate listRideFiles()
.. from RideFileFactory to RideCache

.. to enforce/encourage developers to use the ridecache
   to access rides/data rather than going to disk for it.
2014-12-16 10:23:03 +00:00
Mark Liversedge
b105204b66 Add RideFileCache to RideItem
.. so available for current ride

.. and refreshed() when notifyDataChanged() is called

.. but not many classes call it!

.. we are moving to having the filecache read from the
   RideCache rather than straight from disk so we have an
   in-memory and persisted version.
2014-12-14 15:35:53 +00:00
Mark Liversedge
b95ff295cd Migrate getAllFilenames()
.. from MetricAggregator to RideCache
2014-12-12 10:40:32 +00:00
Mark Liversedge
d835ed5861 Remove errant qDebug() 2014-11-26 20:17:54 +00:00
Mark Liversedge
f8a73d2f4d Add SmO2 to Histogram
.. from Moxy
2014-11-26 19:23:47 +00:00
Claus Assmann
35eb416bd2 Fix comment spelling errors
.. lots of them !
2014-11-24 15:37:56 +00:00
Alejandro Martinez
9846815f4a Fixed time in polarized pace zones should be computed only for running activities 2014-11-17 18:52:54 -03:00
Alejandro Martinez
7266ad7817 Added Polarized Zones distributions for hr and kph series to cache 2014-11-17 17:13:08 -03:00
Joern
ec7d2ee647 Best xxTime y-Axis bug #1086
... rideCache access in getAllBestsFor did not honour series-decimals
2014-11-16 15:24:44 +01:00
Alejandro Martinez
2adcabf239 Pace zone shading and binning for running activities in speed histogram 2014-11-15 15:49:38 -03:00
Joern
230f028037 AthleteDirectory - Folder Structure Part 2 of 2 + Always create .JSON
... create folder structure for existing and new athletes
... upgrade existing athlete to new structure when opening / incl.
logging and error handling
... convert any "Downloaded" file to .JSON directly - store source file
in /downloads
... convert any "Imported" file to .JSON directly - store source file in
/imports
2014-11-02 19:55:01 +01:00
Joern
f1447d2664 AthleteDirectory - Folder Structure Part 1
... introduce new "home" Folder structure object representing the
previous flat-folder
... adjust relevant QDir home - access to use the sub-folder method of
the new object

Note: the new structure is not yet active ! - everything is written to
the main folder still

To Do:
... add upgrade procedure for existing folder content to merge to the
new folders
2014-10-25 19:08:27 +02:00
Joern
eb5a6a9497 Add Gear Ratio related functions in multiple areas
.. RideFile - add rounding approach for gear values (different roundings
depending on value) - leading to discrete GearRatio values
.. AllPlot - exclude Gear Ratio from Smoothing (to keep the discrete
value) - and change curve type to "Steps"
.. ScatterPlot - specific handling for GearRatio since values between
0.01 and 1 are relevant for GearRatio and must not be filtered out
.. RideFileChache - add Distribution Data for Gear Ratio and fix
Distribution Cache for DataSeries with > 0 decimalsFor
.. Histogram - add GearRatio to Histograms (both Rides and Trends)
2014-10-22 17:14:18 +02:00
Joern
3957769587 Error in "tiz" - Filter for 'hr' series
... offset for hr-series wrong in CPX (after adding CPZone)
2014-07-18 17:55:55 +02:00
Mark Liversedge
5a8248d614 Show w/kg J/kg estimates on Ride Summary
.. and fixes up the calculation too.
.. still need to fix up the LTM plot
2014-06-09 17:33:56 +01:00
Mark Liversedge
741528719a Add WPK estimates to PDEStimates
.. but not plotted in LTM or shown o the
   summary chart yet
2014-06-09 12:40:48 +01:00
Mark Liversedge
90ded04a53 Move wpk array next to watts array in cache
.. so we can read them both in with a single
   read -- this is to support an update where
   pd estimates support wpk and absolute watts.
2014-06-09 09:10:40 +01:00
Mark Liversedge
297d9003b8 MetricAggregator Model Refresh (Part 1 of 3)
.. added the code to aggregate power data when deriving
   model parameter history over time.

.. need to get a class that applies the various models to
   generate the parameters we need (so we can reuse) in
   part 2.

.. then need to store and turn into a metric of some kind
   in part 3.

.. this is largely a checkpoint commit to enable cross platform
   testing with Mac and Windows.
2014-05-09 19:48:25 +01:00
Mark Liversedge
30efc39a01 Fix comments in RideFileCache::meanMaxPowerFor() 2014-05-09 16:52:35 +01:00
Mark Liversedge
2b7dc9a16f RideFileCache::meanMaxPowerFor()
.. to extract just the meanmax power data from a ridefile cache
   so we can aggregate and derive model parameters for new metrics
   to track W', CP, FTP, max-Power.
2014-05-09 12:46:25 +01:00
Mark Liversedge
924ef2a8f1 Improve compatibility with Dropbox
.. by checking the ride file CRC before recomputing
   either the metrics or the ridefilecache.

.. this means that users that routinely copy or backup
   or use dropbox to keep things in sync won't see any
   unneccessary metric computations.
2014-03-27 16:20:33 +00:00
Mark Liversedge
1aebf24bcc Add Power 'heat' to RideFileCache
.. to indicate which power-durations are getting worked hardest

.. Calculate a 'heat' score for the power duration curve.
   A score that counts how many rides in the aggregate
   have a power-duration best that is within 10% of the
   best value calculated.

.. next step is to add it to the CP curve (when showing
   power) to provide some kind of shade/heat indicator
   for the area of the curve.
2014-03-13 22:56:51 +00:00
Mark Liversedge
d173dc586e Tidy Up Delta Series
.. simplified acceleration calculation to convert to m/s before calculation

.. removed distribution for deltas as they were HUGE and introduced a
   terrible performance degradation where aggregation took >30s for a
   ride set that previously took <5s.
2014-02-26 09:18:44 +00:00
Mark Liversedge
4e9d26d2e0 Delta Watts, Torque, Cadence and HR
.. Following on from the recent update to add acceleration
   this update adds other derived data series based upon the
   rate of change.

.. Added to the ride plot and the CP plot.

Not sure of the overall utility of these updates but bear in
mind that they are targetting sprinting and track users and
analysis.

As well as the positive side of this (development of power
cadence etc) we also want to think about and collect data
on fatigue rate (possibly only power and torque)
- fatigue over time
- fatigue over pedal stroke
2014-02-25 18:44:53 +00:00
Mark Liversedge
1b22c9d73b 3 minutes of acceleration bests is enough
.. don't need anything beyond that!
2014-02-22 13:00:51 +00:00
Mark Liversedge
ff068705ad Add Acceleration to CP curve
.. and fixup related bugs in ridefilecache
2014-02-22 12:31:22 +00:00
Mark Liversedge
0bac9299a4 Add Acceleration to the RideFileCache
.. so we can chart distribution and cp curve for it
2014-02-21 23:20:35 +00:00
Mark Liversedge
df376796b3 Polarised Adjust Z2 to 85-100% of CP
.. seems to be a consensus.
2014-02-18 00:14:25 +00:00
Mark Liversedge
2c447eadf3 Histogram Polarized Zone Option
.. now can show in zones but using the polarised zones
   rather than user defined zones.

.. we may need to revisit this since it uses zone 2 rather
   than estimate LT1 from CP.

NOTE: The compare mode needs updating to support this option.
2014-02-13 22:26:02 +00:00
Mark Liversedge
a98212d093 CompareInterval ridefilecache
When an interval is added to the compare pane we now
compute the RideFileCache so it can be re-used in the
Histogram and CP charts without computing it each time.
2014-01-14 21:35:01 +00:00
Mark Liversedge
df15888b0b AllPlot Compare Mode
.. extending the interval compare to the allplot chart.
2014-01-03 14:59:20 +00:00
Mark Liversedge
b960aaeddd Bests offset error
.. when plotting 1s best aka Max Power, the code was using
   the wrong offset (out by one) and returning 0w.
2013-12-06 17:07:17 +00:00