.. last commit didn't avoid the detach() derefernce in a thread because
it used the [] operator which is non-const, instead we should use
QVector::at(int)
.. A few situations that cause race conditions and crashes when metrics
are being refreshed, found whilst testint user metrics.
1. access to QString is not thread-safe, fixed with a const
2. metric vector resizing is needed even if all metrics are zero
3. entire ride interval needs to be computed, assignment in thread
is not thread-safe and was incomplete anyway.
.. match(vector1, vector2) - returns an index of values; for each value
in vector1 it will return the index into vector2 if there. if the
element in vector1 is not found in vector2 no entry will be added to
the returned index.
.. e.g:
a <- c(4,6,9);
b <- c(1,2,3,4,5,6,7,8,9);
d <- match(a,b);
# d now contains 3,5,8 since indexes start from 0
.. mlr(yvector, xvector1 .. xvectorn) - perform a multiple linear
regression and return a vector of coefficients for each x.
.. under the covers the covariance matrix and chi-squared are both
calculated, but discarded. We should make these available to the
user at some point.
.. requires the GNU scientific library, which will become a mandatory
dependency at some point soon.
.. will become a first class dependency, but for now, whilst we
update the build systems it is optional.
.. to enable update gcconfig.pri with
DEFINES += GC_WANT_GSL ## switch GSL support on
GSL_INCLUDES = ## the include path (no -I)
GCL_LIBS = ## -Lpath and -lgsl -lgslcblas -lm or others
.. see gcconfig.pri.in for examples, Linux has been tested.
.. to install this new depdendency:
Linux: sudo apt-get install libgsl-dev
MacOS: brew install gsl
Windows: vcpkg install gsl
.. if there is a python chart in the view, it will crash as setWeb
does not check to see if embedding worked, and is called via the
property system so must always check.
.. due to qt-bug 62285 we need to use local time not UTC for timespec
since qt charts converts to local time internally.
.. this fixes axes starting at 1hr instead of 0h.
* 1 - Add forceSquareRatio to MeterWidget
* 2 - Adjust default colors and add background text.
* 3 - Add Elevation widget, included in default layout visible only on slope mode.
Based on the work done by Vianney Voyer
Co-authored-by: Peter <pkanatselis@gmail.com>
.. RideWindow is no longer required and brings in artefacts that have
security alerts. This code should have been deprecated previously
and was retained in error.
Fixes#3426
* Add VO2 and Ventilation graphs to WorkoutWidget and add settings
* When running tests with VO2 measurements, it can be useful to see a
graph of at least VO2 but also Ventilation to determine when e.g. a
ramp test results in a plateau and can be considered done.
* Make the color of some VO2 measurements configurable.
* Add chart settings to WorkoutWindow, so that plots can be enabled or
disabled. Also add the possiblity to do averaging.
* Use the term Ventilation instead of Respiratory Minute Volume
* Rework to not affect RideFile
Move from using SeriesType from RideFile in order to allow more series
to be added without modifying RideFile.
In recent Qt versions there's support for BLE on Windows, so remove the
check that disables it.
In Qt 5.14.2 and earlier there's a bug which causes problem if you do
certain things in the context that the signals are emitted. This is only
on Windows, and might be fixed in later versions, but use
Qt:QueuedConnection for now to avoid this.
Some more details of this can be found in Qt bugzilla:
https://bugreports.qt.io/browse/QTBUG-78488
.. the while loop limit of 10000 loops is too low, especially when
looping over ride samples.
.. the pd model short names contain spaces and will never work with
the datafilter estimates() function.
.. aggregate(vector, by, sum|mean|max|min|count) - aggregate vector v
grouping by vector by (which will be repeated if too short) using
the function sum .. count to perform the aggregation.
.. returns the aggregated series, modelled on the R aggregate function.
.. week() & weekdate() - week converts a date to weeks since 1900/01/01
and weekdate() converts weeks since 1900/01/01 back to the date at
the beginning of the week.
.. month() & monthdate() - week converts a date to weeks since
1900/01/01 and weekdate() converts weeks since 1900/01/01 back to
the date at the beginning of the month.
.. basically useful for grouping by week and month or other forms
of date arithmetic.