Commit Graph

96 Commits

Author SHA1 Message Date
Mark Liversedge
8d0b9e469b API List Mean Max Bests for a Date Range
.. will return csv of the best mean max across
   a date range, or all dates if no range is
   specified.

   e.g.
   http://localhost:12021/Liversedge/meanmax/bests?series=watts&since=2015/01/01
2015-09-10 16:15:09 +01:00
Mark Liversedge
972aca4d49 API MeanMax any series
.. add parameter series to specify which
   series to extract from the ridefilecache
   any of; watts, hr, cad, speed, vam, NP,
   xPower, nm.
2015-09-09 22:00:01 +01:00
Mark Liversedge
2e0a82e20c API List MMP
.. returns the mean max power array for a
   given ride in csv format.

   e.g. http://http://localhost:12021/athlete/meanmax/2015_08_09_10_59_09.json

   will return the power mean max data in
   csv format.
2015-09-09 21:36:15 +01:00
grauser
545c895fd4 RideFileCache : XPower in MeanMaxComputer
Exponential moving average from first point for Xpower in MeanMaxComputer
2015-08-01 00:05:24 +02:00
grauser
6435c23591 RideFileCache : Correct weighting factor for Xpower in MeanMaxComputer
fix #1480
2015-07-31 23:35:51 +02:00
Mark Liversedge
988a70aed3 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
d76cb9665c 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
3047bb9d45 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
d9b81fd228 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
3f35f7878e 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
3722f95ed4 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
bd21e21f37 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
c39a8615cb 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
e39bcf1b3a Enabled Pace Zone shading and bining for swimming in speed histogram 2015-01-08 19:31:11 -03:00
Mark Liversedge
aaa2698404 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
c9cd48d5c5 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
aff18fec80 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
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
cf951eabc9 RideFileCache now refreshed in RideItem
.. and fixed sort order problem
2014-12-25 13:59:38 +00:00
Mark Liversedge
e4c11c846c Migrate CRC from DBAccess to RideFile
.. and wipe a few more SummaryMetric references
2014-12-19 19:30:18 +00:00
Mark Liversedge
d1a339db17 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
3d933ebe9a 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
9a486ae9c8 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
5ecb26e728 Migrate getAllFilenames()
.. from MetricAggregator to RideCache
2014-12-12 10:40:32 +00:00
Mark Liversedge
e9bcad0a8d Remove errant qDebug() 2014-11-26 20:17:54 +00:00
Mark Liversedge
50845a3bfb Add SmO2 to Histogram
.. from Moxy
2014-11-26 19:23:47 +00:00
Claus Assmann
a001ffef4f Fix comment spelling errors
.. lots of them !
2014-11-24 15:37:56 +00:00
Alejandro Martinez
f0eecc254f Fixed time in polarized pace zones should be computed only for running activities 2014-11-17 18:52:54 -03:00
Alejandro Martinez
c700b7b7ec Added Polarized Zones distributions for hr and kph series to cache 2014-11-17 17:13:08 -03:00
Joern
635703c273 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
dee917ca11 Pace zone shading and binning for running activities in speed histogram 2014-11-15 15:49:38 -03:00
Joern
1011271269 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
6bd11c4290 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
ec5c02432c 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
cc69c9742b 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
2cdbf42574 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
a1ad374c6c 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
2f90276eec 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
e9ecc02bff 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
e834a92630 Fix comments in RideFileCache::meanMaxPowerFor() 2014-05-09 16:52:35 +01:00
Mark Liversedge
0e92fb4778 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
5cb636bc88 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
231a1f4156 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
c2ecf2cb9b 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
06b3c53bb9 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
884b90783c 3 minutes of acceleration bests is enough
.. don't need anything beyond that!
2014-02-22 13:00:51 +00:00
Mark Liversedge
7ffb6ef0d0 Add Acceleration to CP curve
.. and fixup related bugs in ridefilecache
2014-02-22 12:31:22 +00:00
Mark Liversedge
73f4e29513 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
d3bc1e522c Polarised Adjust Z2 to 85-100% of CP
.. seems to be a consensus.
2014-02-18 00:14:25 +00:00
Mark Liversedge
aa43681b21 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