Added calibration trainer command, delayed check for user stopped pedaling with visual feedback on progress and saved calibration for next use on success.
CTRL+Click on a selected media file allows to clear the selection,
lets honor this action to have a way to train without video after
a media file has been selected.
[publish binaries]
Create ergfile finalize for every parser to call.
Consolidate lap init into ergfile finalize.
Consolidate lap distance updates into a single method.
Laps now sorted by location.
Workout with no lap is given bracketing laps.
Fix handling of final lap (falls back on route distance).
FFwd lap on final lap no longer jumps to route start.
AddLap button now actually creates a new lap in lap list,
making it reachable using nextLap and prevLap.
Remove the displayLap field as it serves no purpose.
This is an experimental feature, the primitive was available
but currently unused, it seems to have been available from
Computrainer HDC in former versions.
When used with videosync it does a naive extension of the FFwd
implementation, but it seems less precise than without videosync,
some tuning may be required.
* Teach ttsreader to process routes and segments
TTS reader previously ignored routes, segments and strings.
With this change the route name, route description, segments,
segment descriptions are now all parsed into ttsreader object.
With this change the route name and description are assigned to
the ergfile, so route name now appears while riding a tts file.
With this change there is still no place to put segments in ergfile.
With this change none of the new information is assigned into the
activity file.
The segments and segment descriptions are used by tacx software
so user can select a named region of a long ride. Example ride
was >200km long and contained 12 named segments, each with a nice
description. Would be nice to bubble that info up to train mode.
* Translate tts segments into ergfile laps.
Also fix old issues with how laps work in slope mode, especially
with ffwd and rwnd.
Also lap markers are double.
As far as I can tell laps work ok now.
Fixes for power adjustment:
Fully populate new point from old before rewriting fields.
Prevent power from reducing to zero since after it is zero you
cannot increase it again...
The weight has a direct impact on how fast you climb for a given power.
Other parameters like the wind resistance and the rolling resistance do
not change as much but should still be communicated to devices which can
take them into account. All the needed values were already present in
the BicycleSim and DeviceConfiguration modules. It is simply a matter of
communicating those values in the RealtimeController interface, just like
the gradient.
.. Global settings (themes, metadata etc) are now maintained
in the config dialog as in the past, whilst athlete settings
(such as zones, measures etc) are now maintained in a new
config dialog accessible from the athlete view (gear icon).
.. Config changes are communicated via two signals;
* Context::configChanged(qint32)
* GlobalContext::configChanged(qint32)
Crucially, all global context signals are cascaded through
the athlete contexts-- so athlete specific widgets only
need to connect to the athlete context signal (and will get
athlete and global config change notifications).
Whilst global widgets such as the sidebar and mainwindow
need only connect to the globalcontext signal since they
are not interested in athlete specific details.
[publish binaries]
Since F3 was assigned to Calibration, its use as modifier was deprecated.
Also nextDisplay is not implemented so we can do some cleanup.
F1 is restored to their original function: start/pause and F2 is used
for new lap, in both cases with debouncing to avoid false activations.
This way the same functions enabled for ANT+ remotes are available via HBC:
Start&Pause: F1
Lap/Interval: F2
Load increase/decrease: +/-
Calibration: F3
.. GlobalContext::context() provides a global context that is not
tied to an athlete or MainWindow.
.. At present it just offers signals for config changes but will
likely see more context move across as the application preferences
and athlete configuration are separated as we enhance support
for multiple athletes.
Import Texts from Erg files in TrainerRoad format, Zwo files and
from Lap names in json files.
Display texts on TrainBottom for both, erg and slope mode, at the
corresponding time/distance for the specified duration.
Export Texts in erg, mrc and zwo formats.
Fixes#1118Fixes#2967
Prerequisite for #2098
Since they reset the brackets, defeating their use by wattsAt and
forcing all searches start from the beggining, and generating
problems with ErgTimeRemaining, which depends on rightPoint.
This problems was introduced by 1402f6ad6aFixes#3491
This is a clean up to remove conditional compilation for all Qt versions
older than the last known to work: Qt 5.9 with Qt WebEngine and Qt Charts.
Includes an update note to INSTALL documents.
Elevation widget was showing progress based on distance, which is workout distance and didn't accout for distance change due to skip forward/skip back.
Add routedistance to realtimedata so elevation widget can access it
elevation using routedistance to show progress
Fix uninit iterator in elevation widget paint
Draw route distance in elevation widget
After this change:
QtMacVideoWindow.h is used only for native macOS video options:
GC_VIDEO_AV (incomplete)
GC_VIDEO_QUICKTIME (obsolete)
Otherwise standard VideoWindow.h is included with the same options for
the three supported OS:
GC_VIDEO_NONE: placeholder for no video, currently used for macOS builds
GC_VIDEO_VLC: basic video control plus videosync, macOS experimental
GC_VIDEO_QT5: basic video control only, macOS experimental
Overlay Widgets only works on Windows with VLC.
Tested with VLC 3.0.8 on the 3 Operating Systems.
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.
Add support for a generic set of VO2 measurements:
* Respiratory Frequency
* Respiratory Minute Volume aka Ventilation
* Volume O2 consumed
* Volume CO2 produced
* Tidal Volume
* FeO2 (Fraction of O2 expired)
* Respiratory Exchange Rate (calculated as VCO2/VO2)
Make the new metrics usable in TrainView, and store VO2 data as XDATA
using the same pattern as for HRV data.
Add support for VM Pro by VO2Masters
The VM Pro is a BLE device, so support is added in the BT40Device class.
Since the device requires some configuration in order to be usable, such
as the size of the "User Piece" a special configuration widget is added
and shown in a separate window when the device is connected.
This window is also used to set a number of useful settings in the
device, and to show calibration progress. There's also a detailed log of
the status messages shown, and this can also be saved to file.
Allow notifications from RealtimeControllers and devices in the
notification area of Train View. In order for devices to display
information in the notification field in TrainBottom the signals need
to added and propagated from from device level via RealtimeController
to TrainSidebar and finally TrainBottom.
Fix an issue with multiple BT40Device per actual device
Currently on MacOS there will be multiple BT40Device per actual device,
since the QBluetoothDeviceDiscoveryAgent::deviceDiscovered() signal is
emitted multiple times with e.g. updated RSSI values. Avoid this by
checking the previously created devices first.
MacOS doesn't disclose the address, so QBluetoothDeviceInfo::address()
can't be used there, instead deviceUuid() is used which is instead only
valid on MacOS.
Revised code in VideoSyncFile::parseTacx to build syncpoint list with correct distances
when speed varies between two points
Revised code in VideoWindow::telemetryUpdate to interpolate position between 2 sync points.
Also do not update video if paused or not running.
Revised code in VideoWindow::startPlayback to set a minimal rate to start if video is
controlled by syncfile. This avoids the initial "rush" that otherwise happened and
makes for a smoother start.
Also reset distance to 0 on start.
As the rlv length now more accurately matches the workout length, we also need a check in
TrainSidebar::guiUpdate that will terminate the workout if the end of the video is reached.
.. ErgFile now supports gpx format as well as .erg,.mrc et al
.. Location data is include in realtime data and passed through
.. the CSV file format has been fixed to record GPS with higher precision
Fixes#3021Fixes#3024
* train: add support for serial daum devices
Add support for daum devices connected via serial port.
Such device could be:
- Daum Vital
- Daum ergo_bike series
* ergo_bike_2002
* ergo_bike 4004 TRS
* ergo_bike cardio
* ergo_bike vita
* ergo_bike fitness
The only device I own is a Daum Vital, therfore this is the only device
that is known to work correctly.
The default behaviour is to send the load to the device only once to
allow the user to interact with the device. The profile field is used
to pass a _force_ flag in form of a string containing the word _force_.
Doing so will cause the implementation to send the load to the device
every _poll interval_ (default 1s), except the training is paused.
Signed-off-by: Florian Nairz <nairz.florian@gmail.com>
* train: daum: fix unsigned/signed compare mismatch and add return value
.. record hrv R-R data to .rr file in the "records" folder when
R-R data is available in train view.
.. next commit needs to read it in and save to XDATA
.. collect R-R data from ANT+ devices and deliver to
the train sidebar.
.. commit 2 needs to save to a file when recording a
workout in train view
.. commit 3 needs to import the R-R data into XDATA when
importing a train view CSV file
Support use of Imagic steering frame to scroll training display
Implemented as an optional extra as it is slightly less
self-contained than the basic device support.
.. 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.