Commit Graph

198 Commits

Author SHA1 Message Date
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
105a3b05db RideFileIterator
.. useful for simplifying iteration over the ride
   samples in the metric compute() method and possibly
   elsewhere in the code

.. will iterate for rides and intervals.
2015-12-12 22:46:54 +00:00
Alejandro Martinez
39bb27f3d8 Support Metrics in Calendar Text
When the Diary checkbox is set for a metric
"Name: value" is added to Calendar Text.
The "Weight" field is special cased to "Athlete Weight" metric.
Calendar Text is no longer stored in json files, just cached
from Metadata Configuration, Tags and Metrics values.
Fixes #1563
2015-12-08 23:06:42 -03: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
e74ecc1f09 DataProcessor 'Auto' runs on import only
.. since, generally, if it has been run once there is no
   value in running it every time you open a ride.

.. it now only runs during import.
2015-10-08 08:46:54 +01:00
Joern
1a8d683303 Store GC Settings in multiple .INI files instead of system specific (Registry, PLIST,..) format
... change storage format to .INI files (which is QTs cross-system format)
... differentiate between System, Global and Athlete specific settings
... store the Global Settings in the AthleteDirectory (root)
... store the Athlete specific Settings in the Athletes Names subdir /config
... migrate existing Settings from current location into new formats "on-the-fly"
2015-09-19 11:13:17 +02:00
Mark Liversedge
d95ec38593 API Fetch Activity format=...
.. when retreiving an activity using the API
   you can now specify the format you want the
   data to be returned in.

   it can be one of;
   tcx - garmin training centre xml
   pwx - training peaks xml
   json - goldencheetah json
   csv - all available data (not powertap csv)

.. along the way the file writers for the respective
   formats now accept a NULL context to work standalone.
   this may be useful as a file conversion tool.
2015-09-08 21:13:17 +01:00
Mark Liversedge
60b1562d55 Formulas support Ride Data
.. passed to eval and symbols now recongised.

.. sample data is referenced using symbol names
   in all caps to make it clear you are referencing
   ride dample data.

.. the next commits will add defining formulas and plotting
   the derived data series in allplot.
2015-08-25 13:30:07 +01:00
Alejandro Martinez
4b2679cdf1 Show field name in Calendar Text when field type is not text
Fixes #1524
2015-08-19 21:28:15 -03:00
Mark Liversedge
afe4ff9c66 Attribution for Core Temperature
.. we have been granted permission to use the TCore algorithm
   and so the attributions have been added to the code and about
   box.

.. Mark Buller should be added to the contributors too.
2015-08-04 20:22:03 +01:00
Mark Liversedge
e8eeed1bb8 Fixup Core Temperature Gamma Constant
.. it was calculated incorrectly, 0.022 x 0.22 instead of
   0.022 x 0.022 so quite a significant order of magnitude !
2015-07-23 22:56:28 +01:00
Alexandre Prokoudine
4b940e61a7 Fix a typo in a user-visible message 2015-07-21 02:13:21 +03: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
Alejandro Martinez
05bffb0def Fixed interval alignment
To be inline with the new interval structure
Problem was clearly visible in swim workouts (Manual, TCX and PWX).
2015-06-25 11:12:59 -03:00
Mark Liversedge
2222d1decd Fix Core Temp SEGV
.. importing ride < 60s long

Fixes #1411
2015-06-21 12:57:11 +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
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
Mark Liversedge
f9591812ce Discard data with no time or distance
.. we need one or the other !
2015-06-13 17:33:04 +01:00
Mark Liversedge
12615590e3 Revert "RideFile::isRun() -- only use the "Run" tag to clasify a file as running" 2015-06-09 19:56:33 +01:00
Mark Liversedge
573adb1ef2 Merge pull request #1397 from alex-hhh/multisport-import-2
Import multisport FIT files
2015-06-09 19:54:25 +01:00
Alex Harsanyi
f73686b4ff RideFile::isRun() -- only use the "Run" tag to clasify a file as running
For multi-sport files, the bike section might record vertical oscillation or
ground contact time from the HRM-RUN sensor when moving in and out of
transition.
2015-06-08 22:05:46 +08:00
grauser
55fb4d68c6 RideFile: Don't use 0.0 as min or max for gps lat/lon 2015-06-03 19:52:45 +02:00
Alejandro Martinez
038e6f5098 Discover Peak Pace intervals for running and swimming 2015-06-03 12:05:54 -03:00
Mark Liversedge
33a711b03a Fix interval offsets
.. when adjusting sample offsets to start from zero
2015-05-29 20:44:45 +01:00
grauser
8223a20b77 Route Search: verify Min-Max Lat-Lon before searching 2015-05-26 23:27:25 +02:00
grauser
53bf19ebc6 AnalysisSidebar: Reinstate interval DRAG/DROP in list 2
- Apply change to RideFile
2015-05-22 08:15:31 +02:00
grauser
d12d18c701 Auto Interval Discovery : SPRINT detection 2015-05-18 19:57:09 +02:00
Mark Liversedge
9027e1db02 Reinstating Interval functions: DELETE
.. you can now delete interval(s) via the hamburger menu
   or by right-clicking a specific interval.
