Commit Graph

198 Commits

Author SHA1 Message Date
Brian Bergstrand
f1571fb482 Fix type conversion warnings with abs()
Just use std::abs() which provides type specific overloads.
2016-01-07 21:18:51 -06:00
Brian Bergstrand
1fcc94c7f4 Fix various 'unused variable' warnings 2016-01-07 21:18:50 -06:00
Alejandro Martinez
9f06d48c42 Added Time in Pace Zones to RideSummary in Trends Compared Mode
For Date Ranges and Intervals, only when activities are homogeneous
to select the correct Pace Zones
Also enabled Time in Power Zones only when activities are homogeneouse
to select the correct Power Zones
2016-01-03 13:38:52 -03:00
Alejandro Martinez
d44e4bea31 Added Time in Pace Zones to RideSummary for date ranges
Only when the involved activities are all runs or swims
2016-01-03 13:38:49 -03:00
Alejandro Martinez
77cadf2874 RideSummary in Trends shows Power Zones according to sport
Only when the activities included are homogeneous
2015-12-30 17:53:59 -03:00
Mark Liversedge
cff326a1b1 RideSummaryWindow filter missing metrics
.. since we can now delete metrics when they
   are user defined. Previously the summary
   would crash if a Bests metric didn't exist.
2015-12-22 12:46:24 +00:00
Mark Liversedge
711cf13372 Fix RideSummary SEGV
.. logic error if/else for plotting rides vs dateranges
   along with assumption that zones will not be NULL (esp
   for running) lead to a repeated crash when running power zones
   are not defined.

.. additionally, when summarising for a date range the table was
   displayed for running vs cylcing based upon the current ride item.
   This has been changed to use cycling power zones always.

.. the proper fix would be to summarize power time in zone for running
   and cycling separately.

.. the compare logic appears to be unaware of power time in zone for
   running and so does not have the same SEGV but will also need to
   be updated to list time in zone for running and power separately.
2015-12-21 17:23:44 +00:00
Alejandro Martinez
078d4ac5ad Add support for running power zones (Stryd) part 3
Final part: use the zones according to sport in metrics and charts
2015-12-19 19:08:33 -03:00
Mark Liversedge
d6c8949355 Major RideMetric compute() refactor
Update of all metrics to work with a RideItem
not directly with a RideFile.

When iterating over the activity samples we now
use a Specification and RideFileIterator to bound
the set of samples used. This means that we can
compute metrics for intervals without having to
create a temporary ridefile.

RideItem now has first class members for zoneRange,
hrZoneRange and paceZoneRange to avoid calculating
for every metric which are stored in RideDB.json.

Compare pane continues to construct a ride file
when working with intervals since it is used lots
of charts, this is unlikely to ever change.

A SEGV in compare intervals has been fixed where
interval items were repointed to temporary compare
pane objects that are deleted - see RideItem::setFrom.

THIS COMMIT CONTAINS 3 REGRESSIONS:
1. TcxRideFile no longer computes metrics
2. FitlogRideFile no longer computes metrics
3. WorkoutWizard no longer computes metrics

-- The workout wizard will be replaced with a new
   Workout editor, whilst the RideFile metrics
   may be deprecated (but considering options)
2015-12-16 11:36:02 +00:00
Mark Liversedge
0485c873f4 NA value and Min Temperature metric
.. allow NA to be used anywhere and skipped on
   the metric trend chart.

.. add a min temperature metric

.. add a chart for tracking temperatures
2015-12-03 14:58:38 +00:00
Mark Liversedge
ef46ceb27c Support 10 HR Zone Metrics
.. fixes a SEGV in ride summary window where only 8
   HR Zones are supported, but historically the number that
   can be configured in preferences was changed to 10.

.. the 10 limit was probably a cut and paste error but it
   is out there now, so we need to support 10 zones.

.. all the other zone configurations are set to a max
   of 10 zones anyway.
2015-11-07 08:29:08 +00:00
Mark Liversedge
b0b24c0f3a Added W'bal Work In Zone Metrics 2015-11-03 18:55:21 +00:00
Mark Liversedge
ea2a66e399 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
Mark Liversedge
3d2b5d8076 Align average and max on summary
.. makes it easier to compare

