Commit Graph

14 Commits

Author SHA1 Message Date
Mark Liversedge
7ee6ef43c1 Datafilter - bests()
.. the vectorized version of best() - returns a vector of either dates
   or peak values for given duration, usage:

   bests(SERIES, duration [,start [,stop]]) - get the peak values for
   the given duration and optional date range

   bests(date [, start [, stop]]) - get the dates of the peak values
   but no duration needed but can still proved an optional date range.
2020-05-10 09:51:29 +01:00
Mark Liversedge
7daf2fa63e DataFilter - dist()
.. get the ridefilecach distributions, precomputed distributions of the
   main data series (but not all).

.. dist(series, data|bins) - returns vectors of the series data (count
   of points for each interval) or the bins.
2020-05-09 15:59:38 +01:00
ericchristoffersen
127166a0e9 Support for TTS files. (#3333)
Support training with Tacx TTS files:

TTS distance and gradient are honored meaning training
load should exactly match tacx. Ride altitude is recomputed
based on distance and gradient, so training work will
match The Tacx Experience and might not match reality.

When TTS file contains no location, altitude is still computed
from distance and gradient but will start from 0.

Gradient during training is interpolated from distance and
altitude so will change smoothly while summing perfectly
to the correct load.

The TTS Reader source was adapted from the WattzApp
Community Edition java source.

Highly recommended that 'Use Simulated Speed' option
is enabled when riding TTS files.

This change was only tested against a small number of
dvds that I own. I would appreciate feedback and problem
reports. I would especially appreciate anyone that can
compare this behavior against Tacx as I only tested with
my Wahoo Kickr.

Issues and Future work:

I guessed about how to set starting distance and might
have got it wrong.

TTS Files contain video synchronization data. Currently
this is ignored and rlv file must be specified. I've not
even looked at the video sync data and no idea if it is
better than the rlv.

There are data fields in the TTS that Ive not investigated
and they might contain useful info, for example a starting
altitude for rides that have no location info.

Other changes:

Fix numerical stability around zero in blinn and quadratic
solvers. Improve quadratic solver accuracy.

Fix issues with computing gradient from non-uniform
cubic splines.

RideFiles now record additional altitude accuracy.
2020-02-13 21:58:31 +00:00
Ale Martinez
ff0b32989f Add CP Models for Running Power
- PDEstimate now has a run flag, Estimator has 2 passes: rides and runs
  MultiModel and WSModel are disabled for the same reason they were disabled
  in CP chart, and to lower the performance impact.
- Show CP Models Estimates for Running in RideSummary when the involved
  activities are all runs.
- DataFilter estimate function uses Bike or Run models based on activity type
- Metrics Trends charts Estimate allow Bike vs Run selection
2019-04-15 15:26:35 -03:00
Mark Liversedge
ae3320d2ec Show performances on LTM plot
.. show weekly best performances (ready for banister curves)
.. show performance tests (also used by banister if present)
.. can toggle which ones to show.
2019-01-05 17:38:27 +00:00
qheath
c8523a2716 various minor bugfixes + warningfixes (#2878)
* fix unclosed file descriptors

* remove various compiler warnings

sometimes it was only ambiguous indentation, sometimes bugs were fixed:

- forgotten `break;` instructions or `fallthrough` annotations:
  - src/ANT/ANTChannel.cpp
  - src/Charts/CriticalPowerWindow.cpp
  - src/Charts/MUPlot.cpp
  - src/Core/DataFilter.cpp
  - src/FileIO/RideFileCache.cpp
  - src/FileIO/RideFileCommand.cpp
  - src/Train/DialWindow.cpp
- forgotten braces:
  - lmfit/lmmin.c
  - src/FileIO/XDataDialog.cpp
- test on the wrong variables:
  - src/Gui/Pages.cpp
- wrong parenthesis
  - src/Charts/CPPlot.cpp
- missing macro argument
  - src/Cloud/WithingsDownload.cpp
- missing `return;` statement
  - src/Cloud/Xert.cpp
- unused variables
  - src/Gui/DiarySidebar.cpp
- unclear indentation
  - src/Core/RideItem.cpp
  - src/FileIO/BinRideFile.cpp
  - src/Metrics/PaceZones.cpp
  - src/Metrics/RideMetadata.cpp
  - src/Metrics/Zones.cpp

* remove unnecessary Leaf::Parameters enum value from data filters

lists of parameters don't exist as such outside of the parser, and have
no business using the same type `Leaf` as complete terms anyway

* remove unnecessary argument

`leaf1.print(leaf2,...)` would print `leaf2` and completely ignore
`leaf1`, so now `leaf2.print(...)` is used instead
2018-05-30 13:33:02 +01:00
Mark Liversedge
49d78e6c7b Remove TrainingPeaks Trademarks
.. renaming the 3 metrics they trademarked in 2013:

   TSS => BikeStress
   IF => BikeIntensity
   NP => IsoPower

.. this will break data filters, user formula and
   R and Python charts.

.. in the next commit will add user metrics to ensure
   backward compatibility.
2018-02-17 11:12:50 +00:00
Joern
dba6f6f1af Fix Static Code Check results
... incomplete class initialization
... duplicate if statements
... typos in objects names (copy&paste) (AllPlot)
... missing else (CPPlot)
... missing DELETEs for objects (only if obvious that object is not used somewhere else)
... copy&paste errors (e.g. ModelPlot)
... small floats instead of integer evaluating to 0
... potential SEGV since pointer is not checked for NULL
... misleading code formatting (hard to read) in *zones.cpp
2017-03-23 20:07:09 +01:00
grauser
b4c38130ec RideFileCache : Add aPower/kg 2016-12-20 12:57:01 +01:00
Alejandro Martinez
e71edb94f6 Added bestime(km) to formulas
To have a general way to track best times for non stardard
distances in Metrics Trends charts and User Defined Metrics.
2016-07-14 15:13:33 -03:00
Mark Liversedge
2dd4ec1693 Fix MeanMax Computation trailing Zero
.. clean it up, rather than resolve source (there is still a
   problem in there somewhere).

.. at least now interval plots and model fits aren't skewed
   by a trailing zero value
2016-05-21 10:38:49 +01:00
Alejandro Martinez
6937df7786 Add support for running HR zones part 3
Changed ride cache and charts to use zones according to sport(s)
2016-05-09 15:21:47 -03:00
Mark Liversedge
e1a7fc4da8 R GC.activity.meanmax()
.. returns a data.frame with meanmax arrays for the
   series that are present
2016-05-04 11:39:14 +01:00
Mark Liversedge
4b5201c4c5 Restructure source directory
Introducing a directory structure to make it a bit less
daunting for new developers and perhaps even old hands.

The main folders all start with an upper character, so src
files are now located in;

* Core - Core data structures
* Gui - Main GUI elements
* Metrics - Models and Metrics
* FileIO - Device and File I/O
* Charts - All the chart types
* Cloud - Working with Web Resources
* Train - Anything Train View specific
* ANT - Our ANT+ Stack
* Resources - Images, Translations, Web etc

Apologies to anyone who needs to merge across this update.
2016-02-25 14:51:53 +00:00