When computing virutalspeed based on slope, altitude, etc, total weight is relevant, specially in up and down hills
It was using 10kg plus the athlete weight. Now, it considers configured bicycle weigth. Not very relevant, but consistent with the data GH has for training
.. we cannot pass wide strings to the 'printd' debug macro
since it uses printf not wprintf. Not a major problem
in this case since it is just a debug statement.
introduced in previous commit that fixed crashes
when embedding python v3.11 or higher
.. for numerous reasons the font scaling on MacOS should be slightly
less than for other platforms to be in keeping with the native
systems font selections
.. instead of trying to create a font and use exactMatch()
.. this is faster and also avoids a qt-bug on MacOS for
QFont::exactMatch() that keeps recurring
.. what dpi scaling and font size are we using. helpful for
understanding how the ui is reacting to different resolutions
and OS specific settings for scaling
.. default font scaling wasn't working (it was always 1.0). This is
now fixed and means fonts are scaled so that GC always looks the
same.
For some users the fonts will appear too large, in this case they
can reduce the font scaling to suit their own preferences.
.. a button on the config dialog to reset appearance settings
to default values. Will be useful when fonts go squiffy
of the user changes the resolution of their display.
.. The default appearance settings on new install or directly
after and upgrade are terrible and create a poor impression
for new users
.. This commit fixes up scaling, font selection and themes so
that for a new install or directly after upgrade they are
set to defaults that are sensible for the current release
.. It is expected that these defaults will change and extend as
we implement new features and the UI evolves- so these should
be used as a basis for defaulting in the future.
.. A second update is required to resolve issues with scaling in
overview charts dependant upon the screen resolution
Cumulative changes from v3.6-RC4
dbd33465c Update FIT SDK to 21.105
708d8744f Support larger font scaling
c85dab80a Skip previously imported files on Auto-Import (#4347)
1ecc6f9ec Python - Add compare support to activity series (#4349)
f0c9f12b4 FitRideFile - Identify Pulse Ox field
ab337f165 WorkoutWizard - Remove references to FTP and CP60
00d09af48 Highlight current selection in Train and Trends (#4320)
e7b9275a3 Update Italian translation
fdb35bf74 Athlete tab colour fix (#4257)
e32eabc10 Update German translation
[publish binaries]
.. as 8k displays become more popular and affordable we need to
support greater font scaling - we now scale up to x5 the
default font size
This should be good for devices well over 8k resolution but
does highlight some limitations with Qt widgets and maximum
sizes they support internally.
If the importable file (after export when inside a .zip/.gz archive)
is present in imports files it means it was previously imported,
so it is skipped on Auto-Import for better performance and to avoid
re-appearance of deleted activities still present in the source folder.
Fixes#3696Fixes#1892
All activity functions working with data series,
both standard and xdata, now include an optional
compareindex=-1 parameter.
When compare mode is enabled compareindex parameter
is used as an index to get data for the corresponding
compare item, be an activity or an interval.
Sample chart contributed by Marcen at the users forum
Fixes#4346
Just a few changes from RC4:
- Updated German, Italian and Spanish translations
- Better contrast in Athlete Tabs when using dark colors
- Better contrast for selected items in Trends/Train sidebar
when using dark colors
- Clarify texts in Relative Wattage Workout Creator
[publish binaries]
* Use wchar when 2 bytes charachers are used
* Mark provisional parameters as UNUSED
* Static cast OR select appropriate data type
* Fill up comment with missing parameter
---------
Co-authored-by: Alejandro Martinez <amtriathlon@gmail.com>
Change on select bg and fg colors for Trends and Train,
currently are barely/no noticeable on Windows and macOs
when using dark colors.
---------
Co-authored-by: Alejandro Martinez <amtriathlon@gmail.com>
.. the original behaviour is reverted, which is not ideal but
does not cause rendering issues on Linux/MacOS and is compatible
with searchbox usage on dialog widgets.
.. any updates to the toolbutton styling will need to consider
a) placement on toolbar and dialog widgets
b) platform specific considerations across Linux/Windows/MacOS
* Corrects Athlete QTabBar tab colours to match NewSideBar,
abstract on select background color selection from NewSideBar
to Colors for reuse in MainWindow
* Fixes dropMenu visibility within the Filter/Search Box on Dark Themes
---------
Co-authored-by: Alejandro Martinez <amtriathlon@gmail.com>
- DataProcessor primary key is english name,
but localized name is displayed in combobox
- tr() macro only works on string constants
- make all messages translatable
- remove unused messages
To better match the new BatchProcessing dialog
- Python DPs are listed together with builtin processors
to be executed like parameterless built in DPs, with
option to cancel.
- They also appear under the Python Fixes submenu, but in
this case they also can be edited.
Batch Processing - Delete, Data Processors & Export
Extension of Batch Export dialog to include other operation on multiple activities:
- run data processor (Builtin or Python)
- delete (after confirmation)
Co-authored-by: Alejandro Martinez <amtriathlon@gmail.com>
Data Processors running on import are applied before the activity
is added to RideCache and metrics are computed, this behavior is
by design, likely to optimize resource usage on bulk import.
So activityMetrics API is not available; a new getTag API was
added for this case and setTag/delTag/hasTag changed to work
in this context too.
When the Python fix is executed on activities already in the cache
either via Edit menu, Filters or other Python Fix changes are
notified via the corresponding RideItem.
Fixes#4095
[publish binaries]
[publish binaries]
Cumulative changes from RC3
402edf5 Stop signal processing during resetPerspective()
64386bc Perspective Selector Sync on switch Athlete tabs
b6fae05 Revert "Keep Perspective Selecto synced when switching athletes"
9eb8138 Revert "Fix strange behaviour when changing views"
0ddea94 Fix strange behaviour when changing views
88246a8 Overview Chart - Update metric pointer in tiles config
46bfab5 Overview - Use sport instead of isRun/isSwim
663bde0 Update Spanish translation (#4322)
30895b0 Update translation files to include latest strings
af21c35 FIT Files - Update sport list and sub sports (#4315)
68c7954 Add test FIT file from Garmin 945 swim with RR data
dfe572c Collect R-R data from Garmin HRM swim (#4319)
ef0eac8 Estimator - Use normalized Sport names
9531acf Remove Garmin devices already included in latest FIT SDK
523d2d1 Update FITmetadata.json to FIT SDK 21.94
bfa4b4b DataFilter - Metric aggretation honors AggregateZero and Count
c65f313 Revert "DataFilter - use RideCache::getAggregate continuation"
e95d116 DataFilter - Avoid crashes when no ride is selected
3c3d202 Fix DataFilter use of PowerIndex
cc5eaf4 Estimates and Performances - Generalize to any sport with power data (#4307)
abb69b8 DialWindow - Fix rolling average initialization
841766e DataFilter - use RideCache::getAggregate continuation
afbb43e DataFilter - asaggstring uses RideCache::getAggregate
33ba1c0 FitRideFile - Avoid crashes on multi-sessions from CloudServices
018bd40 FTMS: Add support for Spin Down Calibration (#4073)
4f97bae DOB - display using 4 digits year
dfeb853 macOS plist - Add required BTLE keys for newer versions
2a99c87 Python 3.7.15 AppImage is no longer available, upgrade to 3.7.16 (#4299)
0296693 Workout Chart - Imperial units support (#4232)
8919eab Map Chart - Update default Tile Servers
7d0e6de Bug Fixes for live map base url and remove erroneous debug message (#3901)
1c5bbec Train - Improve L/R Balance Dial display
8e0b0a6 R/Python API - Sport case insensitive in Athlete Zones
b08e662 Train - Show lap notifications only when available
2c3eabd RideCache - Fix refresh to inclu=de the oldest activity
9c7d1d4 Strava Sync - Tag simulation rides as VirtualRide
53f8f51 Fix memory leak in Python API - part 2
e477b05 ErgDB Download - Decode title to be used as name
3a16d1e Keep Perspective Selecto synced when switching athletes
63d13ba Update Italian translation
f947b6b VideoSync - Distance scaling only applies to CRS workouts
67962bf Fix memory leak in Python API
5f22d12 fix(doc): mention QMAKE_MOVE requirement for bison > 3.7
996ee63 Remove MapQuest API Key from gcconfig.pri.in
a7ad134 Measures CSV Import - Last field can be empty
90172a4 Replace Tracker in default Trends layout
68b70e0 Fix Elevation - Avoid 302 network error
434580e Disable execution of Python DPs from formulas and Python API
cb23914 Honor chart filters in Trends view Histogram and CP charts (#4287)
1941b9a Minimum bison version is now 2.7
.. when switching athlete tabs the perspective selector would
always be reset to the first entry, this update makes sure
we reset to the correct one.
Fixes#4325
The problem was introduce by 3a16d1e, the change in perspectiveSelector
current index triggers currentIndexChanged when the view change has
not been finished, to avoid this we use activated signal and add
a check to do nothing when the index has not changed.
The problem was reported at the forum.
When metric selection changes in tiles config the metric
pointer was not updated accordingly leading to inconsistencies
s.t. a Total metric displayed as an Average metric in Trends
until restart, since at tile creation the correct pointer is used.
* move sports list in a function for other calls
* Decode sport and sub-sport and push into activity tag
* Remove inaccurate comments
* Populate additional sports ID from documentation
* use of standardized RideFile::sport()
Fixes#4312Fixes#4313
[publish binaries]
Cumulative changes from RC3
523d2d1 Update FITmetadata.json to FIT SDK 21.94
bfa4b4b DataFilter - Metric aggretation honors AggregateZero and Count
c65f313 Revert "DataFilter - use RideCache::getAggregate continuation"
e95d116 DataFilter - Avoid crashes when no ride is selected
3c3d202 Fix DataFilter use of PowerIndex
cc5eaf4 Estimates and Performances - Generalize to any sport with power data (#4307)
abb69b8 DialWindow - Fix rolling average initialization
841766e DataFilter - use RideCache::getAggregate continuation
afbb43e DataFilter - asaggstring uses RideCache::getAggregate
33ba1c0 FitRideFile - Avoid crashes on multi-sessions from CloudServices
018bd40 FTMS: Add support for Spin Down Calibration (#4073)
4f97bae DOB - display using 4 digits year
dfeb853 macOS plist - Add required BTLE keys for newer versions
2a99c87 Python 3.7.15 AppImage is no longer available, upgrade to 3.7.16 (#4299)
0296693 Workout Chart - Imperial units support (#4232)
8919eab Map Chart - Update default Tile Servers
7d0e6de Bug Fixes for live map base url and remove erroneous debug message (#3901)
1c5bbec Train - Improve L/R Balance Dial display
8e0b0a6 R/Python API - Sport case insensitive in Athlete Zones
b08e662 Train - Show lap notifications only when available
2c3eabd RideCache - Fix refresh to inclu=de the oldest activity
9c7d1d4 Strava Sync - Tag simulation rides as VirtualRide
53f8f51 Fix memory leak in Python API - part 2
e477b05 ErgDB Download - Decode title to be used as name
3a16d1e Keep Perspective Selecto synced when switching athletes
63d13ba Update Italian translation
f947b6b VideoSync - Distance scaling only applies to CRS workouts
67962bf Fix memory leak in Python API
5f22d12 fix(doc): mention QMAKE_MOVE requirement for bison > 3.7
996ee63 Remove MapQuest API Key from gcconfig.pri.in
a7ad134 Measures CSV Import - Last field can be empty
90172a4 Replace Tracker in default Trends layout
68b70e0 Fix Elevation - Avoid 302 network error
434580e Disable execution of Python DPs from formulas and Python API
cb23914 Honor chart filters in Trends view Histogram and CP charts (#4287)
1941b9a Minimum bison version is now 2.7
This reverts commit 841766effb
since it provokes crashes in some Trends Overview charts.
TODO: fix aggregation to consider AggregateZero and count
properties of metrics.
[publish binaries]
Cumulative changes from RC3
e95d11671 DataFilter - Avoid crashes when no ride is selected
3c3d2024a Fix DataFilter use of PowerIndex
cc5eaf418 Estimates and Performances - Generalize to any sport with power data (#4307)
abb69b8fb DialWindow - Fix rolling average initialization
841766eff DataFilter - use RideCache::getAggregate continuation
afbb43edd DataFilter - asaggstring uses RideCache::getAggregate
33ba1c03e FitRideFile - Avoid crashes on multi-sessions from CloudServices
018bd404e FTMS: Add support for Spin Down Calibration (#4073)
4f97bae97 DOB - display using 4 digits year
dfeb8532a macOS plist - Add required BTLE keys for newer versions
2a99c8762 Python 3.7.15 AppImage is no longer available, upgrade to 3.7.16 (#4299)
0296693dd Workout Chart - Imperial units support (#4232)
8919eab5b Map Chart - Update default Tile Servers
7d0e6de0b Bug Fixes for live map base url and remove erroneous debug message (#3901)
1c5bbecf1 Train - Improve L/R Balance Dial display
8e0b0a67a R/Python API - Sport case insensitive in Athlete Zones
b08e662c9 Train - Show lap notifications only when available
2c3eabdd8 RideCache - Fix refresh to inclu=de the oldest activity
9c7d1d4f3 Strava Sync - Tag simulation rides as VirtualRide
53f8f5102 Fix memory leak in Python API - part 2
e477b05a9 ErgDB Download - Decode title to be used as name
3a16d1ecc Keep Perspective Selecto synced when switching athletes
63d13ba9e Update Italian translation
f947b6bd3 VideoSync - Distance scaling only applies to CRS workouts
67962bfff Fix memory leak in Python API
5f22d12a6 fix(doc): mention QMAKE_MOVE requirement for bison > 3.7
996ee63cd Remove MapQuest API Key from gcconfig.pri.in
a7ad1346e Measures CSV Import - Last field can be empty
90172a4a6 Replace Tracker in default Trends layout
68b70e0e4 Fix Elevation - Avoid 302 network error
434580ee8 Disable execution of Python DPs from formulas and Python API
cb23914a5 Honor chart filters in Trends view Histogram and CP charts (#4287)
1941b9af7 Minimum bison version is now 2.7
Weekly estimates and performances are precomputed for any sport
with power data, not just Bike and Run.
In Trends view both LTM charts and DataFilter select sport based
on applied filters: when all activities are from the same sport,
that is used to select estimates and performances, otherwise
Bike estimates and performances are used for backward compatibility.
This reverts 1a285d1050
For consistency and simplicity, getAggregate honors AggregateZero
and count properties of metrics, beside some special cases.
Fixes#4302
TODO: aggmetric and aggmetricstrings likely have a similar problem.
[publish binaries]
Cumulative changes from RC3
018bd404e FTMS: Add support for Spin Down Calibration (#4073)
4f97bae97 DOB - display using 4 digits year
dfeb8532a macOS plist - Add required BTLE keys for newer versions
2a99c8762 Python 3.7.15 AppImage is no longer available, upgrade to 3.7.16 (#4299)
0296693dd Workout Chart - Imperial units support (#4232)
8919eab5b Map Chart - Update default Tile Servers
7d0e6de0b Bug Fixes for live map base url and remove erroneous debug message (#3901)
1c5bbecf1 Train - Improve L/R Balance Dial display
8e0b0a67a R/Python API - Sport case insensitive in Athlete Zones
b08e662c9 Train - Show lap notifications only when available
2c3eabdd8 RideCache - Fix refresh to inclu=de the oldest activity
9c7d1d4f3 Strava Sync - Tag simulation rides as VirtualRide
53f8f5102 Fix memory leak in Python API - part 2
e477b05a9 ErgDB Download - Decode title to be used as name
3a16d1ecc Keep Perspective Selecto synced when switching athletes
63d13ba9e Update Italian translation
f947b6bd3 VideoSync - Distance scaling only applies to CRS workouts
67962bfff Fix memory leak in Python API
5f22d12a6 fix(doc): mention QMAKE_MOVE requirement for bison > 3.7
996ee63cd Remove MapQuest API Key from gcconfig.pri.in
a7ad1346e Measures CSV Import - Last field can be empty
90172a4a6 Replace Tracker in default Trends layout
68b70e0e4 Fix Elevation - Avoid 302 network error
434580ee8 Disable execution of Python DPs from formulas and Python API
cb23914a5 Honor chart filters in Trends view Histogram and CP charts (#4287)
1941b9af7 Minimum bison version is now 2.7
[publish binaries]
Cumulative changes from RC3
2c3eabdd8 RideCache - Fix refresh to include the oldest activity
9c7d1d4f3 Strava Sync - Tag simulation rides as VirtualRide
53f8f5102 Fix memory leak in Python API - part 2
e477b05a9 ErgDB Download - Decode title to be used as name
3a16d1ecc Keep Perspective Selecto synced when switching athletes
63d13ba9e Update Italian translation
f947b6bd3 VideoSync - Distance scaling only applies to CRS workouts
67962bfff Fix memory leak in Python API
5f22d12a6 fix(doc): mention QMAKE_MOVE requirement for bison > 3.7
996ee63cd Remove MapQuest API Key from gcconfig.pri.in
a7ad1346e Measures CSV Import - Last field can be empty
90172a4a6 Replace Tracker in default Trends layout
68b70e0e4 Fix Elevation - Avoid 302 network error
434580ee8 Disable execution of Python DPs from formulas and Python API
cb23914a5 Honor chart filters in Trends view Histogram and CP charts (#4287)
1941b9af7 Minimum bison version is now 2.7
This boundary error provokes the cache entry for the oldest
activity don't be refreshed on full cache refresh, only
when the activity is imported or opened (s.t. selecting it
in Activities View).
For most users this may be uneventfull, but if the oldest
activity becomes dirty, a full cache will happend on each
following start, until the oldest activity is opened and
it may explain the behavior reported ocasionally at the forum
and recently in #4297
Py_buildValue does not steal references, leading to an incorrect
reference counter and therefore resources not freed by the
garbage collector.
Contributed by Joachim at the forum.
Title is html encoded, we need to decode it for readability and,
since name is used as a filename, replace "/" by "-".
This still has some limitations s.t. duplicate titles, but they
have easy workarounds for the user and they don't justify to change
the database schema now in my POV.
PyDict_SetItemString does not steal references, leading to an incorrect
reference counter and therefore resources not freed by the garbage collector.
Contributed by Joachim at the forum.
[publish binaries]
Metadata and metrics don't work in these contexts as documented
in #4095 so we disable them to avoid confusion until the root
issue is solved.
Fixes#4288
Just appending the file lists doesn't work like addFilter
does, isfiltered and files are added as optional parameters
to Pespective:filterlist so they are accounted for when
the list of files is generated.
Fixes#4285
- Crash on syntax error happened on <leaf> destructor and the cause
was tokens declared as <leaf> but not creating a leaf, to avoid
this a new <string> type without destructor was added for them.
- Warnings indicated semantic value not set for some rules due to
the lack of $$ = $1, likely bening, but lets avoid it.
This is a continuation of 523ffcc, %destructor bison
directive is used to clean and delete Leaf nodes
allocated and discarded by the parser.
Hopefully fixes#4249
This started to happen after #4277, problem is when parsing fails
treeRoot can point ot non Leaf objects. This does not happens when
parsing from the DataFilter constructor since treeRoot is forced
to NULL on errors, this commit does the same for check and parseFilter.
Remaining problem is the memory leak in these cases, which are frequent
when editing filters in User or LTM charts as explained in #4249
The crash documented in #4249 was related to the conversion of
Leaf of type Symbol to Function when () are found afterwards.
This is fixed in this commit, but more testing is necessary to
see if there are other cases.
clearFilter - delete root Leaf
Leaf constructor: initialize left,right and cond to null pointers
Leaf::clear avoid crashes when called with a null pointer parameter,
and release memory in all cases allocated in the parser
TODO: still crashes if called from DataFilter destructor, see #4249
Missing from RC2 build, also include the fix to avoid crashes when
myPerspective is not set in existing charts and default layouts
without R charts to avoid #4267 for newly create athletes.
[publish binaries]
This was reported at the forum and it is reproducible with
the supplied home-perspectives.xml, it was likely generated
by an older version, but lets get defensive just in case.
- DragDropMode is changed from InternalMove to DragDrop in RideTreeView,
this enables compare of activities again
- DragDropMode is changed from InternalMove to DragDrop in SeasonTreeView,
MoveAction is made the default action and dragEnterEvent ignores
events other than move or from other origins. This avoids compared
date ranges loosing their names.
- DragDropMode is changed from InternalMove to DragDrop in IntervalTreeView,
MoveAction is made the default action and dragEnterEvent ignores
events other than move or from other origins. This avoids removal
of compared intervals from the intervals list.
This solution was contributed by Joachim at the users forum.
Fixes#3622
[publish binaries]
Items are not editable, so it is not used in the normal flow,
and it worsen a bug which clears the date range name in the item
when dropping on compare pane commiting the change to seasons.xml
This allows to request all points at once since post api has
no limits according the documentation.
Break logic is preserve just in case we need it in the future.
Fixes#4261
MapQuest API reaches EOL on Aug-31, let's test the replacement
in all the supported platforms.
Reveal Controls are disabled in this build for all charts,
with Show Console on chart settings for R and Python charts.
[publish binaries]
Since MapQuest elevation service reaches end of life on aug-31,
it is replaced by Open-Elevation public API with minimum changes.
TODO: use Post instead of Get to request more points at a time
Fixes#4206
.. clarify how to make updates in the README
.. replace the fit_example.h from the current SDK
.. added Garmin devices not yet supported in the SDK to
the nongarmin.json file
.. updated the makefile to use python3 and update when
the python program is changed.
For R and Python charts the Show Console setting is now
part of regular settings, and it is replaced by a warning
label when R or Python are disabled to help users.
Since for remaining charts reveal controls are redundant,
they are globally disabled in Perspective class.
TODO: remove all reveal code to simplify charts,
eventually after v3.6 release to minimize risks?
Fixes#4256
[skip AppVeyor]
To avoid rebuild when after_success is cancelled,
so restarting the job can complete the packaging.
Drawback is we need to clear the cache to rebuild
[publish binaries]
.. second release candidate with no open defects in the
backlog for 3.6 this is likely the last release candidate
before we release (unless we find a major defect that
needs to be corrected and tested).
- General is what we have with updated default Trends Overview minus
CP related charts moved to Power Duration perspective.
- Power Duration includes CP related charts in previous layout plus
some useful charts from CloudDB for modelling and profiling.
- Triathlon includes a multisport Overview, TriScore PMC, VO2 Scores
for Bike and Run, CV chart for run and swim and Run profile for now.
- Measures include Weight, HRV and Nutrition charts.
Complements 5e4189f and fixes#3899
Run perspective includes Power analysis, Swim includes HR,
and General defaults for Bike and remaining sport.
Map is an experimental tiled perspective including Map and
Performance charts, intended to create and analize intervals.
To enable workout preview in the more specific layout,
provided the current perspective allows switching,
to avoid unwanted swithing when using the Workout Editor.
Reorder perspectives in default layout.
So workouts with GPS data but no video can use LiveMap chart,
without messing with basic slope workouts
Update default layout to include a perspective for each mode
Part of #3899
.. since it is a generated file lets symlink FITmetadata.json
to the source maintained in util/fit to save having to copy it etc.
.. also removed unused variable 'write' that was left behind from
some unused code during development
.. we try and download the latest from the website when
the first FIT file is opened.
Since importing data is generally not a time critical
action and we only try for the first file this is more
appropriate than checking at each launch.
.. the version number is not checked, it is assumed the
version on the website will always be the very latest.
.. the file is now baked in to the GC binary and loaded
the first time a FIT file is parsed.
.. the getManuProd() function has been changed to use the
loaded metadata to derive product descriptions.
.. we still need to update the code to check the version
available a www.goldencheetah.org and use it if it is
newer than the one cached/baked in.
Different warnings for 2 cases:
- When the imported filename already exists in the library
- When the copy fails for other reasons
They were merged with different messages.
Add erg2 extension as one of admited workout formats to avoid
Scan Workouts removing all referenes to them.
Also uncheck Select All setting by default since currently
there are hundreds of workouts and downloading all of them is unlikely
what the users want to do, besides they are not that easy to remove.
events(date|name|priority|description) returns a vector with the
required field for each event in the current date range span.
For example, to create vertical lines in a Trends User Chart:
sapply(events(date), { annotate(vline, events(name)[i], solid, x); });
When GPS data was available before the first distance tick,
includes test file contributed at the forum.
Fixes#4251
Also reverts the TCX part of 1f094f5 since it is incomplete,
and not such a good idea anyway.
.. a well known issue with deletion of datafilters that
was a side-effect of the old metric refresh code and
threading.
.. now the computation no longer uses QConcurrent::map
the issue with deletion of the datafilter is removed.
.. have tested with metric refreshes and removal and
addition of new user metrics.
.. more testing is required to be sure the problem is
now completely gone.
.. data point allocated twice on heap in appendOrUpdatePoint
which is always called by RideFile::append
.. this leak has been present since v3.4 (!)
Fixes#4248
.. lets not allow the user to call a user defined function
called "count" - despite wanting it for user metrics.
.. terrible flaw in the user metric design, forcing users
to define a function that conflicts with a builtin.
.. this means we can use the count() builtin function
in user metric code, which is kind of important !
.. the template user metric defined a count { } user metric
function that also used the builtin count() function, but
at runtime the user defined function is called causing an
infinite recurse.
.. it is right that user metrics can override builtin functions
but is very unfortunate that the count function is named this
way.
.. most users likely will never encounter this- but will cause a
SEGV stack overflow.
.. precious commit has a significant improvement in performance
since it reduces total CPU activity not related to metric
calculation dramatically.
.. this commit is a minor tweak to ensure updates are shown
relative to the number of activities- so instead of giving
visual feedback after every 100 activities we give feedback
after every 10% of the activies are processed.
.. remove Qt5Concurrent.dll from windows installer as
it is no longer required.
.. remove errant class member in RideCacheRefreshThread
that was added then unused during development.
.. since Qt5.15 QtConcurrent::map() will use all available
worker threads in the global thread pool. And this causes
a deadlock in the GUI since QGraphicsView uses threads to
manage updates.
.. we now manage the metric refresh via RideCacheRefreshThread
and use at most 50% of the overall threads available in the
global thread pool.
.. Have tested obvious triggers such as metric schema updates
and user metrics being changed, but more testing is needed.
Fixes#3611
When a segment is dropped in an empty compare pane
the user is given the choice to add matching segments
from other activities, after this change only activities
of the same sport are considered.
[skip AppVeyor]
Fixes#4196 but may trigger #3611, this is a test build
intented to help on release version selection.
Upgrade Python AppImage to 3.7.13 since 3.7.12 is no longer available.
[publish binaries]
Currently only Train layout is there, so on Reset Layout
the included layouts will be used for remaining views,
but these are more recent than the ones on v3.5 folder.
Part of #3899
Mutual exclusion was held while the training file is imported after
workout stop, this was a mistake introduced in my previous commits
since it can lead to deadlocs. Sorry.
.. start of release cycle, pushed out to get the recent
Withings API update out.
standard config still needs to be fixed up before
we move to the final release
[publish binaries]
This is a continuation of 3db1839, we need coordinate access to
rr and vo2 files at stop time, but there is no need to limit
concurrency between rr and vo2 recording.
rr/vo2 files are opened and appended in response to ANT+/BTLE
initiated signals but closed in response to a GUI event,
there has been data loss reports in the forum likely due to
concurrency problems between different threads, a QMutex
was added to coordinate access to these shared data structures.
R and Python API: add GC.intervalType(type=1) function to get the
localized interval description to be used as parameter for intervals.
Formulas: return the enumerator for intervals function while intervalstrings
continue to return localized type description.
Fixes#4114
1. Typos in spelling (some missing accents, keyboard typos, etc.) fixed
2. Non correct uppercase spelling in Spanish fixed
3. Translation of almost all untranslated source texts
Contributed by @jgpallero
New Garmin devices allows to enter RPE and Feel after some activities,
when these fields are present in FIT files they are used to set
corresponding metadata fields.
Fixes#4124
.. when creating a user chart or a user metric the template
code included calls to sample{}
seemed odd to warn it was a serious performance issue
whilst at the same time using it in the template.
.. we should just deprecate sample{} altogether, will likely
make that change before the release of v3.6
.. It is possible to select a background
color for a user chart and an overview tile.
the user should be encouraged to use a
standard color if they intend on sharing
the chart with others.
.. A couple of new standard colors are also
introduced for alternate and vibrant
overview tile backgrounds
.. Ironically, one of the most visually
appealling approaches is to make one or
more tiles in an overview have the same
background as the overview.
.. Will push some tweaks to the new standard
colors for each theme separately.
.. let folks supply the number of decimal places to round
a number (or vector) by.
e.g. round(config(weight), 1) will round weight to one
decimal place; 75.55kg rounds to 75.5kg.
.. make it possible to add a blank overview chart, which is
useful when building your own dashboards
.. at the same time added a minium scene columns, so when
building a dashboard you don't get a huge item as you
add things, its scaled to a default of 5 columns.
.. will add options to customise the minimum columns so
users can adapt if needed.
.. whilst adding options to the window registry I also
fixed the fact that the old summary was replaced by
overview but with an incorrect window type that meant
it didn't get retained.
registerItems is now a static member of OverviewItemConfig called from main,
and GCColor::setupColors() is called a second time, both after the translator
is installed to enable translations.
Fixes#4089
.. this time lets just set the contents margins before we
show. This is kinda ok, and avoids having to follow every
path from lazy load to selection- since we always get a
show event at the end.
.. switch train view perspective when connection is established
but before we start.
if a media file is selected we choose a video perspective
otherwise we look to see if the mode is erg or slope and
select the perspective that meets that.
by choosing to switch on connect we don't jump around too
soon (especially if editing) but does mean that those
folks that like to autoconnect to devices will have to
select their view manually.
Fixes#4104
.. add configuration of switching mode for train view perspectives
the next commit will add the code that switches when a
workout or media is selected.
.. improved performance when switching between tab/tiled mode
which is especially important in train view (and also when
resizing or entering/exiting full screen mode there).
.. removed the title at the top of a chart, when the same info
is already in the name of a tab, saving some real estate.
.. Dial window stop setting fonts via pixel size (its horribly
slow on Qt with hi-dpi displays
.. some other perspective fixups for performance and also added
some debug for stack tracing (disabled in the commit).
.. the view (e.g. trends view) should set its tab/tile status on
the basis of the current perspective.
this fixes an issue where toggle style got out of whack with
what was on screen.
.. train view resize performance was terrible because each time
a telemetry item was resized it would recalculate the right
pixel size for the font.
this was only a problem in hidpi displays, but these are
becoming more and more popular.
.. standard colors now belong to groups:
* Chart - chart decorations e.g. grid lines
* Data - data series e.g. Power
* Gui - Gui elements e.g. toolbar background
.. when selecting colors in user and trends charts we
now filter out any colors that are not data related
to make it easier for users to find a standard color.
.. when enter/leave full screen mode the view sidebar is
hidden and shown to increase screen real estate (and
especially useful in train view).
.. since the user may want to show/hide for other reasons
the view menu now also has an option to show/hide the
view sidebar selector too.
.. the renumbering of columns removed empty columns. This was not
desirable since in some instances where spanning tiles are used
the user may have deliberately done this.
.. thanks to Alan Benstead at the forums for an example chart to
test this fix against.
.. when a spanning tile moves the layout needs to restart to
take into account its new position (since it will displace
other tiles).
.. to enable us to restart the layout we needed to refactor
the updateGeometry() method to separate out the creation
of animations from layout changes (because an item may be
moved several times as spanners take precedence).
.. tile column numbers also need to be renumbered from 0 when
arranging since it is possible to get out of sync as items
are dragged around.
.. this refactor should also make it slightly easier to fix
any other layout tweaks (now the previous issues have been
resolved).
This reverts commit a023e0efc0.
There are a number of issues with this commit that need
more work and further testing, most notably:
* moving an item causes jarring and unneccessary updates
* moving an item to before the first column causes a SEGV
.. when a spanning tile moves the layout needs to restart to
take into account its new position (since it will displace
other tiles).
.. to enable us to restart the layout we needed to refactor
the updateGeometry() method to separate out the creation
of animations from layout changes (because an item may be
moved several times as spanners take precedence).
.. this refactor should also make it slightly easier to fix
any other layout tweaks.
.. annoying heritage issue with metric names that contain an
apostrophe (') breaking the parser. So we need to add them
as special cases to the lexer.
Fixes#4057
Add support for FTMS devices with Power and Slope control plus Power, Cadence and Speed telemetry
Implement a priority for controllable devices
Avoid connecting Cycling Power Service if there's another source
When CdA is not set, it is estimated at every sample, using cadence. Beforehand, it was computed with the first sample
Co-authored-by: Peret <mail@mail.com>
.. a new checkbox setting for the user chart to refresh when interval
selection changes.
since there is a performance overhead the user must select this
if they are plotting intervals-- most of the time it is not needed.
.. the defaults for opacity was set to 1% and line width of 0px
when adding a series to a user chart were inappropriate.
Some users wouldn't notice and wonder why curves rendered in
a ghostly manner.
Also made worse by the fact that when opengl rendering is
enabled for a series (fast graphics) the opacity and width
are ignored.
This led to a false diagnosis of rendering issues
when the root cause was the configuration of the curve.
.. disable forcing of ANGLE for rendering, which helps where folks
have multiple GPUs but cannot configure them for use in GC.
.. some reports in the forums of issues related to this.
.. add a linear regression to the plot for the current series.
style is solid, dash, dot, dashdot or dashdotdot
"colorname" is a color e.g. "red" or a hex rgb "#fefefe"
DataFilter evaluation requires an activity to get context,
so don't try to evaluate one when there is no current activity
to avoid crashes. It is a marginal edge case without practical
value, but better don't crash when a new user is playing around.
Reported at the forum, easily reproducible creating a KPI tile
in Trends Overview Chart.
The added check is already present in remaining evaluate versions.
.. annotate(hline|vline, "text", style, value) to add a horizontal or
vertical line to the plot for the current series on a UserChart.
style is one of solid, dash, dot, dashdot or dashdotdot which are
the standard Qt pen styles for drawing lines.
I also took the opportunity to refactor how annotations are passed
from the datafilter down to the generic plot. This should make it
far easier to add annotations in the future.
.. fixed a SEGV in the voronoi annotation, which was related to memory
management and the sqrt_nsites variable (honestly, I am amazed it
ever worked).
.. labels in Python and R charts are now broken, will fixup shortly when
worked out how it should work (annotations are related to a series).
To enable source file names and line numbers in stack traces
generated after crashes in crash*.log files.
Intended to make crash report from users easier to analyze.
[skip AppVeyor]
Install gsl and srmio from source
Install R and awscli using official installers
Disabled libsamplerate
This is a workaround to avoid a brew update which would force
the use of Qt 5.15 triggering #3611
[publish binaries]
.. run make in src/doc/doxygen to generate documentation for the
source code in html and latex format.
.. doing this to get some basic docs going, since the codebase is
now so large its getting difficult for even the core team to
remember.
.. the subdirectories generated are ignored (see .gitignore)
[skip ci]
Use --no-verbose in order to avoid having a lot of wget progress
information in the travis logs, since the logs seems to be sometimes
becoming larger than 4 MB which results in aborted jobs.
.. refactor to introduce Generic Plot annotations that
can draw onto the chart scene, but managed by our
own controller so we can add/remove without affecting
or interacting with the QtCharts code.
.. legend item spacing and linewidth is now proportional to the
text height, which resolves the jarring sizes when not scaled.
.. there was a bug related to the height calculation that did not
take into account the space left below the colored line which
made it overlap the text.
.. bracket matching code for ( and ) fixed up as well as adding
support for matching [ and ].
.. helps to highlight errors in code when it starts to get a
little complex.
.. added a new variant for annotations to plot a voronoi diagram
via a datafilter.
the centers are as returned by the kmeans() function so the
x and y values follow each other (i.e. x1 x2 x3 y1 y2 y3)
.. it is ingrated into the userchart and down to the genericplot
for the series it arrives in.
.. next commit will add the drawing code to generic plot.
.. updated to have a more Qt/C++ friendly interface:
Voronoi *test = new Voronoi();
test->addSite(QPointF(2,5));
test->addSite(QPointF(3,2));
test->addSite(QPointF(6,4));
test->run(QRectF());
delete test;
the output is still written to standard out as a
series of points, lines, vertexes and edges. This
was to enable validation against the original
c program.
.. whilst the original functionality is now embedded a
further update will need to convert the output into
a vector of lines to draw.
will do this as part of adding it to a plot as an
annotation.
.. from C to a C++ class.
Moved the original code to a sundirectory for reference and
moved all the global variables and methods into a new class
called Voronoi.
.. the code still needs more work but wanted to remove the global
variables as there were lots and a big risk they interact
with other parts of the codebase and libraries.
.. last commit introduced a compiler error on missing global variables.
the intention here is to take future's algorithm, embed into a class
and add wrappers for user charts / datafilters.
.. kmeans(centers|assignments, k, dim1, dim2 .. dimn)
perform a k means cluster on data with multiple dimensions
and return the centers, or the assignments.
the return values are ordered so they can be displayed
easily in an overview table e.g.
values {
kmeans(centers, 3, metrics(TSS), metrics(IF));
}
.. will look at how we might plot these in charts with either
color coding of points or perhaps voronoi diagrams.
.. with grateful thanks to Greg Hamerly
A fast kmeans algorithm described here:
https://epubs.siam.org/doi/10.1137/1.9781611972801.12
The source repository is also here:
https://github.com/ghamerly/fast-kmeans
NOTE:
The original source has been included largely as-is with
a view to writing a wrapper around it using Qt semantics
for use in GoldenCheetah (e.g. via datafilter)
The original source included multiple kmeans algorithms
we have only kept the `fast' Hamerly variant.
Only the first 10 examples are reported to avoid anomalies log flooding.
This anomalies can be easily fixed using Fix Speed from Distance tool
with moving average windows set to 1.
.. renamed pdf/cdf to pdfnormal and cdfnormal as they returned
a pdf for a guassian.
.. added pdfbeta(a,b,x) and cdfbeta(a,b,x) for working with
beta distributions.
.. save to .gchart when a user chart is on an overview.
rather annoyingly the scaling is preserved which should
ideally be defaulted on import depending upon context.
we should fix that.
.. Create a new tile on an overview by importing the XML .gchart.
The importer checks the chart is a user chart and also that
it was created for the current view (Analysis vs Trends).
.. Data table and Interval Bubble generate and respond to
interval signals like hover and select.
.. a compromise to help users navigate the data when it
is not possible to clickthru for intervals
.. the data table now accepts a new function i {} which
returns the names of the intervals for each row in
a similar way to f {} for activities.
.. time_to_string is for formatting durations, so it will
use as few characters as possible (e.g 10s, 1:00).
since the interval time is a time of day we want the
full hh:mm:ss format.
.. all matches were being returned, which was not the documented
behaviour, nor generally the desired result
i.e.
match(c(1,2,3), c(1,2,3,1,2,3,1,2,3));
would return
[ 0, 3, 6, 1, 4, 7, 2, 5, 8 ]
but should have returned
[ 0, 1, 2 ]
.. there are likely two things users would like to be able to
control that could be added in the future:
- match all occurences (this commit stops that now)
- return NA or -1 for items that are note found
.. hue goes red-yellow-green-cyan-blue-magenta-purple-red
we only really want the first half of that range for our
heatmap, which effectively makes it red-amber-green with
cyan for very low numbers.
As a palette it will make a lot more sense to the majority
of users.
We may look to add multiple schemes, for example limit to
a single color range or brown/blue etc etc.
.. horrible nested scrolling- when in a data table and there
are multiple rows any wheel event will scroll whilst the
mouse cursor is over the table.
.. we do check that the mouse moved too, so if just scrolling
with the mouse wheel it won't trigger until the mouse
is moved (but most folks aren't that steady on the mouse!).
.. if you assign to a vector using indexes it was only setting
with a single value. But it should be possible to assign
a vector and have it repeat
e.g.
a <- c(1,2,3,4,5,6);
indexes <- c(3,4,5);
a[indexes] <- c(9,10);
# a now contains [ 1, 2, 9, 10, 9, 6 ]
.. also as part of the data table click thru, the highlight
that a row can be clicked to navigate to the ride
should only be shown if that row has a file name.
.. both fixups are related to listing PMC data in an overview
data table and allowing click through for the rows that
have a ride associated, the code looks like this:
f {
# find dates that contain rides
ridedates <- metrics(date);
pmcdates <- pmc(BikeStress,date);
index <- match(ridedates, pmcdates);
# returning all blanks for filenames
# except where there is a ride on that date
returning <- rep("", length(pmcdates));
returning[index] <- filename();
returning;
}
.. tweaking the names from the last couple of commits
* to return heatmap values (between 0 and 1) the
Data Table function "h" is now called "heat".
* the data filter function that does the unity based
normalization is renamed from "heat" to "normalize".
.. did this since normalize() is more accurate and
will be more appropriate when adapting data to
use other algorithms in the future.
.. activities legacy program reinstated and also sets the h {}
function for the activity list.
.. the DataOverviewItem::setDateRange() method now calls h {}
if it is present (forgot in last commit)
.. added a heat(min,max,value) data filter function to convert
values to a heat value between 0 and 1
e.g. heat(0,config(pmax),Average_Power)
.. added Utils::heatcolor(x) method to convert a heat value
from 0-1 to a hue/saturation value color
.. the overview program now has another user definable function
called h {} which returns the heat values. If it is not
present no heat coloring takes place.
.. added h {} to the legacy intervals program, it adds the
h {} function but calling heat() with 0 for min and max
which ultimately makes it do nothing-- crucially the
user can adapt the min and max values to meet their
requirements
.. mostly to make using the activities() function a lot
simpler. A parameter can include a block of code that
should be evaluated as a parameter.
e.g:
activities("isRun", { xx <- metrics(date);
yy <- metrics(Pace); } );
this avoids having to declare a function and call it
just so we can pass as a function parameter.
.. it was always rather dodgy, but caused issues when charts
recreated on config changed (like interacts badly with
the setUpdatesEnabled() call.
.. has a nice effect of stopping the jarring repaints too
which were horrible when themes changed.
Fixes#4029
.. aggmetricstrings() and aggmetrics()
data filter functions that return aggregated values as
opposed to all values for the activities.
.. asaggstrings()
data filter function that returns aggregated values for
the list of metrics provided (primarily used in data
tables).
.. the next commit includes an update to the data table
settings tool to use asaggstrings on trends view.
.. lots of problems related to this, notably:
* UserChart is no longer a GcWindow so doesn't have any
properties registered.
* Even if it was the property was not being registered
by GcWindow or GcChartWindow anyway
* The value was not being initialised so checking for
NULL was kinda pointless (groan)
* OverviewItems looked up the property and never found
it, so crashes were avoided by accident.
.. One interesting point that was revealed during testing
and debugging-- the UserChart program does not honor
any filtering EXCEPT for the activity{ } function, which
although it is not by design, is quite useful.
Fixes#4021
.. returns the powerindex for the given power and duration
which can be vectors.
.. useful to transform meanmax power to strengths and
weakness rating.
.. when moving the scaling slider the charts get updated
immediately, this causes a SEGV as charts are deleted
whilst they are being updated.
.. we now block updates whilst critical processing is
happenning to avoid this.
Fixes#4026
.. the side bar, bottom bar and related buttons were still
following a skeuomorphic design that has long since
fallen into disuse.
.. now have a more muted feel with hover/press colors active
on mouse events.
.. moved the whatsthis button to the far right since this
is quite a common placement in other apps.
.. it is noticeable how we use many many different schemes
for hover/pressed colors across the UI- at some point
this should be unified.
.. also deprecated the segmentcontrol.
.. scaling maximum increased to x10 which helps on hi-dpi
displays and the overview
.. slightly reduce the border on overview to make more of
the available screen real estate.
.. default to 5s smoothing for plotting time series (second by
second samples).
.. if smoothing is applied we sample the smoothed data every
3 seconds.
.. this reduces the number of points to plot to a 3rd and has
a significant impact on plot/paint performance.
.. for those users that care about resolution they can set
the smoothing to none, for those that don't they will
get faster performance.
.. regression from 1297d76ee4 where the data table
doesn't update on scrollbar moves.
.. this was because we optimised out unneccessary paints
on mouse moves. But when we move the scrollbar we
need to repaint the data table at the right position.
.. the base class method ChartSpaceItem::sceneEvent() generates
lots of paint events when the mouse moves about, and its
mostly to repaint the top right corner.
.. for user charts this generates a lot of overhead that is
99.99% unneccessary - so we now override this and do
nothing.
.. we know that opengl drivers for windows can be sketchy, so rather
than not use opengl at all we insist on ANGLE at startup.
.. this is experimental and has been included as a single commit
in the hope it will remain, but may be reverted if there are
significant issues.
.. as reported on the forums, translations can rename metric
names inadvertently. We avoid this by using the untranslated
names in datafilter expressions.
.. if a tile moves because it clashes with a spanning tile we need
to repeat the process in case it clashes with another after it
has been moved.
.. previously we moved on the first clash, but ignored any others.
.. when sorting the table we sorted all the columns that are
visible to the user, but not the associated filenames
that are used by clickthru, so clickthru would jump to the
wrong activity.
.. added configChanged() to base class
.. added calling configChanged() when preferences are
changed and when the items config is updated.
.. updated MetaOverviewItem to use this, but also need
to update the Zone and Best tiles too.
.. the irony that adding a __LAST__ property to ensure we
had well formed JSON made sure it was /always/ invalid.
.. see fd546b4da for impact (almost none, but hey).
.. when adding an overview chart it configures from a .gchart
file built in via application.qrc
.. to update the default config all the developer needs to do
is design using GC then export the .gchart into the
appropriate src/Resources/charts/file.gchart
.. NOTE: the exported file has an errant comma (,) after the
__LAST__ element. This is invalid JSON and should
be fixed. It needs to be removed manually right now
otherwise the JSON does not parse.
.. progressively boldens as you hover and overlays contents
to avoid taking screen real estate and being a distraction.
.. only watches mouse events and ignores wheel events since
these clash with chartspace scrolling.
Fixes#4006.
.. commit 91f2c46 introduced a regression where the selector
is not updated when the perspectives are changed (via
the manage/add perspective functions).
.. this was because resetPerspective() returned if the
athlete/view combination was last used to set the
selector -- we now override this, but only when the
perspectives config is changed.
.. datestring() was using 2 digit years and Overview data table
sorting only expected 4 digit years.
.. datestring() now uses 4 digit years in line with everywhere
else in the code.
.. data table sorting now supports 2 digit years and xx/xx/xx
style dates too (just in case).
.. slightly improved category labels on a bar chart when groupby
and date range is used. Labels for week, month and year are now
specific e.g. 23/5, May and 2021 labels are applied respectively.
.. axis settings updated to enable users to smooth and group by
for data series on the axis.
.. since group by needs to aggregate the series also have a new
config term to define the aggregation method (Average, Total,
Peak et al).
.. grouping and smoothing is applied in UserChart not the Generic
chart or plot, so this functionality will not be available from
Python and R charts (mostly because axis management and config
is done differently).
Fixes#3999.
It behaves as before: current view layout is discarded and default
layout with perspectives is fetched from goldencheetah.org first and,
if not available, baked in layout is used.
Website defaults are not updated yet, so baked in layouts are used now.
Renamed Resouces/xml/*-layout.xml files to Resources/xml/*-perspectives.xml
Removed deprecated Summary from Activities and Trends, and added default Overview to Trends
Added enclosing <Layouts></Layouts> and General perspective with proper type to each one
This provides default layouts for newly created athletes.
We still need to update layouts before release and to enable Reset Layout.
.. along the way renamed AthleteTab related methods in MainWindow
to reflect the last commit renaming the classes.
.. there are also a handful of fixups to SEGV when no ride is
selected in DataFilter (triggered by opening a second athlete
and switching to trends view, which need to recreate the athlete
switch bug that is also part of #3997).
.. and the logic to reset perspectives is changed in MainWindow
with a special method resetPerspective that is called everywhere
but will check the athlete/view combination has not already
been set (to avoid multiple passes).
.. multi-athlete and perspectives need better testing as there are
probably more SEGV in there, and if we fix them we could also
remove the requirement for the opening view to always be Analysis.
Fixes#3997.
.. Tab becomes AthleteTab - since Tab is almost meaningless
TabView becomes AbstractView - since its the base for all the views
there are no functional changes or fixes in this commit.
.. honour the sort order when refreshing (e.g. select new daterange or
a new activity).
.. thin line to separate headings from data to make easier to read.
.. by clicking the header column the user can toggle sorting of
the contents.
.. we try to infer the type of data in the column for sorting which
probably works 80/20, but is better than adding yet more of a
burden on the program that supplies the data.
.. add legacy program to analysis view for an interval table.
.. highlight row in data table when mouse hovers over a row, but
only when not using clickthru, since that already highlights
the row to indicate click is available.
intervals(symbol|name|start|stop|type|test|color|route|selected|date|filename [,start [,stop]])
returns a vector of values for the metric or field specified for each interval
if no start/stop is supplied it uses the currently selected date range, or activity when no date range.
intervalstring(symbol|name|start|stop|type|test|color|route|selected|date|filename [,start [,stop]])
same as intervals above but instead of returning a vector of numbers, the values
are converted to strings as appropriate for the metric (e.g. Pace_Rowing mm:ss/500m).
Both metricname and metricunit now support name, start, stop, type, test, color, route, selected, date, filename,
in addition to metric names and date, to get corresponding localized string.
Example program to build an intervals table in Activities displaying all intervals for selected activity,
similar to the one in RideSummary:
{
names {
metricname(name,
Duration,
Distance,
Pace,
xPace,
Average_Heart_Rate
);
}
units {
metricunit(name,
Duration,
Distance,
Pace,
xPace,
Average_Heart_Rate
);
}
values {
c(
intervalstrings(name),
intervalstrings(Duration),
intervalstrings(Distance),
intervalstrings(Pace),
intervalstrings(xPace),
intervalstrings(Average_Heart_Rate)
);
}
}
Fixes#3626
.. when embedding json in xml element attributes the string
decoding mangles results.
this is because of the way \ and " are handled at each
pass, causing combinations to be lost early when decoding.
This is largely a non-issue, except the user chart config
is stored in perspectives.xml and worse, when embedded on
an overview is encoded as .gcchart (xml) before being
encoded in the perspective.xml.
To avoid this issue, specifically with user charts and
to leave all other json string encoding and decoding
unaffected (e.g. ridefile.json) a new protect/unprotect
method has been introduced.
Utils::jsonprotect2() and Utils::jsonunprotect2() will
still decode older style encoding for backwards
compatibility, but now will translate \ and " in the
encoded string with :sl: and :qu:
This means that, for example, the following substitutions
will be made:
newline (\n) -> :sl:n
cr (\r) -> :sl:r
\ -> :sl:
" -> :qu:
If users add text with these characters (e.g. :sl:) then
it will be decoded to a slash, but it is highly unlikely
they will do this, and if they do, it should be harmless
as these text strings aren't part of the the datafilter
syntax.
Fixes#3996
.. since axis min and max values were not initialised the
visualisation would fail to refresh and was generally
unpredictable.
.. we now set initial values and check when updating.
.. activities("Workout_Code=\"FTP\"", metrics(BikeStress))
A new function that provides an activities filter
to apply as a closure to an expression, following the
same approach as the daterange() function.
In the example above metrics() will only return values where the
activity has a workout code "FTP".
.. unescape datafilter strings since the lexer supports that
but they are not parsed.
.. Only supports \n, \r and \" for now, but that should be
enough.
Formula doesn't change.
When date range is set Trends View is assumed and we use the sport of included
activities with default to Bike (Run for Pace) when mixed, and date is the end
date for the date range.
Otherwise we use activity sport and date as before.
.. click thru from the data row to the trends view to
view it on the activity view.
.. Added a function "f {}" that returns the activity
filenames- the same semantics used in the user chart.
.. the mechanism used in the overview items to click thru
from the itemPaint function is dropped and we now
do it from the mouse release event.
.. see issue #3993 which will get fixed using the same
scheme as this one.
.. when a userchart is embedded into an overview mouse events
do not propagate in their entirety- as a result the legend
widgets do not see MouseRelease (even though they see
MousePress).
So the click to show/hide when hovering over a legend item
responds to the press not the release.
.. User charts can be scaled (lines, texts, markers, legend)
.. Plot area background color honours overview card color
when we're on an overview.
.. when adding a user chart to an overview make it span a couple
of columns and 3 times deeper than a metric tile.
NOTE:
There are two bugs that need to be squashed individually
and are related to user charts on overview:
1. Mouse event handling seems to be broken for user
charts in Overview.
2. User chart axis colors are always black when the series
are configured to use named colors.
zones(hr|power|pace|fatigue, name|description|low|high|units|time|percent)
applies to the currently selected activity and sport is implicit.
Also changed name() by metricname() and unit() by metricunit() in script comments.
.. You can now add a user chart to the overview dashboard
using a new tile UserChartOverviewItem.
.. Had to refactor UserChart away from a GcChartWindow and
into a QWidget so the QGraphicsProxyWidget would play
along.
.. A new UserChartWindow has been added to manage adding
a UserChart to a perspective.
.. fixed chartspace item config widgets being destroyed across
the add wizard and config dialog (existing bug).
.. fixed initialisation of items when added via wizard
NOTE the following issues/todo:
.. mouse click events are squiffy for some reason
.. need to add a way to scale as the text is tiny
.. legend has a performance issue (see #3989)
.. overall performance is good even tho we are using
a QGraphicsProxyWidget- might need to reevaluate
this later and embed the QChart directly into the
QGraphicsScene. To be reviewed.
.. a new zones datafilter function to retrieve zone info
and metrics for the current activity.
.. zones(sport, series, field)
sport is one of run, bike, swim
series is one of power, hr, pace
field is one of
* name - zone name (e.g. L1)
* description - zone desc (e.g. Active Recovery)
* low - the low mark for the zone (e.g. 0)
* high - the high mark for the zone (e.g. 100)
* unit - units for low/high (e.g watts)
* time - time spent in zone
* percent - time spent in zone as a percentage
each call will return a vector of strings for all
zones available.
.. to support the syntax the old functions 'name' and
'unit' have been renamed to 'metricname' and
'metricunit' to avoid clashing with symbols and
were bad choices in the first place.
.. the motivation for this function is mostly about the
overview data table, where we might create a tile
with the following program to display the zone
table that was previously available on RideSummary
names {
c("Name","Description","Low","High","Time","%");
}
units {
c("", "",
zones(bike,power,units),
zones(bike,power,units),
"", "");
}
values {
c(zones(bike,power,name),
zones(bike,power,description),
zones(bike,power,low),
zones(bike,power,high),
zones(bike,power,time),
zones(bike,power,percent));
}
.. we have a filter box on most trends charts config dialogs
and elsewhere. But when you resized the dialog the filter
box would also stretch (even though it is a QLineEdit).
.. this commit sets the vertical size policy to fixed to stop
this ugly behaviour.
.. when a column contains no tiles it may still be spanned
by a tile (since we add that feature).
.. this means we should check if the column contains a spanned
tile before shifting all remaining tiles left.
.. also enabled dropping into an empty column which was
not possible previoisly (impossible to have an empty
column)
A new overview tile that can be placed on trends or activity view to
display a table of data.
.. It uses a program to fetch the data to display via 3 functions:
* names() returns a list of column names
* units() returns a list of column unit names
* values() returns a list of values to show
.. If there are more values than names then it is assumed there
are multiple rows to be shown.
.. When adding a data tile an example program is provided to
demonstrate how this works (will need to also document this
on the wiki, or possibly a video tutorial).
Since time in zone is computed using the active zones for the series according
to sport and date, there is no good choice of limits to show in the general case.
This is part 4 of #3911
Power, HR and Pace use separate scales now.
This is part 3 and fixes#3911
The sport used to select zones in rangemode needs an update,
this will be included in a separate commit.
.. some new functions to help prepare data for the new overview
data table item. Possibly useful in other contexts too.
datestring(v) - returns v converted to a string date where
v can be a single value or vector of values, as days since
01/01/1900. e.g. datestring(Date)
timestring(v) - returns v converted to a string time
where v can be a single value or vector of values.
name(metric1 ... metricn) - returns the metric name in
the local language
units(metric1 ... metricn) - returns the metric unit name
in the local language
.. resize an overview item column width whilst holding down the shift key
to make it span columns, it will expand across and back.
.. this is largely to support the data table overview item type that
is pending, but also may be useful in the future when items can
contain charts (not planned for v3.6).
.. train plot background color is now honored more completely
with the backgrounds, sidebars and tabs all taking the
right color.
.. additionally, when applying any theme the train view will
always be set to a black background since it works best
like that (but users are still free to change it).
.. based upon current background plot color, so those with a
preference for dark themes get the new dark theme and those
with a preference for light get the new light theme.
.. making it mandatory will likely annoy some users but for the
most part it will mean the UI will get updated to a more
thoughtful color scheme.
.. the ride summary on analysis and trends is now replaced by
the overview dashboard.
.. since RideSummaryWindow uses html to deliver content via
an embedded web browser it had become unwieldy and the
UX was klunky and static.
.. additionally the code was unwieldy and difficult to
maintain and update when new feature were introduced.
.. this is a happy day, goodbye and farewell.
.. applies to all charts in the perspective, so you can create
a perspective called "Running" and set the filter to "isRun"
and all charts in the perspective will only show data from
runs.
.. updated charts on Trends view to honor the perspective
filter, as below:
* Overview
* Trends
* User Chart
* Treemap
* Critical Power
* R Chart
* Python Chart
* Histogram - for metrics
* Summary - no change as deprecating shortly
.. renamed the HomeView to TrendsView in line with some of the
other recent name changes. The class names were set over 10
years ago and no longer reflect the UI concepts.
.. New signal: GcWindow::perspectiveChanged(Perspective *)
When the chart is moved from one perspective to another, likely does
not need to do anything on Analysis view, but on Trends view its
quite likely the filter has changed, so refresh is needed.
.. New signal: GcWindow::perspectiveFilterChanged(QString)
When the perspective filter is updated this signal is called but
only on trends view since it doesn't really matter on Analysis
from the charts point of view.
.. at startup the perspective selection logic for analysis
view was not called and just defaulting to the first
available perspective in the analysis view.
.. when creating a perspective you can now add an expression
that will be evaluated when a ride is selected in the sidebar.
.. For example you can create a perspective "Running" with an
expression "isRun". When a run is selected on the sidebar
we automatically switch to the running perspective.
If now, whilst on the "Running" perspective you select say
a cycling activity, the expression will evaluate to false,
so we will look for another perspective to switch to.
If no expression is found to switch to, and the current
perspective has an expression that is evaluating to false
then we just switch back to the first perspective in the
list (you can reorder them if needed).
.. the perspective type is added to the xml when exporting and
also when saving state.
.. on import the perspective type is checked to make sure we
don't import trends views into activities and vice versa.
.. User Chart annotation labels now work when a standard color
has been selected.
.. The name of the standard color "CP Curve" has been renamed
to "Mean-maximal Power" to more accurately reflect how it
is used in the Critical Power standard charts.
.. there are lots of standard colors and they're hard to scroll
through. A new search box makes it easier to find them.
.. this is in anticipation of adding a lot more standard colors
for things like W', Pmax, Weight yada yada
.. New dialog to rename, add and remove perspectives, re-order them
and move charts from one perspective to another.
.. The focus is on managing perspectives and not the general UI
layout (ie. add/remove charts and rename things etc) this is
likely to be something this morphs into, but for now lets
keep it simple (this was complicated enough !)
.. also found a SEGV in CP chart when hover in allplot before the
CP chart has been notified in another perspective-- there are
likely to be a few of these kinds of bugs around.
When you start with a single click the workout is represented graphically
as a ramp from zero, but the qwkcode and erg code generated starts with a block.
Additionally an initial ramp starting from zero neither works.
This was reported at the forum and, although it is mostly cosmetic, it can be
annoying, so this change fixes both.
Difference between R Chart in Activities and Trends is a blank at the end
of the name, which is not preserved in German translation so new R Charts in
Trends are created as Activities charts.
Fixes#3427
It is unnecessary, since Train mode supports only 1 workout at a time,
and single selection makes it easier to scroll the list in tablet mode.
Related to #3268
Current GC root can be different from athlete library setting
due to GC startup logic and the spurious warning is confusing.
Revert to previous value, not current GC root, if the user chooses to.
Fixes#3903
.. Perspectives can now be added and are saved and restored on
startup and close.
.. A new config file 'xxx-perspectives.xml' replaces the old
'xxx-layout.xml'.
.. HomeWindow has been renamed Perspective across the code.
With TabView now taking responsibility for loading and
saving configuration.
.. This is a fairly big refactor that touches upon a number
of events at startup, including how sidebar events are
propagated across charts and tabs. And will need a reasonable
amount of testing before release.
.. Separately, I also fixed a SEGV in the Python chart when
no ride is selected (an old bug not related to this).
The user will be able to create collections of charts as opposed to
the single long list of charts in each of the four views.
This first update:
.. update toolbar to include a perspective selector
.. also updated aesthetics of toolbar (mostly icons on hidpi)
Further updates pending will:
.. part 2 will introduce code to add, save and restore perspectives
.. part 3 will introduce code to manage and rename perspectives
.. part 4 will introduce new defaults for each perspective
A future enhancement may allow the perspective to be aligned to a
specific sport in activity view, so the perspective can be selected
based upon the sport of the activity being analysed. But that will
not be part of these changes.
MapQuest API Key is a new DP parameter to allow users to enter one
and have personal transaction limits.
When empty it defaults to GoldenCheetah API key as before.
Fixes#3900
Any sport present in the list of possible Sport field values
can have its own HR and/or Power zones like Run before.
Otherwise Bike zones are used as default for backward compatibility.
Fixes#3280 combined with last 3 previous commits.
[publish binaries]
All sports defined as values for Sport metadata field can have
specifics Power Zones and default to Bike zones otherwise.
Similar to current power zones for Run.
Part 3 of #3280
All sports defined as values for Sport metadata field can have
specifics HR Zones and default to Bike zones otherwise.
Similar to current HR zones for Run.
Part 2 of #3280
.. the alpha channel was too agressive for light backgrounds and
was washed out and unpleasant on the eye.
.. reduced the alpha blend to make it flatter and cleaner.
.. showEfforts was not being initialised when the plot was created
which resulted in sustained efforts always being shown regardless
of the chart setting.
.. themes are now either light or dark, which selects the default
color set used to set the standard colors.
.. users can of course maintain them, but when applying a theme
there is no need to adjust now (some of the default colors looked
poor on a light background).
.. there is a line of code in main.cpp to dump the current colors to
stderr so it can be cut and paste into colors.cpp -- this makes it
much easier to use the UI to maintain colors and update the code.
this is obviously just for developers.
.. letting users define their own themes could be done later, but feels
like overkill at this point.
.. When creating user charts we can now select a standard color as
configured in appearances.
.. This means users can select e.g. the "Power color" when plotting a
power series.
.. The second part of this commit will update the themes to ensure that
the standard color settings are appropriate for the background (as
they are inappropriate currently. e.g. Critical power is always
yellow, even on a light background).
.. mostly straight replacement as qt5 containers are templated
and qSort semantics are the same as std::sort
.. prepping for Qt6.2 which is due late 2021.
Signed-off-by: Mark Liversedge <liversedge@gmail.com>
Continuation of previous commit. Caveat is value argument is string
so the user is resposible of providing proper string representation
of the value for overrides and numeric metadata.
For Metadata handling in Python Data Processors, similar to set/unset/isset
in formulas, but no metric overrides for now.
- setTag(name, value[, activity])
- delTag(name[, activity])
- hasTag(name[, activity])
All return boolean success indicator and activity is optional,
defaulting to current activity.
setTag and delTag are enabled only in Python Data Processors, mark
the activiy as modified and notify metadata has changed on success.
Fixes#3639
.. Makes it easier to identify code that has been snaffled in from
other repositories and check licensing
.. The httpserver is now no longer optional, since it is delivered
as contributed source.
Variable row height, depending on activity calendar text being empty or not,
provokes refresh issues when calendar text changes from empty to not, or
viceversa.
Instead to try to solve this issue with specific code, I think it is
simpler, and more regular from UX point of view, to have a uniform row height.
After this change row height depends on metadata config only:
1) a new RideMetadata method is introduced (hasCalendarText) to check if
Calendar Text can be non empty, i.e. if some field has diary checked.
2) RideNavigator uses this method when config changes to set hasCalendarText
member used to determine row height for all activities.
Fixes#3074
Configurable in Train Preferences, defaults to 0, which is current behavior.
When countdown > 0, start is delayed and countdown is displayed in
notifications panel.
Fixes#3632
Since a simple metric name is the most common use case for PMC functions,
it is useful to avoid the need to call the expression evaluator at refresh
time, for better performance and to sidestep #3788.
This is a continuation of previous commit, since x-axis change affects
the is blank status we need a full replot to consider cases when the
selected activity lacks time or distance.
This change remove deviceType_ private member from RideFile
replacing its use by access to "Device" metadata field.
The objective is to remove limitations s.t. update using set
in formulas and ride navigator immediate refresh.
Fixes#3760
.. when trying to find the right values for the measures() datafilter
function e.g. measures("Body", "weight") it was not clear why this
was failing. Added more information to the error message.
A new Trainer metadata field is included in metadata.xml
On upload a checked Trainer metadata field, or the presence of
TRAIN XData series, marks the activity as trainer.
On download the trainer flag is used to update Trainer metadata field.
This is a complement of 5a1bd1a, a user is reporting a crash in
Widget::setSyleSheet on Windows at startup after that commit.
I cannot reproduce the issue, but since that change was modeled
after LTMSidebar, lets try to avoide the issue making it even more
similar. This way, the widget already has a proper parent when
HelpWhatsThis is added.
Add recommendation to pair only FE-C sensor for FE-C devices
Group Custom Virtual Power settings, move Name and Create button,
rename for clarity and enable only when Name is not empty.
Remove compiler warnings.
Fixes#3697
deriveExtCPParameters established Initial parameters estimates before
the data verification steps so when data don't meet the minimum
criteria for estimation those initial parameters are returned.
This change moves the initialization step after data verification,
similar to what deriveCPParameters does for the envelope fitting case.
Fixes#3862
A new logging category is added gc.usb, inactive by default, to log all the USB transfers between GC and the USB trainers. It can be activated by changing the logging filter with the --debug-rules option.
This change adds some useful defaults for Tile Servers A/B/C when not set
and allows to enter full urls including apikey, s.t.:
https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=<your-apikey-here>
so use OpenCycleMap with your own apikey.
[publish binaries]
Leaflet.js API uses the upper left corner as reference point while
GoldenCheetah icons, designed for Google Maps API, uses bottom center.
Since all marker icons are fixed size 32x37, this change adds the attribute
iconAnchor:[16,37] to fix positioning.
Fixes#3193
This change allows the user to independently via the new chart checkboxes to:
- ignore any Power Shading Zones and always draw the red line (Hide Shaded Zones)
- remove the route background yellow line (Hide Yellow Line)
For Pace related metrics converting back from toString using toDouble
fails and then sparkline, up/down, etc. are not displayed.
This change avoids that conversion to fix this issue and to make code simpler.
Add declaration for variable v inside the loop used to compute avg/min/max
to avoid affecting variable v in the outer scope, this is the minimum change
to fix the problem and the same pattern is present in other tiles.
Without this change up/down is based on the first activity of the same sport
in the previous 30 days, instead of the current one.
Adds a “Polarized” option to Overview Zone tile to chart HR/Power/Pace as 3 zones histogram, it has no effect on Fatigue/WBal zones.
Complements #2555
[publish binaries]
Decimal watts, which tipically happens when a workout is scaled,
play havoc with qwkcode, so lets avoid them.
Text cues are not supported either in qwkcode yet, adding them
was my mistake, so I commented out them for now.
Fixes#3846
* Add debugging options to select the log file, format and rules, and redirect stderr even on Windows
* unistd.h does not exist on Windows use io.h instead
* STDERR_FILENO does not exist on Windows
* Different strategies and much error checking to redirect stderr on Windows
* Synchronize cerr and stderr with filedes 2 and STD_ERROR_HANDLE
* Some functions like write in Linux and Win32 have slightly different signatures
* Code cleanup, final test to check that fd=2, stderr, qDebug and cerr are redirected
* Remove the file and line number from the default logging format in release mode
Once Ubuntu 16.04 reached EOL we will switch Travis-ci builds to 18.04,
this guide is intended to help new developers setting up a local build
environment.
To allow duplicate keys happening when the same metric/measure or
Best/PMC/Banister combination is used in more than one curve.
This is useful when the curves have different filters or trendlines,
for example, and avoids a weird behavior in these cases.
Fixes#2185
In total 18 new metrics are added and 6 new charts using them are
included in charts.xml (existing users needs to remove their local
copy in config/charts.xml to activate them, reset doesn't work since
it retrieves the server copy which is v3.5 yet.)
Fixes#2555
[publish binaries]
Change CVPage to include AeT Velocity/Pace
Default to 90% CV for runs and 97.5% CV for swims
Used to delimit Polarized Zones I and II
Add config(aetv) to formulas
Add aetv to R/Pyhton/Rest APIs
Fixed column widths to fit contents
Part 3 of #2555
Change CPPage to include AeT Power
Default to 85% CP, used to delimit Polarized Zones I and II
Add config(aetp) to formulas
Add AeTP to R/Pyhton/Rest APIs
Fix W' col resize bug in Power Zones settings #2661
Part 2 of #2555
Change LTPage to include AeT HR and look like CPPage and CVPage
Default to 90% LTHR, used to delimit Polarized Zones I and II
Add config(aethr) to formulas
Add AeTHR to R/Pyhton/Rest APIs
Part 1 of #2555
It should be closer to current offset than the fixed default.
Users having issues with calibration can change default value adding:
[srm]
offset=400
to configglobal-trainmode.ini
When exiting, GC complains that the Web Profile is released before Web pages that refer to it with the message: "Release of profile requested but WebEnginePage still not deleted. Expect troubles !".
The Web pages are now released explicitly in the destructor to insure that they are freed earlier than the Profile.
Fixes#3844
When any change is detected, _userMetrics are reloaded and updated in Metrics
factory, but metric recomputation still depends on fingerprint field to avoid
unnecessary recomputation.
Fixes#3838
It copies xml config files from the selected template athlete, if any.
Together with Athlete > Open > New Athlete, Athlete > Delete and
the new Athlete view should make multiple athletes management easier.
Fixes#308
[publish binaries]
Allows to delete a closed athlete without the need to exit the program,
it re-uses the logic in ChooseCyclistDialog and removes the AthleteCard
from AthleteView.
Objective is to allow creation of new athletes, without the need to
exit GoldenCheetah, using Athlete > Open > New Athlete like in v3.5
When a new athlete is created MainWindow emits newAthlete signal
so AthleteView can create the corresponding AthleteCard.
The Sigmasport ROX devices do not set a product ID, hence GC shows any Sigmasport fit import as "Sigmasport ROX". The Sigmasport wearable "iD.FREE", however, sets a product ID of 45. This adds specific logic to the fit ride file detection logic, while leaving the ROX default for backwards compatibility.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Fix VLC Hangs with Intentional State and Ordered Async Dispatch
Two main parts to this change.
- a thread locked managed player state
Fixes issue where calls to player could occur in wrong order
- all calls to VLC are made via an ordered Async dispatch.
Fixes issue where qt must process widgets after stop is called.
By moving stop off the qt gui thread this permits qt to shutdown
widgets which eventually allows vlc to stop.
Since vlc stop is async, and we wish vlc operations to be ordered
we are forced to put all other vlc operations on the same async
queue.
Fix#3756
to force Strava upload of altitude data.
The user can revert to Strava basemap on Strava.
Upload to Garmin Connect was tested for regresion.
Fixes#3824
I noticed zoom configured in xml file is ignored, and code is always starting with a value of 16 for thee zoom of thee live map widget.
This change uses field of the xml; it was already being parsed but not used, so using it is simple and straightforward
Co-authored-by: Peret <mail@mail.com>
* when CRS workout files are read, the altitude is already derived and precomputed from the gradient for all formats handled. A new function was added, altitudeAt, that accesses this value, avoiding to derive anew the altitude from the gradient in the TrainSidebar main loop, and getting the correct altitude value when FastForward.
* Replaced assert by qDebug in ErgFile.cpp because asserts would needlessly kill the program
Fixes#3805
* Fix the request - reply interactions with the Fortius
The open command is in fact to get a reply with the version. However, some already queued messages need to be skipped, before the well formed reply message is received. The open command is sent initially, and each time the device is disconnected and reconnected. The procedure to open the device and get the version was then put in a separate function.
When the run command is sent with a specified force, a reply comes back with the force echoed. However, here again, some messages may need to be
skipped before the correct reply comes back.
* Updates based on comments
The first reply is always skipped on the T1932 (64 bytes reply). A notification about the motor not turned on is sent when the version number cannot be read.
* Add a comment for a non obvious if condition
Added calibration trainer command, delayed check for user stopped pedaling with visual feedback on progress and saved calibration for next use on success.
The crash is reproducible on Linux starting an Erg workout after another
and it is caused by an array index error due to average arrays not being
cleared on start.
* Initial correction of force/speed/power calculations for Fortius using information from https://github.com/totalreverse/ttyT1941/wiki
* Use wind speed, rolling resistance and wind resistance value from trainer interface, if provided
* Added FortiusANT's AvoidCycleOfDeath() routine from https://github.com/WouterJD/FortiusANT to limit trainer resistance at low wheel speed
LRBalance is left side contribution while the ANT+ messages carries
right side pedalPower contribution, so it needs to be converted.
When not available RideFile::NA is used since 0 means 100% right.
Complementes b29f72d, Fixes#3017
Add support for 8008 TRS and, using the profile string, delay and sound can be configured
This adds the following functionality for daum:
* if the profile string contains a number or the string sound,
no automatic cockpit configuration is done, but the information from
the profile string is used
* if the string sound is present, play the sound when connecting
* if a number is present, use this number as the delay in milliseconds
between commands. A reasonable number to start with is 50 in case of
connection problems
This also solves the problem, if the cockpit id is not known by
GoldenCheetah. In this case the profile string can be just set to
e.g. 50_sound and the unknown cockpit id is ignored.
Athletes with default config can be safely skiped without loss of
information in the same way as non athlete folders.
Fixes#3735 for new cases, but users previously affected by this bug
need to manually delete metadata.xml from GC root folder, it doesn't
seem a problem common enough to merit an special treatement.
[publish binaries]
Default is checked to preserve current behavior, when cleared
the choose athlete dialog will be presented at start.
Workout library setting was moved to Train preferences
page to reduce clutter in General settings page.
[publish binaries]
* Daum: Remove redundant virtual keywords
These function were not involved in any inheritance, so the virtual
keyword is removed.
* Daum: Remove unused parent member
* Daum: Remove redundant destructor
* Daum: Remove default values for contructor parameters
This circumvents problems where e.g. explicit would be necessary.
The constructor is actually only used when all parameters are given.
* Daum: Remove redundant this->
* Daum: Ensure timer only allocated once
Also use nullptr instead of 0.
* Daum: Remove unused includes
* Daum: daumDevice is now a private instance member
There is no need for it to be a pointer or public.
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]
For this a 50 msec delay is introduced before sending each serial
command. This is tested on hardware ond also used be jergotrainer.
Also during initialization there is a delay between each command, so
even slow devices can keep up. As soon as the cockpit type is known,
the delay is set according to the cockpit type.
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.
Improve Virtual Power in Presence of Acceleration
Part 1: Rotational Inertial for Custom Virtual Power
This change is only enabled when device is defined with non-zero
Inertial Moment. When Inertial Moment is not defined or is
zero then this change has no effect.
Change adds field to device to hold trainer's inertial moment
in (KG M^2).
This allows power calculation to track energy that passes in
and out of trainer's flywheel so that acceleration and
deceleration power can be reported immediately.
Whenever device sets a new rpm sample a time is
recorded alongside which allows the common controller
to compute change in rpm over time, which allows
calculation of kinetic energy that has entered or
left the trainers flywheels during the duration.
It is a bit of math to determine a correct I for a trainer's
flywheels, especially if the flywheels have different rpms,
hopefully we can add the I values for the current built-in
virtual power trainers.
Part 2: Use average power instead of point power.
Moved numerical integration into its own header, its now used by
bicyclesim and by virtual power. Changed default integrator to
Kahan-Li since in my testing it is stable and converges fastest.
Virtual Power now computes average power since previous sample,
which has the effect of reducing reported power during acceleration
and deceleration.
New advanced virtual power is on with this commit. It seems to work
very well in my testing.
Fixes#3650
Fractional watts are not supported by Workout Editor and they
are trucanted for most import formats, this fixes remaining
cases reported by users.
Fixes#3675
Current route tile looks off compared to the map one is more used to,
because it is lacking mercator projection. This commit adds the
spherical pseudo-mercator projection as described on
https://wiki.openstreetmap.org/wiki/Mercator. As mentioned there, the
true elliptical projection is avoided for being more computation
intensive. This is also the case in OpenStreetMap and thus in the full
map view in GoldenCheetah. With this commit, those views match up again.
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.
Simplified the meterwidget elevation display loop, bug was that it
was skipping the final route point.
Add minY to ergfile so range of y can be obtained without computing
each time, so can remove search loop from meterwidget.
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...
* remove unused CompareDateRange::days
* remove unused Season::days
* ensure Season limits are only accessed via accessors
* remove unused Seasons::seasonFor
* add SeasonLength to create relative seasons that end today
* save Season::_length and use it instead of Season::prior
* add SeasonOffset for the start of relative seasons that don't end today
only functional difference: "All Dates" is now aligned on the beginning
of a year instead of starting on the same day and month as today
* use _offset+_length instead of _start+_end for relative season
functional differences:
- in CriticalPowerWindow, relative seasons that don't end today ("All
Dates", "Last Week", etc) were previously computed with respect to
QDate.today(); they are now computed with respect to
myRideItem->dateTime.date(), as other relative seasons ("Last 7 days",
etc); this is technically a bug fix, but there probably was no one
using these relative seasons for CriticalPowerWindow anyway
- every call to Season::getStart and Season::getEnd computes a fresh
value (based on the offset and length specified for the season), so
relative date ranges refresh when the display refreshes, e.g. when GC
is open for multiple days (fixes#1751)
* add comments for SeasonOffset/SeasonLength
* Use Season accessors in AthletePages
* when looking for events, consider all seasons that intersect the date range
seasons starting before and ending after were not considered
Fixes#2620
* center event labels on the event mark
if the labels are to the right of the mark, the label of an event at the
end of a date range will not be shown
* code cleaning
loop only once over seasons, instead of twice
Before this change, when looking at an activity, the routes seemed to
appear in order of creation in the interval section. This patch instead
sorts them by their start time in the activity instead (or by their end
time if the start times are the same).
Note that the routes are also known as segments.
Fixes#2132.
Fixes the problem happening when a ride crosses the start point of a segment but diverges for some reason then at some point later in the ride the segment is ridden for real. It introduces boolean "resetroute" and sets it to true in two places where where the code needs to reset the segment point and break out of the ride point loop in the case where diverge is found. Then check for this condition at the bottom. Reset the segment index to -1.
To avoid the script running twice on ride selection and
interval edition/deletion.
Caveat is when intervals are created via find intervals
the script is not notified until interval or ride selection changes.
Overview chart needs to do computations with metric values converted
to selected units and format results accordingly, for this purpose
RideMetric::toString(useMetricUnits, value) should not do the units
conversion again, so it is changed to do formatting only and useMetricUnits
parameter is removed.
The original meaning is used only in RideItem where it is replaced by
the composition of toString with value.
Fixes#3647
[skip appveyor]
transfer.sh service has become very unreliable and it is being
phased out on oct-30, according to the public site announcement.
free.keep.sh offers free uploads up to 500MB with a similar service,
limited to 24hr storage, enough to download build artifacts.
This is the Same fix applied to the Computrainer a few months ago to remove the modal dialog that would be issued in a loop upon connection problems. The modal dialog loop made the interface completely unusable. Now a notification is emitted but the interface remains available.
Similar to other DPs, it is what the users expect and it is easier
to try with different parameters.
When called automatically existing watts are preserved
to avoid accidental overwrite.
More recent first intended to avoid the need to scroll to the end
Fingerprint changed to include time to detect changes when adding
more than one on the same day.
Fix inconsistent use of local/UTC dates.
.. MacOS Qt crashes when destroying it, OpenGL is *that*
broken by Apple.
.. applied to Windows too, despite it not being an issue
reported there is no value in doing it so removed.
[publish binaries]
.. saves/loads values to athlete global area, particularly useful when
modelling as you can save away parameter estimates that may have
been expensive to compute, and re-use them across series in a
user chart.
.. they are not saved across restarts, but we could fix that later if
they become more useful
.. store("name", value) and fetch("name"). if the named value does
not exist 0 is returned.
[publish binaries]
Fix the slope and power values in the Fortius Slope mode
Users have complained about incorrect slope and power values for the Fortius. This was due to a few problems. This commit greatly improves the situation with the fixes that solve the following problems:
- The Fortius protocol is better documented in the comments.
- The pedal sensor is on byte 42, not 46, this prevented the pedal sensor echo to keep the trainer operating normally.
- The slope was converted to uint before being scaled, losing the fraction.
- The trainer most likely reports the torque. It must be multiplied by the speed to get the power.
- The scaling factor for the slope was 2x too high but this did not show earlier because of the pedal sensor problem.
- The period for retrieving data was too fast, most packets were empty, the period was changed from 10ms to 50ms (Tacx software uses 100ms).
GoldenCheetah is now quite usable on my Fortius with those changes. The slope appears too easy and the power overestimated but this is similar to the behavior of this trainer with the Tacx software. It would be interesting to get feedback from users with powermeters to refine some of the coefficients involved.
.. MacOS support for OpenGL is unreliable and there are user reports
of issues. We will need to wait till Qt 6 for hardware acceleration
on Metal.
.. Windows support for OpenGL is ok if you use Nvidia GPUs but the
AMD OpenGL driver is slow and broken. So we disable OpenGL here
although Nvidia users are potentially being short changed.
.. Hardware rendering really needs to wait for Qt6 for a more complete
and reliable implementation that has cross platform support.
Fixes#3594
.. the concept of a new gui as a replacement for MainWindow was dropped
in preference for gradually adjusting MainWindow to the new design.
.. this is still in progress, but the 'newgui' concept is dead.
.. Fetch the version of OpenGL available at startup and use it in
ChartSpace to decide if we want to enable openGL rendering.
.. some fixups for X11 builds, which are not needed on the main
OS combinations we use (Linux, Mac, Windows) but may prove
useful when building for X11 vs Wayland in the future
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.
.. xdata("name", "series" | km | secs) - returns a vector of xdata.
.. no resampling or interpolation is applied since the user can
do this with the resample() and interpolate() functions.
This has been reported to produce garbled output on Windows and,
according to https://doc.qt.io/qt-5/qtglobal.html#qPrintable,
it is dangerous since the array returned by QString::toLocal8Bit()
will fall out of scope, so lets use a safer version to avoid
the risk of crashes hard to debug.
[publish binaries]
For the same reason metadata.xml is now global.
Also load default measures groups even when measures.ini is present,
this may change when we provide an UI to edit measures.ini, but for now
it avoids users breaking body and hrv features.
[publish binaries]
.. 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]
.. Ride metadata was associated to the athlete rather than a
global setting. This was a serious design flaw since user
metrics can reference metadata.
.. A global metadata.xml file is generated on startup by
consolidating all athlete level settings into a single
configuration.
.. Other dependencies were also moved; SpecialFields,
ColorEngine and UseMetricUnits.
.. We should now be able to remove athlete configuration
from the config dialog and put it into the athlete view
instead.
This will also fixe a long standing issue with
configuring athlete settings when multiple athletes are
open.
[publish binaries]
.. the 'Details' chart now combines editing the metada fields such as
workout, sport, notes and so on, with an additional tab 'Raw Data'
that contains the RideEditor.
.. it is now no longer possible to add Editor inidividually and the
Summary and Details chart is deprecated (Summary will also be
removed once Overview has enough functionality to replace it).
This reverts commit 6bc48200e7.
It is crashing on Windows 8, I can't debug on that version
and it is not that useful feature, --debug gives more information.
[publish binaries]
.. the views were not being deleted, so the global context connection
to configChanged signal was still called, but the athlete and
context were long gone - so SEGV (!)
.. the reason this didn't get triggered in earlier releases is due to
the fact the event was disconnected when the athlete context was
deleted.
.. move thread based load of ridecache into ridecache, this fixes a
serious regression.
.. previously because the ridecache was created in a thread it could
not attach to the events from the main gui event loop.
.. we now load the RideDB.json file in a worker thread, but the
ridecache, and its items are created in the main thread.
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
measures.ini is looked for in Athlete's config folder,
it should have a section for each measures group,
nutrition data with Energy and Macros is provided as example.
Moved default weight to About and removed RiderPhysPage and created
a tab for each measures group under Measures.
MeasuresPage handles conversion between metric and imperial units
Generalized CSV import with configurable headers.
MeasuresDownload enables download from Withings/Todays Plan only for Body
measures.
This is Part 1/2 of #2872
.. 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.
Similar to Linux/macOS builds, messages are redirected to goldencheetah.log
when not output to console is requested, but instead of relying on low level
stderr redirection a message handler logging directly to the file is installed.
[publish binaries]
configdialog_ptr is already maintained to handle raise event,
cleanup is moved to destructor to ensure it is always called,
and it is used to ensure:
1) only one instance is created from MainWindow
2) it is closed on MainWindow destructor
Fixes#1918
The logic to generate synthetic speed/distance/cadence sample data
from length records was removed from FitRideFile, and Fix Lap Swim
data processor is now used for that task, this is simpler, avoids
code duplication and preserves other data s.t. HR and Temp
Fixes#3545
total_timer_time is used as length duration instead of total_elapsed_time
to support Suunto lap swim files
Fixes#3272
.. since the context of the first athlete is used as a partial
application context across the code we now prohibit closing
the first athlete opened.
.. we will separate out the app and athlete context shortly
but this will at least protect against SEGV.
[publish binaries]
.. Show days since last activity and disable config icon since there
isn't an appropriate action for now
.. Athletes can be opened and closed via the tiles and a reusable
'Button' overview widget is available for re-use elsewhere.
.. Part 3 will enable checking for downloadable data to show an
indicator on the tile for e.g. coaches with multiple athletes.
NOTE:
There are a few issues regarding application context separation
from athlete context that need fixing up (if you close the first
athlete loaded expect crashes). Will look at this as a separate
update since its been there for some time and is not related to
the new view per se.
.. modern light now uses the Fiori Belize Blue theme.
.. this means that the overview (chartspace) background is now also
configurable, so the existing themes could be updated.
.. probably need to revisit all the themes tbh.
There has been some reports about performance issues on Windows,
and this was a debug tool for a feature which has been stable
for years, so we can remove it to avoid the overhead.
[publish binaries]
.. string manipulation using raw C since its simple character
replacement, halved time over previous approach.
.. lookup rideitem in ridecache via binary search (lower_bound)
rather than serial. Minor speed up.
.. Overall, loading should be noticeably quicker for most users.
.. introducing the athlete view
.. at startup the first athlete is loaded as normal, but once the
mainwindow is open the athletes are managed from the athlete view
.. athlete ride cache restore happen in background (via a thread) to
enable the GUI to remain responsive whilst it takes place (since
for most non-trivial cases it can take 30 seconds or more).
.. multiple mainwindows has been deprecated and whilst each open
athlete is selected via a tab, this will change to a combobox
in later commits.
.. the tiles in the athlete view do very little apart from show the
avatar and progress/load status when an athlete is being loaded.
.. future commits will introduce more detail and actions for the
athlete tile and deprecate the athlete tab bar for a combo on
the toolbar (amongst other things).
.. Scatter chart click thru from trends.
.. Need to decide how click thru will work from a line chart as the UX
doesn't quite work as the auto hover points are elusive (they move
when you go to click on them). Will review and fixup shortly.
.. Enable click through from the data points on a generic chart
when on trends view.
.. This commit includes the 'addCurve' bindings to pass the
activity filenames from R, Python and the User Chart.
.. It also includes a new DataFilter function 'filename' to
get a vector of strings that are the filenames for the
activities in the selected date range (or the filename
for the currently selected activity).
.. The second commit will include the interaction code for
GenericPlot to click-thru a selection.
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
.. adding some new functions for working with strings:
trim(p) - trim whitespace
tolower/toupper(p) - convert case
split(p, sep) - split a string into a vector
join(p,sep) - join a vector into a string
replace(p, s1,s2) - replace s1 with s2 in string or vector
.. this is the last of the first wave of commits to support
strings, but more will come as we work with categorical
data, factors and so on.
[publish binaries]
.. show/hide sidebar setting is reinstated on restart, is specific to
each view and now the menu check stays in sync with user selection.
.. another old glitch thats taken a while to get resolved !
.. metadata("name") returns the value for the metadata field on analysis
view or a vector of values if on trends view.
.. also fixed a few nits when working with category data on the user
chart; sort/multisort had bugs, blank labels and pie chart legend.
.. since we can now set category data using string vectors we can
support bar and pie charts in the user chart.
.. there were a few issues switching between bar and pie charts
related to the way axes were being configured that have been
resolved in this commit.
.. Update builtin functions to support working with strings as well
as numeric vectors; e.g. sort, uniq, aggregate
.. next commit will add some new functions that are specific to
working with strings; e.g. tolower/upper, split, replace.
.. Update operators to support string vectors; compare, assign, index,
select, contains and so on.
Most maths operators make no sense apart from '+' which concatenates
strings and arrays together.
.. next commit will update functions where they are appropriate for
strings and string vectors; sort, uniq etc.
.. Strings and vectors of strings are useful for plotting bar charts
or wherever category variables are needed, they are also useful
when working with xdata names and metadata within ride files.
.. Full support for strings will be introduced over the next 4
commits, including this one (1 of 4):
1 - Basics - Create, Assign, Coerce, isString
2 - Operators - Logical, Math etc
3 - Functions - sort, uniq, aggregate etc
4 - String Functions - cat, split, toupper/lower etc
.. Will wait until all 4 commits are completed and string support
is feature complete before updating the wiki.
[skip appveyor]
Homebrew upgraded to python to 3.8, switched back to the 3.7.5
included with the Travis image until we decided to upgrade.
Changing to 3.8 requires to upgrade SIP to 5.x and testing.
.. click on item in list to select it and click thru to analysis view.
.. also implemented a hotspot() method in chartspaceitem to tell the
chartspace to stop stealing events when in our hotspot-- in this
case it was the area where we paint the list.
.. stackpointer increment before redo and indexing into the stack
when stackpoint is -1 in NavigationModel::forward().
.. introduced in the last commit.
.. clicking on an activity in the trend overview bubble chart will
switch to analysis view to look at it.
.. to support this all the underlying changes to navigation model
and related have been updated to force view change and allow
going back and forth in the navigation model.
.. along the way a couple of bugs were also squased. The worst was
a SEGV related to Tab::rideSelected() calling MainWindow::sidebar.
.. now the main foundational code is in place we can add more click
through opportunities; e.g. top N on overview, user chart.
.. back and forward buttons to navigate between views and selections.
.. currently limited to just rides, date ranges and views.
.. next step is to enable click to select from trends overviews to allow
users to drill down from the season overview into activities and
back again.
.. part of the shift from searching through lists to analyse data to
exploring data visually with drill down and click through.
.. the buttons are very basic and there is no way to explore the
history / recently viewed items etc. these will come later.
Fixes#3529
.. the user can configure the colour of toolbars and sidebars, so this
is honored in the sidebar painting,
.. we should look at separating out the way theme colors are edited;
the core colors are more important than the pallete colors like
CPOWER etc (and as an aside the palette colors should be usable
from user chart config too).
.. gap between ride list and sidebar color didn't get reset when change
color theme in preferences. (was a nightmare to find the fix).
.. overview default backgrounds when changing themes were also really
bad choices and toned down. quite why we have to change in pages.cpp
and colors.cpp is a bit tedious.
.. new metric 'Activity Date' which is days since 1900/01/01 as a metric
so can use wherever metrics are used.
.. added RideMetric::isDate() so we can mark as a date and honor setting
in RideMetric::toString()
.. updated BubbleViz to support Dates by using xoff and yoff to truncate
the values used when days since values.
.. changed the default config for a trends view bubble viz in overview
to use activity date as the x-axis.
.. thanks to Ale for the original idea behind this.
.. repurpose the interval bubble to show activities instead of
intervals.
.. changed the animation/transition to work better when looking at
seasons by resizing the axes before updating the points.
[skip appveyor]
Not a great difference, but we are too close to 50' limit
Also reduce curl max time to avoid timouts.
For Linux buils remove --silent build to avoid the job being cancelled
The block was introduced in bb6d2552c0 to
avoid the upload of charts without configuration, now configuration is
possible and it will be interesting to see what layouts users share.
The y scale is computed from the font instead of only from the current content, to avoid having different scales between different Text widgets of the same size. For example, "kph" has a high k and low p, resulting in a text widget with bigger bounding box, and thus smaller scale than a text widget with "watts". Options are added for alignment and for text width, to help align the different entries. The formatting of metrics with the integer part as Text and fraction as AltText is more systematic and it is possible to add an AltTextSuffix, to specify the units when they are not provided in VideoWindow. The visibility of the BoundingRect and Background car be controlled.
.. its much faster to vectorize and use the samples() function in init
or value function when working with user metrics.
for example this code:
sample {
work <- work + (POWER * recIntSecs);
}
value { work; }
count { Duration; }
should be refactored to:
value {
work <- sum(samples(power) * recIntSecs);
}
count { Duration; }
To be used as workouts and videosync with free Ergo Planet Videos
EPM files contain video sync plus geolocation information in XML format
Library of free rides: http://wiki.ergoplanet.de/myor/roadmovie-galerie
The problem is altitude set to zero in those examples, likely because it is
redundant when you resort to the EPP (Ergo Planet Program) for slope data,
but the EPP is an unpublished binary format we don't support directly.
So the workflow to use the those synchronized videos is:
1) Import the .epm file to GoldenCheetah as an activity
2) Use Fix Elevation and Fix GPS to add and smooth elevation and route data
3) Export the conditioned activity to GoldenCheetah JSON format
4) Import the .json file as Workout and VideoSync files,
plus the .avi as media in GC Train mode using Scan Workouts and Media
5) Train using a Video Window with overlay widgets and simulated speed for
better experience.
Fix base class toString 2 parameters bug
Use toString(metric, value) in getStringForSymbol to avoid setting the value
Use toString(metric, value) in MetricOverviewItem::setDateRange for testing
Any other activity file format GC supports can be imported,
conditioned using Fix Elevation, Fix GPS, etc. and exported
to GoldenCheetah .json format to be used for simulated rides
with synchronized video and position tracking.
Complements #3469, Fixes#3376
.. shows a little medal on the metric tile if it is a best for the
period. Shows if top 3, in order:
- all time, including the future
- all time till today
- last year
- last 90 days
- last 30 days
.. helps to highlight positives from most activities.
Initial implementation of #3482
LiveMap is hidden when GPS data is not available
New layout including Live Map and graphical widgets
added to video-layout.xml, zoom can be configured there.
The video layout file is extended to contain possibly several named
layouts. The file is read to list the layouts and offer a selection in
the Video Player chart settings menu. The file is then read again to
instantiate the selected layout.
* Base work for dynamic speed power curves.
* Add test for spindown - proof templates.
* Dialog for adding virtual power curve
* Finished.
* Potential typename fix.
* Fix another typename problem.
* const typename reorder
* Missing header in clang build.
* Fix error with static init order.
* Forgot to set id for known devices.
.. plot metric by category as a donut (pie) chart.
.. particularly useful as an overview of sport or workout codes for
multisport athletes.
.. also fixed up metadata selection which was broken (!)
.. layouts mucked up a bit, needed stretches
.. the filterset wasn't updated correctly, causing filtering to not
work in the way anticipated.
.. Activities metric should be a MetricType::Total, which will become
more popular on Metric tiles with filters (e.g. how many activities
> 0.85 IF etc).
But to check for errors.isEmpty() is overkill, when the returned value
is not NULL, they can be warnings according to RideFileImport interpretation.
Fixes#3479
2020-06-14 15:16:29 -03:00
787 changed files with 246322 additions and 149853 deletions
Update Note: to build GoldenCheetah v3.6 we are using the APT Package
Manager to install dependencies, including Qt and GSL, on Travis-ci
Ubuntu Xenial build environment.
You can check the travis/linux folder for the complete and updated build scripts,
the minimum Qt version known to work is 5.13 with Qt WebEngine and Qt Charts.
GSL - GNU Scientific Library is a mandatory dependency starting with v3.6
Ale Martinez - May, 2020
+++++++++++++++++++++++
LINUX BUILD WALKTHROUGH
+++++++++++++++++++++++
Mark Liversedge
John Ehrlinger
Ale Martinez
Jan 2015
Version 1.2
Jul 2022
Version 3.6
A walkthrough of building GoldenCheetah from scratch on Ubuntu linux. This walkthrough
should be largely the same for any Linux distro.
A walkthrough of building GoldenCheetah from scratch on Ubuntu linux 18.04
This walkthrough should be largely the same for any Debian derivative Linux
distro, and very similar for others using their correspoing package manager.
CONTENTS
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
- QT
- git
- flex
- bison
- QT
- OpenGL
- gsl
2. ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 2
2. ADDING OPTIONAL DEPENDENCIES
- FTDI D2XX
- SRMIO
- liboauth
- libkml
3. ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 3
- checking out the release 3 branch & building with MANDATORY dependencies
- flex
- bison
- libical - Diary window and CalDAV support (google/mobileme calendar integration)
- libvlc - Video playback in training mode
- libical - Diary window and CalDAV support (external calendar integration)
- libusb - If you want support for using USB2 sticks in Train View
- R - If you want R charts
- Python - If you want Python charts, scripts and data processors
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
=================================================
Installed Linux distribution of choice on platforms i386 or amd-64 (currently Debian-based distributions and Arch-based distributions are covered). You will not need to do this if you
already have a Linux distribution installed. Left this step in to highlight the
Linux distribution the commands below were executed on.
Install the Linux distribution of choice on amd64 platform (Ubuntu 18.04 is used
for this document). You will not need to do this if you already have a Linux
distribution installed. Left this step in to highlight the Linux distribution
the commands below were executed on.
login and open a terminal to get a shell prompt
Download MANDATORY DEPENDENCIES (browser)
-----------------------------------------
Install Qt
----------
Download and install the Qt SDK from http://qt-project.org/
Once that is completed test qmake is ok with: qmake --version (should report 4.9.8 or higher)
You can use a browser to download and run the interactive installer, be sure to
select version 5.15.2 or higher Qt 5 version, including at least the following modules:
- Desktop gcc 64-bit
- Qt Charts
- Qt WebEngine
Once this step is completed add the bin directory to PATH and test qmake is ok:
$ qmake --version
DEBIAN-BASED DISTRIBUTION INSTRUCTIONS
--------------------------------------
Install git with:
Install git
-----------
$ sudo apt-get install git
Said Y to prompt about all git files installed (git-gui et al)
Install FLEX and BISON
----------------------
You will need flex v2.5.9 or later
$ sudo apt-get install bison
$ sudo apt-get install flex
Install Mesa OpenGL utility library
-----------------------------------
sudo apt-get install libglu1-mesa-dev
ARCH-BASED DISTRIBUTION INSTRUCTIONS
------------------------------------
Install GSL development libraries
---------------------------------
sudo apt-get -qq install libgsl-dev
Install git:
$ sudo pacman -S git
INSTALL FLEX and BISON
----------------------
$ sudo pacman -S flex bison
NEXT STEPS
----------
$ vi gcconfig.pri
Ensure you have the following lines (which are now also in gcconfig.pri.in which has
been updated to reflect the new dependencies in version 3)
QMAKE_LEX = flex
QMAKE_YACC = bison
win32 {
QMAKE_YACC = bison --file-prefix=y -t
QMAKE_MOVE = cmd /c move
QMAKE_DEL_FILE = rm -f
}
Build!
------
$ make clean
$ qmake
$ make
To compile translation you need QT tool - lrelease
If it is not found using he defaults in src/src.pro then set the full path and filename in gcconfig.pri
QMAKE_LRELEASE = /usr/bin/lrelease
When build first time you get number of error messages on .qm files missing:
"RCC: Error in 'Resources/application.qrc': Cannot find file 'translations/gc_fr.qm'"
You can ignore these messages for your build. The .qm files will be created during the
build at a later point in time via the "lrelease" command you configured in gcconfig.pri)
If your QT build includes its own local compress libs then you should comment the line below in gcconfig.pri,
otherwise you will need to have the compress libraries installed separately.
#LIBZ_INCLUDE =
#LIBZ_LIBS = -lz
You will now have a release3 binary but with none of the release3 dependencies compiled in.
Issue tracker is **only** for Bugs and Features, before to open a new issue please read the contributing guidelines (link below), and use the forums if you need help or technical support.
Issue tracker is **only** for Bugs and Features, please don't open issues for questions or technical support. Before to open a new issue please read the contributing guidelines (link below).
If you have questions, please read the FAQs and User's/Developer's Guide:
GoldenCheetah is an open-source data analysis tool primarily written in C++
with Qt for cyclists and triathletes
with support for training as well.
GoldenCheetah is a desktop application for cyclists and triathletes and coaches
* Analyse using summary metrics like BikeStress, TRIMP or RPE
* Extract insight via models like Critical Power and W'bal
* Track and predict performance using models like Banister and PMC
* Optimise aerodynamics using Virtual Elevation
* Train indoors with ANT and BTLE trainers
* Upload and Download with many cloud services including Strava and Todays Plan
* Import and export data to and from a wide range of bike computers and file formats
GoldenCheetah can connect with indoor trainers and cycling equipment such
as cycling computers and power meters to import data.
In addition, GoldenCheetah can connect to cloud services.
It can then manipulate and view the data, as well as analyze it.
GoldenCheetah provides tools for users to develop their own own metrics, models and charts
* A high-performance and powerful built-in scripting language
* Local Python runtime or embedding a user installed runtime
* Embedded user installed R runtime
GoldenCheetah supports community sharing via the Cloud
* Upload and download user developed metrics
* Upload and download user, Python or R charts
* Import indoor workouts from the ErgDB
* Share anonymised data with researchers via the OpenData initiative
GoldenCheetah is free for everyone to use and modify, released under the GPL v2 open source license with pre-built binaries for Mac, Windows and Linux.
## Installing
@@ -26,15 +35,18 @@ INSTALL-WIN32 For building on Microsoft Windows
INSTALL-LINUX For building on Linux
INSTALL-MAC For building on Apple OS X
INSTALL-MAC For building on Apple MacOS
macOS and Linux: [](https://travis-ci.org/GoldenCheetah/GoldenCheetah)
macOS and Linux: [](https://app.travis-ci.com/GoldenCheetah/GoldenCheetah)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.