Fixes #1550
2015-09-11 15:18:23 +01:00
Alejandro Martinez
f70ab87a36 Added copyrigth notice for SwimScore 2015-07-29 20:12:12 -03:00
Alejandro Martinez
aba1ac814f Fixed RideSummary refresh when filters change while not visible
The problem showed up only for date ranges not ending today
2015-07-27 14:34:32 -03:00
Alejandro Martinez
dc7589a3ab Add Pace metrics for runs and swims
- to default interval metrics
- to default summary metrics
- conditionally to Summary averages
2015-07-16 19:50:26 -03:00
Mark Liversedge
32ae899861 Add Moxy tHb metrics
.. to match the smO2 ones.
2015-06-27 17:22:31 +01:00
Mark Liversedge
8a09fe0ca2 Enable user to configure autodiscovery
.. select which kind of intervals we want

.. makes it faster and also reduces the size of
   the rideDB.json file quite dramatically which
   may be useful for some users.
2015-06-27 12:30:27 +01:00
Mark Liversedge
148064ed81 Add Core Temperature
.. New derived data series representing an estimate of core temperature
   on the basis of HR changes.

   * shown on AllPlot and RideSummary
   * 2 new metrics; max and avg core temperature

.. This has been based upon "Estimation of human core temperature from
   sequential heart rate observations" Mark J Buller, William J Tharion,
   Samuel N Cheuvront, Scott J Montain, Robert W Kenefick, John
   Castellani, William A Latzka, Warren S Roberts, Mark Richter,
   Odest Chadwicke Jenkins and Reed W Hoyt. (2013). Physiological
   Measurement. IOP Publishing 34 (2013) 781–798.
2015-06-18 18:41:04 +01:00
Mark Liversedge
916e8ee7a1 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
Alejandro Martinez
0275d4b52f Use sport specific metric for PMC in RideSummaryWindow
For single ride use sport specific base metric
For date range use sport specific base metric if filtered activity
list is homogeneous or combined otherwise.
2015-06-07 22:52:33 -03:00
grauser
761d82b509 Add Color to Segment name 2015-06-06 22:38:26 +02:00
Mark Liversedge
100c0be881 Auto Interval Discovery (Part 2 of 3)
In this part we have updated all the charts to reference
the RideItem::intervals() members instead of the TreeWidget
and RideFile::intervals().

The code to create/change/delete intervals is not included
so selecting and editing on charts/sidebar is disabled til
part 3 of the update, but hover should work properly.

Still left todo in future updates;

    * Updates to the interval sidebar to list intervals
      in a tree (by interval type) with a color selector

    * Code to create, edit, delete etc the intervals via
      the rideitem/intervalitem and see them reflected in
      the ridefile

    * Update to search for all the different types of
      IntervalItems including routes and sustained intervals
2015-05-09 18:56:42 +01:00
Mark Liversedge
87f0729d43 Revert RideMetric::imperialPrecision()
.. introduced within bae36e6b
2015-02-09 22:07:29 +00:00
Alejandro Martinez
9348dcf52d Removed special case for Pace in RideSummary
Used RideItem::getStringForSymbol
Modified RideCache::getAggregate to use RideMetric::toString
2015-02-04 21:30:47 -03:00
Alejandro Martinez
7517b359e3 Simplified RideSummaryWindow removing some Pace special cases
Using the overriden methods.
The aggregation special case remains.
2015-02-03 20:49:09 -03:00
Alejandro Martinez
c4d99dd2b7 Fixed Pace units in RideSummary
Pace values and unit names now follow preferences, the code is ugly
it should use toString method, probably with a context parameter.
2015-01-23 16:59:18 -03:00
Mark Liversedge
c934e8b4d0 Aesthetic Tweaks
.. tile mode highlights on mouse over for a more
   fluid feel, and better feedback

.. can customise the trend view charts background

.. fixed a SEGV on apply preset in chart setup

.. this is part of a set of updates to update the
   standard setup to be more complete so the user
   can pretty much run off a standard config.
2015-01-23 12:06:03 +00:00
Mark Liversedge
df94e42e58 Deprecate Lucene
.. use a simple free text search against the ridecache now we
   have all the texts available and in memory

.. no need to maintain an index, no dependency on a horrid lib
   with nasty dependencies and its faster too

.. the free text search is very simple, will need to bolster it
   over time e.g. it matches text not words
