Commit Graph

69 Commits

Author SHA1 Message Date
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
Mark Liversedge
3aa9ae6c55 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
d35758d3e7 AllPlot Compare Mode
.. extending the interval compare to the allplot chart.
2014-01-03 14:59:20 +00:00
Mark Liversedge
7915feea60 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
Mark Liversedge
0a215562d5 Add Filter Sidebar
To allow selection of filters aka Named Searches when
plotting charts.

Fixes #732
2013-12-05 14:30:42 +00:00
Mark Liversedge
b23ed51fa4 Best aPower
Peak aPower durations now computed and cached;

* updated RideFileCache to work with aPower
* CP curve now allows you to plot aPower
* LTM plot allows you to plot aPower peaks
* DataFilter allows 'best(apower, duration)' function
2013-11-06 16:41:25 +00:00
Mark Liversedge
5822db4b58 Plot Peak Power et al 2 of 2
Updated RideFileCache and LTMWindow/Plot to
plot the user defined durations for peak power.

Actually we support all the different meanmax
measures available in the CP chart, so you can
now track peaks for user defined durations of;

            * Power
            * Watts per Kg
            * xPower
            * NP
            * Heartrate
            * Speed
            * Cadence
            * Torque
            * VAM

I have not spent much time optimising for performance
but reusing the same 'seek' approach used by the recent
update for best() and tiz() functions in the datafilter.

Fixes #322.
2013-10-28 19:29:28 +00:00
Mark Liversedge
d0827131ef Urgent Fixup to previous commit
.. to make sure the v2 LTMSettings
   uses the bestSymbol.

Just pushing this (WIP) to make sure
we don't get half baked LTM settings
from people building against the previous
commit.
2013-10-28 17:58:04 +00:00
Mark Liversedge
44e0d6b744 Fixup ridefilecache best decimals
.. forgot that the values are converted to
   zero decimals when stored.

This fixes strange results when filtering by
wpk or speed, or any series that has decimal
places.
2013-08-05 08:37:25 +01:00
Mark Liversedge
0790d16be5 Best and TIZ shouldn't buffer
.. they have one read operation beyond the header
   and will not need to buffer -- the O/S will buffer
   file blocks too, lets not duplicate.
2013-08-05 07:41:40 +01:00
Mark Liversedge
a8acdc8561 Fast Best and TIZ queries
Added static functions to ridefilecache
to get best and tiz values for series and duration
or zones and glued them in to the datafilter code
recently added.

It uses seek (via QDataStream::skipRawData) and is
quite fast on my Linux development PC.

We now need to update the LTM settings dialogs to
the new mockups so we can plot custom durations for
peak power / NP etc too.

NOTE: Not tried on Windows / Mac, so may not be quite
      so fast there, will need to check.

      To try this out, in the search filter box type:

            best(power, 3600) > 250

      to filter only those rides where the best hour
      power is greater than 250 watts. It should
      return almost instantly.
2013-08-04 15:45:55 +01:00
Mark Liversedge
a5a13668cd Move filters from MainWindow to Context
.. we notify search/filter updates via context rather
   than MainWindow
2013-07-27 13:51:09 +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
c56c5a9567 MainWindow Refactor Part 1 of 5
Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.

Further updates will need to;
- 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

Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
2013-07-07 15:50:28 +01:00
Mark Liversedge
4d1fa86cb3 RideFileCache dbaccess thread ...again
Need to call getWeight() in the RideFileCache when it
opens the ride there rather than in MetricAggregator.

Oopsie.
2013-05-19 19:45:43 +01:00
Mark Liversedge
31ced60209 Search/Filter on toolbar applies to Charts
When the user free text searches or applies a data filter in
the top right toolbar search box it gets applied to any charts
that plot data from many rides, including;

- CP curve
- Calendar
- Histogram
- LTM
- TreeMap
- Summary

I need to update on a Mac to no longer use a Mac text search box
but now use a search filter box on the top right.
2013-04-05 16:23:16 +01:00
Mark Liversedge
c229362ead Revert "Code Cleanup: RideFileCache remove mallocs"
This reverts commit 6fdc55528f.