2015-05-18 18:41:51 +01:00
Mark Liversedge
c1739199b2 Fixups For JsonRideFile.y
.. for intervals now as pointers
2015-05-18 14:21:50 +01:00
Mark Liversedge
d5ae1bf685 RideFile::intervals_ now array of pointers
.. so we can keep a reference to the user interval
   in a ridefile from the rideitem and not worry about
   trying to match or handle index offsets into the array

.. this is required to fixup the relationship between
   an IntervalItem and a RideFileInterval in RideItem
   and RideFile respectively.
2015-05-18 13:57:21 +01:00
Mark Liversedge
4b32ed544c Autodiscovery of TTE efforts
.. they're pretty rare, but this code will find
   any TTE efforts between 1hr and 2 minutes.

.. it will be extended to find sustained efforts
   but this is just to get the code started
2015-05-15 11:00:13 +01:00
Mark Liversedge
6b2a2dbb65 Auto Interval Discovery (Part 3a of 3)
In this part we have now reinstated the sidebar interval tree
but it is refactored out of athlete and into AnalysisSidebar
where it belongs.

* you can hover and select/deselect intervals in the sidebar

Left to do;

* All the interval operations like sort, drag and drop, find
  delete etc do not work at present and will require some work

* Add a color button to the tree to let the user change the color
  for USER defined intervals

* Add more types of intervals to the discovery; esp routes and
  sustained intervals
2015-05-10 08:30:13 +01:00
Mark Liversedge
8a3e35b880 IntervalItem::refresh()
Computes the metrics for an interval and creates a temporary
ridefile locally so you don't have to.

.. previous design should have pushed this into the
   class instead of performing it in RideItem

.. now there should be no reason to create a ridefile
   during interval discovery.
2015-05-04 18:17:33 +01:00
grauser
49e964f585 Interval: Add interval type (Device, User, Peak, Route,...) 2015-04-30 18:20:22 +02:00
Mark Liversedge
926a08f1b6 About Dialog - libsamplerate
.. show on the version dialog

.. fix up 'delete' -> 'free()' for malloc'ed
   memory used with libsamplerate
2015-04-08 20:59:52 +01:00
Mark Liversedge
3f1b9fe5d1 RideFile::resample() use libsamplerate
.. if it is available.
2015-04-08 14:03:11 +01:00
Mark Liversedge
878776e051 Add RideFile::arePresent()
.. to get a list of all data series that are present in the ridefile
.. used when working with libsamplerate to pack/unpack data series
2015-04-08 10:51:39 +01:00
Mark Liversedge
fb994fa5e7 Rename Ride to Activity
.. across the code, except where it clearly is a ride
   e.g. importing PowerTap or SRM
2015-01-30 10:59:56 +00:00
Alejandro Martinez
7015011adb Fixed minor interval alignment issue
The problem is barely noticeable in cycling activities but
annoying for run and swim intervals.
Added synthetic .csv for testing.
2015-01-27 09:52:41 -03:00
Mark Liversedge
9092f19f2c Best Intervals are Yellow
.. on interval navigator etc

.. so you don't get lots of labels on the plot
2015-01-17 10:05:29 +00: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
db4a4a0809 Garmin Cycling Dynamics : Switch off Power Phase 2015-01-06 00:15:08 +01:00
Mark Liversedge
825372bca8 Climb intervals in Green
.. and also tidy up use of isPeak() etc

.. starting to wonder if we need to a) auto find intervals on import
   and then b) list them in a tree c) allow user to select a 'class'
   of intervals to show (i.e. select all climbs)
2015-01-05 12:08:37 +00: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
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
44aea09d97 Deprecate SQL metricDB
.. removes across the code base

.. need to fixup RideFileCache and Lucene refresh
   within the RideItem/RideCache framework, they will
   NOT be refreshed at present

.. need to look at how charts get refreshed on data
   changes now RideItem provides a more granular
   mechanism (look for XXXREFRESH in code)

.. New Intervals code will definitely NOT compile
   and needs to be redesigned/reimplemented to fit
   in with the ride cache
2014-12-24 20:24:34 +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