2015-01-13 20:52:01 +00:00
Damien
45f033f8a3 CPPlot: Some model testing 2015-01-12 22:27:11 +01:00
Alejandro Martinez
19a0359957 Hide irrelevant interval metrics
In Ride Summary
2015-01-11 22:00:38 -03:00
Mark Liversedge
220b0f2842 Color Code PMC Metrics on Summary
.. but to avoid being too 'opinionated' about the users
   training we limit to the really obvious things and
   don't offer any opinion on middling values.

.. LTS > 80 is green > 100 is blue
.. SB < 40 is red -- overtraining
.. RR < -4 or > 8 is red -- detraining or overextending

.. it borders on bollocks given each athlete is different
   and training is about managing the overreaching and recovery
   to push at those boundaries

.. might end up removing this altogether .. but might flag
   stuff up for newbies
2015-01-11 10:56:26 +00:00
Mark Liversedge
44eb69c4a7 RR on Summary
.. after reinstating ramp rate now putting back onto summary
2015-01-11 09:32:11 +00:00
Alejandro Martinez
cb9d9239a4 Added Swim Metrics
SwimScore, xPace and Pace for Swimming
TriScore for combined PMC
2015-01-09 21:59:27 -03:00
Damien
d8cf1e3d08 LeftRightBalance: isRelevantForRide use DataFlag 2015-01-07 19:10:35 +01:00
Alejandro Martinez
3d9f8eea70 Separate Swims in Trends Summary
Update spanish translation
2015-01-07 13:01:27 -03:00
Mark Liversedge
c1a5c46e8b Merge pull request #1224 from amtriathlon/master
Time in pace zone metrics for swim activities
2015-01-07 07:29:43 +00:00
Damien
a734430afa RideSummaryWindow: Only test relevant in ridesummary 2015-01-07 07:58:23 +01:00
Damien
6f7c6af50d RideSummaryWindow: Only add Left/Right Balance if relevant 2015-01-07 00:07:32 +01:00
Alejandro Martinez
8759580c39 Time in pace zone metrics for swim activities
Shown in activity summary
computed if there are swim pace zones defined and the activity isSwim
isSwim() looks just at Sport="Swim" for now
2015-01-06 19:55:40 -03:00
Damien
7ce398a251 Garmin Cycling Dynamics : Switch on Power Phase 2015-01-06 18:44:27 +01:00
Damien
bae36e6b2a BasicRideMetrics: Add metrics for Garmin Cycling Dynamics - part 1 (Avg) 2015-01-05 23:00:44 +01:00
Damien
5284447498 FitRideFile: Add new FIT fields
Especially for Vectors new metrics
	- Left and Righ Platform Center Offset - eg: -8mm and -11mm
	- Left and Right Top dead Center  - eg: 10° and 11°
	- Left and Right Bottom dead Center  - eg: 203° and 210°
	- Left and Right Peak Power Phase Start - eg: 83° and 76°
	- Left and Right Peak Power Phase End - eg: 115° and 125°
2015-01-05 08:01:33 +01:00
Mark Liversedge
5bb5dc3d9e Refresh Summary every 5 seconds
.. not constantly (!)
2014-12-30 15:59:45 +00:00
Mark Liversedge
6cbf83928c RideSummary refresh during background refresh
.. but only if plotting a date range
2014-12-30 13:40:20 +00:00
Mark Liversedge
30cfaf853a Withings, Summary + Cache refresh update
.. when downloading withings data the cache is refreshed

.. when the cache refreshes it notifies the *current* ride
   changes if it is refreshed

.. ridesummary has been updated to process rideChanged() signals.
2014-12-29 22:41:08 +00:00
Mark Liversedge
178dc6dbed Disable interval ranking
.. it is too slow. Need to think about how to implement
   this with good performance.

.. if you really want it then add
   DEFINES += GC_HAVE_RANKING
   to gcconfig.pri
2014-12-29 21:25:03 +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
5692d362d0 ConfigChanged Part 1 of 3
.. introduce concept of configChanged(what) to
   pass details of what config has been changed

.. fixed zones changes to re-read after write
   to correct the save twice to get changes to
   zones bug.

.. next parts need to spot changes (part 2) and
   then action appropriately (part 3)
2014-12-29 13:41:50 +00:00