The performance decrease is considerable. Using mallocs across
my personal ride collection takes 5:19 to compute all the caches.
Using the QVector equivalent took 22:40.

Need to consider looking at QVector across the GC codebase.
2013-03-30 21:33:01 +00:00
Mark Liversedge
76c11b3568 Invalidate incore cache when refreshing
If an incore cache of an aggregated RideFileCache is invalidated
by a ride in the same period being edited it does not clear
until the cache array is cleared (25 of them so likely to be
never) or upon a restart.

This fixes them being invalidated by refreshCache.
2013-03-29 18:15:34 +00:00
Mark Liversedge
30c13fe973 Code Cleanup: RideFileCache remove mallocs
Mark Rage's superfast meanmax computer works like a charm but
uses stdlib malloc/free for memory allocation.
2013-02-21 13:07:00 +00:00
Mark Liversedge
b48a9a2b86 Fix VAM on CP chart out by factor of 10
Fixes #489.
2013-02-13 22:01:43 +00:00
Mark Liversedge
b527a9ed33 Code Cleanup: Ride Data and Friends
.. cleaning XXX and misleading comments
2013-02-10 10:57:33 +00:00
Mark Liversedge
9b0b193ed3 Remove RideFileCache compile time warnings
Just noticed and thought I'd do a quick fix since it
was so trivial.
2012-12-10 07:27:00 +00:00
Damien
0a784a4a6a Remove warnings 2012-12-09 23:03:19 +01:00
Mark Liversedge
546b4aac83 W/KG fixup distribution/histogram
The w/kg ridefile cache was not quite right
for distribution charting.
2012-12-03 14:56:43 +00:00
Mark Liversedge
1eba467976 UI Nits: LTM Sidebar (Part 2 of 3)
The last of a series of recent patches to address performance
degradation from the introduction of the LTMSiebar. This last
patch introduces a CPX aggregates cache to re-use aggregated
CPX data (e.g. for plotting a specific season or date range).

The cache is set to only hold 25 caches, which should be enough
for most folks list of seasons. But won't get unwieldy if they
scroll around in the diary view.

The following will be introduced in the last patch of
this series:

1. Introduce 'events' within a season and plot them on the
   LTM chart -- a form of 'annotation' but also the beginning
   of planned events in the future too.

2. Implement click functionality on LTM charts but decide if
   we use click to annotate or to define a new date range or
   both?
2012-11-27 21:03:19 +00:00
Mark Liversedge
a5bcec5265 Data Filter (Part 3 of 3)
Last part of the search/filter functionality;

* SearchBox now incorporates filter and search
  with a new widget. We can update this widget
  to include more fancy UI/Interactions without
  having to change the ride list or charts etc.

* Added search/filter widget to the relevant charts
  and screens; Metrics, TreeMap, CP, Histogram,
  Activity Log, Ride list (refactored out of MainWindow)

* Added namedsearches.xml and adding/selecting them
  from a drop down menu on the search box.

* Fixed some performance bugs related to duplicate
  signals and redraw/reprocessing. Also ensured that
  CLucene remains optional -- but means no search or
  filter functionality unless it is available.
2012-11-05 15:44:01 +00:00
Damien
02e95b140d Add Watts/Kg in the cpx cache files and in the CP plot
modified:   src/CpintPlot.cpp
	modified:   src/CriticalPowerWindow.cpp
	modified:   src/CriticalPowerWindow.h
	modified:   src/HistogramWindow.cpp
	modified:   src/RideFile.cpp
	modified:   src/RideFile.h
	modified:   src/RideFileCache.cpp
	modified:   src/RideFileCache.h
2012-07-08 11:03:20 +01:00
Mark Liversedge
5019abfc69 Fix Bounds checking SEGV
RideFileCache hogs CPU / hangs with poorly parsed files, whilst
the activity may crash when columns are removed.
2012-04-05 17:18:43 +01:00