Compare commits

...

1735 Commits

Author SHA1 Message Date
Mark Liversedge
925445a215 VERSION 3.6 RELEASE
.. final release of version 3.6
2023-08-05 10:02:09 +01:00
Alejandro Martinez
511456bacd Update snapshot builds
To test latest changes before release
[publish binaries]
2023-07-30 13:39:32 -03:00
Alejandro Martinez
28f623b517 Preserve current layout as Legacy perspective
appending default perspectives for the view.
Fixes #4363
2023-07-03 15:16:57 -03:00
peret2000
4931ad1bd7 Upgrade Python AppImage version for Linux builds (#4375)
Python 3.7.16 AppImage is no longer available, upgrade to 3.7.17
2023-06-27 19:56:22 -03:00
Alejandro Martinez
7173437ab2 Update FIT SDK definitions to 21.115 2023-06-22 20:03:43 -03:00
dconka
14cb588f55 Update nongarmin.json (#4373)
Add new SIGMA ROX 12.1 EVO
2023-06-22 19:57:59 -03:00
Alejandro Martinez
2934bfe3bd Update German translation
Contributed by Marcen at the users forum
2023-06-20 17:45:51 -03:00
Mark Liversedge
dc3436dc65 Update README.md
.. OS X is now called MacOS (bit late to this one)
2023-06-08 15:24:10 +01:00
grauser
190aca8a73 Avoid double warning message 2023-06-07 22:47:07 +02:00
Mark Liversedge
6ef1cb7b96 Update README.md
.. include references to community sharing via cloud db
   open data and erg db

[skip ci]
2023-06-05 10:37:13 +01:00
Mark Liversedge
169c23ee58 Update README.md
.. more informative description with more fact based 
   statements and less emotive or hyperbolic language

[skip ci]
2023-06-05 10:31:26 +01:00
Mark Liversedge
7bf96285e7 Update README.md
.. screenshot instead of icon for github readme

[skip ci]
2023-06-05 10:06:28 +01:00
Mark Liversedge
067696aafd Screenshot for README.md
... Rather than the GC icon, lets put a screenshot of the app on the github
    welcome page for the repo

[skip ci]
2023-06-05 10:02:33 +01:00
peret2000
b07a7ef491 Use bicycle weight in Virtual Speed while training (#4365)
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
2023-06-04 17:05:02 -03:00
Mark Liversedge
7a1d99fca9 Refresh snapshot builds
.. last MacOS snapshots has an issue with the version of
   QT used and font matching which was fixed via a new commit.

[publish binaries]
2023-06-03 09:12:45 +01:00
Mark Liversedge
8b3dbbca7b Python 'printd' debug output strings not wide
.. 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
2023-06-01 09:12:58 +01:00
Poncho
e0a198a164 Fix python embedding crash with Python 3.11
.. use of standard strings instead of wide strings.

Fixes #4362
2023-05-31 21:14:11 +01:00
Mark Liversedge
f965345abc MacOS default font scaling smaller
.. 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
2023-05-30 12:24:32 +01:00
Mark Liversedge
9b88abdeee Search QFontDatabase for installed fonts
.. 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
2023-05-30 08:28:49 +01:00
Alejandro Martinez
a37e27770c Update snapshot builds
For testing new default appearance settings
[publish binaries]
2023-05-28 18:20:46 -03:00
Mark Liversedge
228e2f24f9 Better fallback font sets
.. more likely to find Clear Sans and PT Sans on Linux
   and Mac respectively. Should avoid the dreaded Arial.
2023-05-28 17:17:42 +01:00
Mark Liversedge
93f8599070 Weird issue with QString arguments
.. fixed but not really sure why there was a problem
2023-05-27 12:04:53 +01:00
Mark Liversedge
7447af7053 About dialog show UI info
.. 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
2023-05-27 11:37:47 +01:00
Mark Liversedge
922c5e6985 Default Appearance Settings 2 of 2
.. 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.
2023-05-27 09:55:45 +01:00
Mark Liversedge
8a5bbc276f Fixup MacOS compiler error
.. last commit broke MacOS build and also left an errant debug
   statement in there for good measure
2023-05-26 13:23:04 +01:00
Mark Liversedge
c97efc1e49 Preferences reset appearances
.. 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.
2023-05-26 10:42:35 +01:00
Mark Liversedge
c01797b422 Minor fixup for default appearance recent commit
.. missing header broke build on MacOS

.. default width for mainwindow corrected
2023-05-25 11:24:26 +01:00
Mark Liversedge
47688ba754 Font fallback list use QString not char *
.. since initialising the array from strings is not supported
   in c++11 and causes a compile time error on Windows
2023-05-25 09:33:43 +01:00
Mark Liversedge
c97eac67a2 Default Appearance Settings 1 of 2
.. 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
2023-05-25 08:44:43 +01:00
Poncho
1a39471ad6 src/Python/PythonEmbed.cpp: forward python errors to the console (#4359) 2023-05-14 12:19:34 -03:00
Paul Johnson
0bf39ec4dd Stop batch processing entries from being edited (#4356) 2023-05-14 12:18:28 -03:00
Alejandro Martinez
103c87c600 Deprecate NewMainWindow
Complements fc3de5f
2023-04-22 21:13:34 -03:00
Alejandro Martinez
a3873a30fe Deprecate GProgressDialog
It was used only by the also deprecated MetricAggregator
2023-04-22 20:15:49 -03:00
Alejandro Martinez
efe64d3a96 Biweekly snapshot builds
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]
2023-04-15 18:55:20 -03:00
Alejandro Martinez
dbd33465c4 Update FIT SDK to 21.105 2023-04-14 20:02:39 -03:00
Mark Liversedge
708d8744f6 Support larger font scaling
.. 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.
2023-04-13 11:01:11 +01:00
Alejandro Martinez
c85dab80a8 Skip previously imported files on Auto-Import (#4347)
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 #3696
Fixes #1892
2023-04-12 10:28:24 -03:00
Alejandro Martinez
1ecc6f9ec9 Python - Add compare support to activity series (#4349)
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
2023-04-11 18:06:39 -03:00
Alejandro Martinez
26bf31a3d6 Biweekly snapshot builds
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]
2023-04-01 10:29:25 -03:00
vlcvboyer
97d5c896bd Code clean out (removing few warnings from build log) (#4331)
* 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>
2023-03-29 19:36:46 -03:00
Alejandro Martinez
f0c9f12b44 FitRideFile - Identify Pulse Ox field
Generated by Garmin Health Snapshot activity.
Fixes #4344
2023-03-28 21:28:18 -03:00
Alejandro Martinez
ab337f165a WorkoutWizard - Remove references to FTP and CP60
Workouts are scaled using CP in GoldenCheetah.
2023-03-26 12:59:19 -03:00
Alejandro Martinez
1ae41e576a Revert "Workout Wizard - Honor Use CP as FTP setting"
This reverts commit 0767a98d0d.
My former interpretation was wrong, Workout Editor only
uses FTP for Coggan metrics, scaling uses CP.
2023-03-25 18:56:13 -03:00
Alejandro Martinez
0767a98d0d Workout Wizard - Honor Use CP as FTP setting
Like Workout Editor does, it is confusing otherwise.
2023-03-25 10:54:33 -03:00
vlcvboyer
00d09af489 Highlight current selection in Train and Trends (#4320)
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>
2023-03-25 10:33:46 -03:00
Alejandro Martinez
e7b9275a36 Update Italian translation
Contributed by Giuseppe Cifelli at the users forum.
2023-03-24 10:05:27 -03:00
Mark Liversedge
fc10661541 Revert SearchBox styling updates
.. 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
2023-03-24 09:44:05 +00:00
Mark Liversedge
536057bf66 Fixup Search/Filter Toolbutton on Linux
.. at least its fine on Linux, but need to consider how these
   changes have impacted MacOS separately.
2023-03-24 09:16:51 +00:00
Paul Johnson
fdb35bf74e Athlete tab colour fix (#4257)
* 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>
2023-03-23 20:01:46 -03:00
Alejandro Martinez
e32eabc102 Update German translation
Contributed by Marcen at the users forum
2023-03-22 13:26:10 -03:00
Alejandro Martinez
985710a828 Update v3.6-RC4 builds
Fixes AZUM secret and Batch Processing localization issues
[publish binaries]
2023-03-21 10:30:07 -03:00
Alejandro Martinez
1aa166bea1 Patch Secrets.h with AZUM secret
Missing from previous commit
2023-03-20 22:01:47 -03:00
Alejandro Martinez
884cfef788 Update translation files for BatchProcessingDialog 2023-03-20 20:19:59 -03:00
Alejandro Martinez
02ad9767e2 BatchProcessingDialog - Fix localization errors
- 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
2023-03-20 20:19:02 -03:00
jgpallero
574c8005c3 Spanish translation update (#4342) 2023-03-20 13:44:41 -03:00
Alejandro Martinez
b907e7f0a6 V3.6 RC4 BUILD
Trigger v3.6 RC build.
[publish binaries]
2023-03-18 13:38:09 -03:00
Mark Liversedge
29f59e3e24 Fixup MacOS compile error
.. missing header for QMessageBox
2023-03-17 18:50:15 +00:00
Alejandro Martinez
36cb446810 Update translation files
to include strings in BatchProcessing dialog.
2023-03-17 13:45:36 -03:00
Alejandro Martinez
6bf7781aea Change running Python DPs from Edit menu
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.
2023-03-17 13:40:19 -03:00
Paul Johnson
add0f301e9 Batch processing (#4226)
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>
2023-03-17 13:01:48 -03:00
Alejandro Martinez
c77b32efaa Azum - Update Client ID and Secret 2023-03-16 15:28:29 -03:00
Alejandro Martinez
3aed45e96b FilterHRV - don't assume current activity
Fixes use from formulas and Python fixes
2023-03-14 13:07:26 -03:00
Alejandro Martinez
392ec2a74a Add Azum secret for AppVeyor builds 2023-03-13 11:49:46 -03:00
DanielZelei
2fc0c1d9ca Disable Azum logging 2023-03-13 09:08:53 +00:00
DanielZelei
dae573c939 Add optional user key to the Azum cloud provider 2023-03-13 09:08:53 +00:00
DanielZelei
0f5ec45308 Azum - disable logging 2023-03-13 09:08:53 +00:00
DanielZelei
a808b68ad7 Add new cloud service provider - Azum 2023-03-13 09:08:53 +00:00
Alejandro Martinez
5c0eb9910b Fix Travis-ci Linux build
[skip AppVeyor]
Copy sip.h to default Python include directory.
[publish binaries]
2023-03-05 20:08:34 -03:00
Alejandro Martinez
67136b3cdf Enable Python DPs use Metadata in automatic mode (#4336)
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]
2023-03-05 16:26:25 -03:00
Alejandro Martinez
42c43c7689 Fix Data Processors running on save after import
Currently they are ignored since applied to a RideFile
object immediatly discarded.
Changed to mimic behavior of CloudServices.
2023-03-05 13:16:02 -03:00
Alejandro Martinez
97570efdd2 Revert "Disable automatic execution of Python Data Processors"
This reverts commit 0d979f9fb9.
2023-03-01 21:25:15 -03:00
Alejandro Martinez
9b10f73422 Revert "Disable execution of Python DPs from formulas and Python API"
This reverts commit 434580ee81.
2023-03-01 21:22:32 -03:00
Alejandro Martinez
92963c8c83 Update default ODPM and WKO4 charts
Use the newly added timestring to format TTE
2023-02-27 13:06:24 -03:00
Alejandro Martinez
0e8fe3f9c9 Performance Tests - Add images for the wiki
[skip ci]
Contributed by Marcen at the forum
2023-02-27 11:33:06 -03:00
Alejandro Martinez
f2f519c44c New images for the wiki
[skip ci]
Contributed by Marcen at the forum
2023-02-19 22:10:16 -03:00
Alejandro Martinez
5f759c0b31 TabBar Chart Menu - image for the wiki
[skip ci]
Contributed by Marcen at the users forum
2023-02-18 16:21:30 -03:00
Alejandro Martinez
64907a3d2b Update CP Chart image for the wiki
[skip ci]
Contributed by Marcen at the users forum
2023-02-17 10:48:21 -03:00
Mark Liversedge
4e3e82655e Datafilter - double(p1) coerce to numeric
.. we already had string(p1) to coerce to string values but
   somehow forgot to do the reverse.
2023-02-13 08:54:36 +00:00
Alejandro Martinez
528259db3e Biweekly snapshot build
[publish binaries]
Cumulative changes from RC3
https://github.com/GoldenCheetah/GoldenCheetah/compare/v3.6-RC3...13167e0
2023-02-12 19:12:46 -03:00
Alejandro Martinez
13167e021c CP Chart - Add Delta Compare to standard settings
It was available only via reveal controls,
which are disabled in v3.6.
Fixes #4256
2023-02-07 22:07:57 -03:00
vlcvboyer
0904ebe1e0 Train - Accept gpx as videosynch source (#4329)
Fixes #4330
2023-02-06 12:48:42 -03:00
Alejandro Martinez
984f1f9d99 Fix German Translation
Contributed by Marcen at the users forum.
2023-02-02 20:13:33 -03:00
Alejandro Martinez
7c05a7f895 Update German Translation
Contributed by Marcen at the users forum
2023-02-02 16:04:20 -03:00
Alejandro Martinez
dda82c9a62 Images for the wiki - Overview Tiles for Trends
[skip ci]
Contributed by Marcen at users forum
2023-01-30 10:48:40 -03:00
Alejandro Martinez
dd8f8ebdce Images for the wiki-Overview Tiles for Activities
[skip ci]
Contributed by Marcen at users forum
2023-01-30 10:42:12 -03:00
Alejandro Martinez
ee65609143 Revert "New screen captures for the wiki - Overview Tiles for Activities"
[skip ci]
This reverts commit fb013c63e2.
Spaces in filenames are a PITA in github, will add them
again with underscores
2023-01-29 21:03:04 -03:00
Alejandro Martinez
84afd26262 Revert "New screen captures for the wiki - Overview Tiles for Trends"
[skip ci]
This reverts commit 7b7de8463b.
Spaces in filenames are a PITA in github, will add them
with underscores
2023-01-29 21:01:57 -03:00
Alejandro Martinez
7b7de8463b New screen captures for the wiki - Overview Tiles for Trends
[skip ci]
Contributed by Marcen at users forum
2023-01-29 20:19:45 -03:00
Alejandro Martinez
fb013c63e2 New screen captures for the wiki - Overview Tiles for Activities
[skip ci]
Contributed by Marcen at users forum
2023-01-29 20:17:15 -03:00
Alejandro Martinez
54d388c2a3 Update screen captures to v3.6 for the wiki
[skip ci]
Contributed by Marcen at the users forum
2023-01-29 20:14:19 -03:00
Alejandro Martinez
11decfc508 Biweekly snapshot build
[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
2023-01-28 18:42:36 -03:00
Mark Liversedge
402edf51fc Stop signal processing during resetPerspective()
.. fixes undesirable behaviour with click thru on user charts

Fixes #4325
2023-01-28 17:44:51 +00:00
Mark Liversedge
64386bc1ba Perspective Selector Sync on switch Athlete tabs
.. 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
2023-01-28 16:28:08 +00:00
Alejandro Martinez
b6fae05d48 Revert "Keep Perspective Selecto synced when switching athletes"
This reverts commit 3a16d1ecc2.
2023-01-26 15:31:58 -03:00
Alejandro Martinez
9eb81385e8 Revert "Fix strange behaviour when changing views"
This reverts commit 0ddea94b7a.
2023-01-26 15:31:29 -03:00
Alejandro Martinez
0ddea94b7a Fix strange behaviour when changing views
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.
2023-01-26 12:06:37 -03:00
Alejandro Martinez
88246a8b15 Overview Chart - Update metric pointer in tiles config
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.
2023-01-25 16:40:37 -03:00
Alejandro Martinez
46bfab5c8b Overview - Use sport instead of isRun/isSwim
It is simpler and more general to get activities from the same sport.
2023-01-24 20:37:03 -03:00
jgpallero
663bde04c5 Update Spanish translation (#4322) 2023-01-23 11:22:08 -03:00
Alejandro Martinez
30895b028d Update translation files to include latest strings 2023-01-23 09:43:12 -03:00
vlcvboyer
af21c35022 FIT Files - Update sport list and sub sports (#4315)
* 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 #4312
Fixes #4313
2023-01-21 18:58:30 -03:00
Alejandro Martinez
68c795440c Add test FIT file from Garmin 945 swim with RR data
[skip ci]
2023-01-20 20:58:53 -03:00
vlcvboyer
dfe572c005 Collect R-R data from Garmin HRM swim (#4319)
Fixes #4024
2023-01-20 20:51:16 -03:00
Alejandro Martinez
ef0eac8908 Estimator - Use normalized Sport names
Otherwise Rowing will not match Row activities, for example.
Continuation of cc5eaf4
2023-01-18 21:29:05 -03:00
Alejandro Martinez
9531acf366 Remove Garmin devices already included in latest FIT SDK 2023-01-18 21:27:39 -03:00
Alejandro Martinez
6f6d7c6a8f Biweekly snapshot build update
[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
2023-01-17 18:59:11 -03:00
Alejandro Martinez
523d2d1909 Update FITmetadata.json to FIT SDK 21.94 2023-01-17 18:48:35 -03:00
Alejandro Martinez
bfa4b4b977 DataFilter - Metric aggretation honors AggregateZero and Count
When computing metric averages
2023-01-16 12:54:29 -03:00
Alejandro Martinez
c65f313de5 Revert "DataFilter - use RideCache::getAggregate continuation"
This reverts commit 841766effb
since it provokes crashes in some Trends Overview charts.
TODO: fix aggregation to consider AggregateZero and count
properties of metrics.
2023-01-15 21:44:56 -03:00
Alejandro Martinez
b689d29653 Biweekly snapshot build
[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
2023-01-14 19:38:19 -03:00
Alejandro Martinez
e95d11671a DataFilter - Avoid crashes when no ride is selected
This is an edge case, no ride available or no one selected,
but it can happens, so lets avoid the crash.
2023-01-14 10:29:42 -03:00
Mark Liversedge
3c3d2024ac Fix DataFilter use of PowerIndex
.. 3rd param is not required as it gets defaulted, and has
   recently changed from bool to QString

Fixes #4308
2023-01-14 10:50:37 +00:00
Alejandro Martinez
cc5eaf4187 Estimates and Performances - Generalize to any sport with power data (#4307)
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
2023-01-13 14:58:05 -03:00
Alejandro Martinez
abb69b8fb5 DialWindow - Fix rolling average initialization
Reported in #4298
2023-01-11 19:40:29 -03:00
Alejandro Martinez
841766effb DataFilter - use RideCache::getAggregate continuation
This completes afbb43edd1
2023-01-03 16:19:03 -03:00
Alejandro Martinez
afbb43edd1 DataFilter - asaggstring uses RideCache::getAggregate
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.
2023-01-02 15:38:50 -03:00
Alejandro Martinez
33ba1c03ec FitRideFile - Avoid crashes on multi-sessions from CloudServices
CloudServices doesn't request for multi-sessions and a crash
happens when available.
Reported at the forum by CloudServices developer.
2022-12-29 09:30:11 -03:00
Alejandro Martinez
bb972b7e8a Biweekly snapshot build
[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
2022-12-23 18:11:49 -03:00
Erik Botö
018bd404e8 FTMS: Add support for Spin Down Calibration (#4073)
Initial implementation - merged for testing since it seems to be safe.
2022-12-21 17:25:54 -03:00
Alejandro Martinez
4f97bae97d DOB - display using 4 digits year
To avoid issues like #2584
2022-12-21 13:28:38 -03:00
Alejandro Martinez
dfeb8532a9 macOS plist - Add required BTLE keys for newer versions
[skip AppVeyor]
According to https://bugreports.qt.io/browse/QTBUG-96557
Intended to fix #4093
2022-12-19 19:00:56 -03:00
peret2000
2a99c87620 Python 3.7.15 AppImage is no longer available, upgrade to 3.7.16 (#4299) 2022-12-19 08:34:03 -03:00
Peter Kanatselis
0296693ddd Workout Chart - Imperial units support (#4232)
Co-authored-by: Alejandro Martinez <amtriathlon@gmail.com>
2022-12-17 19:47:25 -03:00
Alejandro Martinez
8919eab5b2 Map Chart - Update default Tile Servers 2022-12-16 17:35:01 -03:00
Peter Kanatselis
7d0e6de0b1 Bug Fixes for live map base url and remove erroneous debug message (#3901)
Use default OSM tile server
Co-authored-by: Alejandro Martinez <amtriathlon@gmail.com>
2022-12-16 16:26:18 -03:00
Alejandro Martinez
1c5bbecf1c Train - Improve L/R Balance Dial display
Includes proper treatement for NA, switched L/R and
enables averaging.
Fixes #4298
2022-12-16 15:49:22 -03:00
Alejandro Martinez
8e0b0a67a6 R/Python API - Sport case insensitive in Athlete Zones
For backward compatibility with existing charts
2022-12-14 13:43:17 -03:00
Alejandro Martinez
b08e662c9d Train - Show lap notifications only when available
It is misleading otherwise.
2022-12-12 19:53:16 -03:00
Alejandro Martinez
5af234d6ad Biweekly snapshot build
[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
2022-12-11 13:13:14 -03:00
Alejandro Martinez
2c3eabdd8b RideCache - Fix refresh to include the oldest activity
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
2022-12-10 10:14:44 -03:00
Alejandro Martinez
9c7d1d4f31 Strava Sync - Tag simulation rides as VirtualRide
Also map Walking Sport to Walk activity type
2022-12-05 17:10:04 -03:00
Alejandro Martinez
53f8f5102c Fix memory leak in Python API - part 2
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.
2022-12-03 12:07:06 -03:00
Alejandro Martinez
e477b05a98 ErgDB Download - Decode title to be used as name
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.
2022-12-01 13:16:47 -03:00
Alejandro Martinez
3a16d1ecc2 Keep Perspective Selecto synced when switching athletes
Fixed error reported by Marcen in users forum
2022-11-30 10:27:10 -03:00
Alejandro Martinez
63d13ba9e5 Update Italian translation
Contributed by https://github.com/gicif
Fixes #4296
2022-11-29 16:57:59 -03:00
Alejandro Martinez
f947b6bd31 VideoSync - Distance scaling only applies to CRS workouts 2022-11-29 14:35:22 -03:00
Alejandro Martinez
67962bfff8 Fix memory leak in Python API
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]
2022-11-28 14:33:49 -03:00
Christoph Hasse
5f22d12a61 fix(doc): mention QMAKE_MOVE requirement for bison > 3.7
[skip ci]
2022-11-20 19:46:15 -03:00
Alejandro Martinez
996ee63cd5 Remove MapQuest API Key from gcconfig.pri.in
It was deprecated and replaced by OpenElevation public API
[publish binaries]
2022-11-15 12:48:16 -03:00
Alejandro Martinez
a7ad1346e8 Measures CSV Import - Last field can be empty
Fixes #4292
2022-11-13 17:36:35 -03:00
Alejandro Martinez
90172a4a62 Replace Tracker in default Trends layout
It is now an Overview with a Table tile, original
LTM Tracker still available as a Library chart.
2022-11-10 12:17:56 -03:00
Alejandro Martinez
68b70e0e4d Fix Elevation - Avoid 302 network error
Even when the API is unlimited we get 302 error for longer rides,
lets avoid it breaking requests in smaller chunks.
2022-11-09 13:58:29 -03:00
Alejandro Martinez
434580ee81 Disable execution of Python DPs from formulas and Python API
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
2022-11-07 20:21:56 -03:00
Alejandro Martinez
cb23914a5f Honor chart filters in Trends view Histogram and CP charts (#4287)
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
2022-11-01 18:29:34 -03:00
Alejandro Martinez
1941b9af7f Minimum bison version is now 2.7
[skip ci]
2022-10-30 12:16:46 -03:00
Mark Liversedge
67352f6dc2 V3.6 RC3 BUILD
.. trigger build of RC3

[publish binaries]
2022-10-29 20:23:56 +01:00
Alejandro Martinez
fa8eb0b6da DataFilter parser - remove warnings and avoid crash on syntax error
- 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.
2022-10-28 17:24:10 -03:00
Alejandro Martinez
5a77180957 Enable builds using bison 3.7 or higher
[skip ci]
Fixes #3586
2022-10-27 13:54:34 -03:00
Alejandro Martinez
50a027ad70 Update Italian translation
Contributed by https://github.com/gicif, Fixes #4283
2022-10-27 10:36:56 -03:00
Alejandro Martinez
a99cc3305e Datafilter - Add Compound case to Leaf::toString
For debugging and completenes
2022-10-26 18:01:01 -03:00
Alejandro Martinez
6f4da994a2 Strava download - avoid crashes when lap swim file has 0 lenght lap
Includes sample file from users forum
2022-10-26 11:20:43 -03:00
Alejandro Martinez
8946c53650 Update default Favourite Metrics
To include Time Recording, Time Moving and Running Cadence.
2022-10-25 20:53:51 -03:00
Alejandro Martinez
92ab04ac8a Upgrade bison to v2.7 for macOS builds on Travis-ci
[skip AppVeyor]
This is the minimum change to be able to use %destructor in
DataFilter.y, the same version is used for Windows builds.
2022-10-24 14:09:49 -03:00
Mark Liversedge
cfa767a854 VERSION 3.6 RC3 DEVELOPMENT BUILD
.. another release candidate prior to release

[publish binaries]
2022-10-23 11:51:54 +01:00
Alejandro Martinez
9af08b7f3c Release memory when DataFilter parsing fails
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
2022-10-22 17:22:23 -03:00
Alejandro Martinez
523ffcc702 Avoid crashes when DataFilter parsing fails
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
2022-10-20 20:27:19 -03:00
peret2000
5c4f6e1f82 Upgrade Python AppImage version for Linux builds (#4281)
Python 3.7.14 AppImage is no longer available, upgrade to 3.7.15
2022-10-18 14:25:51 -03:00
Alejandro Martinez
761e0527a2 Change DataFilter lexer to process non ASCII string constants
Fixes #4278
2022-10-18 11:18:33 -03:00
Alejandro Martinez
fd3bab7e85 Add swimscore.pdf and govss.pdf to repository
[skip ci]
They are no available anymore from the original source
Fixes #4279
2022-10-18 10:43:41 -03:00
Alejandro Martinez
327150d659 Add DataFilter destructor calling clearFilter to release memory
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.
2022-10-16 15:58:37 +01:00
Alejandro Martinez
d5905d92d0 Leaf::clear - delete container elements after clear 2022-10-16 15:58:37 +01:00
Alejandro Martinez
10c2660f0b clearFilter - release memory avoiding crashes
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
2022-10-16 15:58:37 +01:00
Alejandro Martinez
82e79fa898 Disable Leaf::clear method to avoid crashes
Lets avoid crashes until #4249 is fixed
2022-10-09 10:46:22 -03:00
Alejandro Martinez
8860d5da08 Don't show the option to hide Activity labels in Options > Apperarance
Since it is commented out in RideNavigator.
TODO: cleanup if this is not useful anymore
2022-10-02 19:43:35 -03:00
Alejandro Martinez
746cea2d26 Add Preferences > Intervals image for the wiki
[skip ci]
2022-10-02 15:58:31 -03:00
jgpallero
edfc3ba642 Small syntax correction in Spanish translation (#4275) 2022-10-01 17:39:27 -03:00
Alejandro Martinez
a6338ee381 Update Share menu image for the wiki
[skip ci]
2022-10-01 10:58:18 -03:00
Alejandro Martinez
234bdb67e6 Add Equipment chart to default Trends layout
Contributed at the forum, it is a nice example of User Chart,
and it allows a general exploit of the Equipment data field.
2022-09-28 12:24:27 -03:00
Alejandro Martinez
b43723e8ff Use default Overview configuration when replacing old Summary charts
They are likely more useful for existing users and, hopefully,
they will produce less user complains than blank Summary charts.
2022-09-26 21:35:23 -03:00
Alejandro Martinez
6b15b7e50e kml files are not supported for import
Just as output files for Google Earth et. al.
Fixes #4271
2022-09-25 19:54:18 -03:00
grauser
7b64448912 fix(xert):name can be utf8
[publish binaries]
2022-09-15 14:15:11 +02:00
grauser
925d5c3521 fix(oauth):correct nolio secret param name
[publish binares]
2022-09-15 12:50:23 +02:00
Alejandro Martinez
0185080f3f Upgrad Python AppImage version for Linux builds
[skip AppVeyor]
Python 3.7.13 AppImage is no longer available,
upgrade to 3.7.14
[publish binaries]
2022-09-09 19:19:19 -03:00
Alejandro Martinez
3b528f8a12 Update VERSION36_BUILD and generate snapshots
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]
2022-09-09 18:12:10 -03:00
Alejandro Martinez
56500cf357 R Chart API - Add missing constants 2022-09-08 10:21:42 -03:00
Alejandro Martinez
eca82afa4e Wiki - Remove old scope bar image 2022-09-08 10:20:58 -03:00
Alejandro Martinez
abde31ecc3 Wiki - Update UILayout_MainWindowElements image
[skip ci]
Contributed by Marcen at the users forum
2022-09-06 20:38:57 -03:00
Alejandro Martinez
1be14feb6d Wiki - Update Help Menu
[skip ci]
2022-09-06 14:12:37 -03:00
Alejandro Martinez
0d30d446f8 Avoid crashes if perspective is not set
Continuation of fbae10f
2022-09-06 10:18:46 -03:00
Alejandro Martinez
fbae10f103 Avoid crash in CP chart when perspective is not set
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.
2022-09-05 12:39:08 -03:00
Alejandro Martinez
cc6738bdf5 Remove R charts from default layouts
SS-RR and Tri Mix replaced by Python versions
contributed by Fe at the users forum.
The intention is to avoid triggering #4267
2022-09-05 11:51:44 -03:00
Alejandro Martinez
7d7ed5cfb3 Fix drag and drop to compare pane issues for v3.6
- 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]
2022-09-03 11:17:28 -03:00
Alejandro Martinez
300960f234 Add Repository Search imgage for the Wiki
[skip ci]
2022-09-01 10:14:13 -03:00
Alejandro Martinez
b02b5f1265 Trends Sidebar - Don't process itemChanged event from date range tree
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
2022-08-31 20:07:02 -03:00
Alejandro Martinez
80b671f4aa Update German Translation
Contributed by forum user Marcen
2022-08-29 19:00:17 -03:00
Alejandro Martinez
ef23cb5d1c Estimator - Add model identification to debug log 2022-08-29 13:28:01 -03:00
jgpallero
a212ff6408 Update Spanish translation (#4265) 2022-08-27 19:20:29 -03:00
Alejandro Martinez
efd9253352 Update translations to include latest strings before release
To enable testing and finish translations
[publish binaries]
2022-08-27 10:38:42 -03:00
Alejandro Martinez
aae3376135 R athlete.zones - generalize for all sports and add hr/pace lows
Fixes #4262
2022-08-25 22:59:45 -03:00
Alejandro Martinez
c1bbe1b590 Python athleteZones - generalize for all sports and add hr/pace lows
Part 1 of #4262
2022-08-25 20:03:36 -03:00
Alejandro Martinez
f8b6cc6c17 FixElevation - Use post instead of get for open-elevation requests
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
2022-08-25 12:21:46 -03:00
Alejandro Martinez
82df874e54 Update German translation
Contributed by Marcen at the users forum
2022-08-24 19:00:53 -03:00
Alejandro Martinez
7b44eaa7a8 Deprecate Google Drive and Calendar due to changes in OAuth
Fixes #4259
2022-08-24 18:55:44 -03:00
Alejandro Martinez
a31ce926dc Enable Estimator debug as a runtime option
It can be enables adding:
--debug-rules "gc.estimator.debug=true"
to the command line.
2022-08-24 13:04:03 -03:00
Alejandro Martinez
481e11fffc Avoid random crash in HrPwPlot when HR>=220
Fixes #4260
2022-08-24 12:37:14 -03:00
Alejandro Martinez
0108a05f5a Fit file import - Interpolate lrbalance between valid values only
Fixes #4117
2022-08-23 18:03:59 -03:00
Alejandro Martinez
700f855ce1 Strava download - Update RPE field if present
Fixes #3444
NB: activity creation doesn't support this paramter,
so it is only one way sync for the moment.
2022-08-23 12:37:03 -03:00
Alejandro Martinez
1e8220237c Update Python library with missing constants for Qt Charts
Documented in the wiki. Fixes #4009
TODO: annotate is disabled and it needs work to support the different
types.
2022-08-23 11:27:42 -03:00
Alejandro Martinez
6914832c24 Snapshot builds to test Fix Elevation using Open-Elevation.com
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]
2022-08-22 18:49:53 -03:00
Alejandro Martinez
07f672ff80 Add GC_ALIGN_NONE to Python Library
[skip ci]
2022-08-22 10:05:38 -03:00
Alejandro Martinez
d58c539c00 User Chart Axis Settings - Show/Hide log option
According to Axis type, currently it is supported
for continuous axis only.
2022-08-21 19:05:55 -03:00
Alejandro Martinez
a0a2b28629 Update user chart dialogs for the wiki
[skip ci]
Fixes #4115
2022-08-21 19:04:56 -03:00
Alejandro Martinez
3a34f7ce55 FixElevation - Change MapQuest to Open-Elevation (#4258)
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
2022-08-20 12:17:56 -03:00
Mark Liversedge
84eceebd00 Fix metric refresh SEGV
.. when athlete has < 10 activies modulo 0 causes arithmetic
   operation crash (divide by zero).
2022-08-17 23:20:42 +01:00
Mark Liversedge
853e248383 FIT nongarmin.json remove duplicate entries
.. added same rows twice in error.

[skip ci]
2022-08-17 14:28:32 +01:00
Mark Liversedge
ce089de33e FITmetadata.json
.. 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.
2022-08-17 14:20:16 +01:00
Alejandro Martinez
3180a166d8 Disable Reveal Controls
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
2022-08-14 21:12:10 -03:00
Alejandro Martinez
f3b78338ac Update German translation
Contributed by Marcen at the forum
2022-08-14 17:42:10 -03:00
Alejandro Martinez
02cab3029b Travis-ci - cache macOS app package
[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]
2022-08-13 16:41:37 -03:00
Mark Liversedge
47355d17fe V3.6-RC2 Build Trigger
[publish binaries]
2022-08-13 11:22:12 +01:00
Mark Liversedge
d8dc986c1e VERSION 3.6 RELEASE CANDIDATE 2 AUGUST 2022
.. 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).
2022-08-13 10:28:22 +01:00
Alejandro Martinez
e3611455e4 Add default metadata.xml to Athlete config on upgrade
To incorporate new metadata supported in v3.6 to global metadata.xml
for existing users, for new users we use default as before.
Fixes #3913
2022-08-12 15:55:56 -03:00
Alejandro Martinez
d4f382e35d Simplify default named filters
isRide is new for v3.6, <>0 is redundant
2022-08-12 11:26:59 -03:00
Alejandro Martinez
3bbd6ca334 Fix Triathlon and Measure default Trends perspectives
Colors and TriMix
2022-08-11 15:23:11 -03:00
Alejandro Martinez
d21ea7b26b Update toolbar image for the wiki
[skip ci]
2022-08-11 11:44:32 -03:00
Alejandro Martinez
4065534882 Add Perspectives to Default Trends Layout
- 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
2022-08-10 18:11:42 -03:00
Alejandro Martinez
5e4189fa1a Add Run, Swim and combined Map perspectives to Default Analysis layout
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.
2022-08-10 11:39:42 -03:00
Alejandro Martinez
c0ec0aaa28 Train View Perspective Switch on Workout selection
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.
2022-08-07 17:05:44 -03:00
Alejandro Martinez
d35f7b22e5 Remove qDebug from previous commit
[skip ci]
2022-08-07 15:09:51 -03:00
Alejandro Martinez
be797ffb31 Train View Perspective Switch - Add Map Workout option
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
2022-08-07 14:49:15 -03:00
Alejandro Martinez
f015322040 Change FITmetadata.json git mode from symlink to file
[skip AppVeyor]
Fixes #4254
2022-08-07 11:27:43 -03:00
Alejandro Martinez
09686a2cb7 Update Library Charts for v3.6 using standard colors
Part of #3899
2022-08-06 14:09:40 -03:00
Alejandro Martinez
9e13b73375 Add standard color for Stress Ramp Rate
Part of #3914
2022-08-06 14:08:55 -03:00
Alejandro Martinez
f82dd1b456 Metric Trends Charts - Disable ws and multi models 2022-08-06 11:02:30 -03:00
Alejandro Martinez
394309a7a6 Decode Garmin Real-time Stamina from FIT files
Fixes #4253
2022-08-03 11:06:35 -03:00
Alejandro Martinez
dc470ecf74 FITmetadata.json - Avoid symlinks due to git behavior on Windows
Continuation of c50cd4c
2022-08-03 10:56:32 -03:00
Mark Liversedge
c50cd4c0cc Minor tweaks for FIT metadata code/json
.. 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
2022-08-02 08:11:16 +01:00
Alejandro Martinez
4ed7425d0c Fit import - add new sensor types and devices 2022-08-01 23:01:42 -03:00
Mark Liversedge
1b007014f1 Refresh FITmetadata.json from website
.. 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.
2022-07-31 15:47:53 +01:00
Alejandro Martinez
76bf1bba21 FitRideFile - Fix compiler errors for MSVC Windows builds
Avoid the clash between implicit default constructors and member variables
Continuation of a5d57cf
2022-07-31 11:19:57 -03:00
Mark Liversedge
a5d57cf3fa FitRideFIle uses FITMetadata.json
.. 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.
2022-07-31 10:50:36 +01:00
Mark Liversedge
0a0c46b0e2 FITmetadata.json
Added the tooling to the util directory to generate a
JSON file with product and manufacturer metadata for
use by the FITRideFile decoder.

[skip ci]
2022-07-30 19:40:09 +01:00
Alejandro Martinez
8dcd869084 New FIT devices, manufacturer and types from FitSDK 21.8
and forum contributions
2022-07-29 12:19:18 -03:00
Alejandro Martinez
0e22bd8d1a Workout and VideoSync Import - Avoid unnecessary Warnings
When the file is imported from Workout and VideoSync Library
Complements c560f80
2022-07-28 20:14:31 -03:00
Alejandro Martinez
73e2e0709b Fix wrapper code for zlib to recognize directories
encoded as files of size=0 with names ending in "/"
Fixes #4189
2022-07-28 15:48:39 -03:00
Alejandro Martinez
c560f80245 Fix misleading warnings on Workout and VideoSync import
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.
2022-07-28 14:13:44 -03:00
Alejandro Martinez
83c145c270 ErgDB Download - add erg2 extension and uncheck All by default
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.
2022-07-28 11:47:35 -03:00
Alejandro Martinez
e738b81c7c DataFilter - Add events function to get current season events
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); });
2022-07-27 14:54:14 -03:00
Michal Powalko
d282d1f5b2 Add ID for Garmin Edge 1040 Solar 2022-07-27 12:02:27 +02:00
Alejandro Martinez
34b028ae1a Generic Plot Line Annotations - convert units according to axis type (#4250)
Time example for Activities: annotate(vline, "mid", solid, Duration/2);
Date example for Trends: annotate(vline, "mid", solid, Duration/2);
Fixes #4116
2022-07-26 19:21:36 -03:00
Alejandro Martinez
8fdc78b3fe Remove perspectives from stacks on Reset Layout
Fixes #4190
2022-07-25 21:00:51 -03:00
Alejandro Martinez
774704c072 Avoid to mischaracterize OW swims as Pool swims
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.
2022-07-25 14:28:13 -03:00
Alejandro Martinez
5ef4146971 Escape backslash and quotes from KPK and DATATABLE tiles program
Fixes #4113
[publish binaries]
2022-07-24 12:13:24 -03:00
Mark Liversedge
eee2ee9be2 Fix Memory Leak Data Filter
.. 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.
2022-07-24 08:29:40 +01:00
Mark Liversedge
3b17371687 Fix Memory Leak in RideFile::apendOrUpdate
.. replacing an existing point failed to free memory
   allocated.

Fixes #4248
2022-07-23 15:01:17 +01:00
Mark Liversedge
75800ce49f Fix memory leak in RideFile::append and friends
.. 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
2022-07-23 13:17:33 +01:00
Mark Liversedge
2674bf518b Fix SEGV on Import Chart
.. caused by not setting the perspective property when
   importing a chart.

Fixes #4247
2022-07-23 08:59:43 +01:00
Alejandro Martinez
387873d9f0 Guard GCC pragmas
To avoid warnings when using other compilers s.t. clang or msvc
2022-07-17 20:27:31 -03:00
Alejandro Martinez
9e99199553 Windows builds on AppVeyor - Avoid macro redefinition warnings
They made the build log practically unusable
[skip Travis]
2022-07-17 20:25:17 -03:00
Alejandro Martinez
0d979f9fb9 Disable automatic execution of Python Data Processors
They are only partially supported currently and this
confuses users. See #4095 for details.
2022-07-13 16:45:59 -03:00
jgpallero
3b073b9168 Update Spanish translation (#4245) 2022-07-11 20:52:54 -03:00
Alejandro Martinez
8d8d1a0601 Enable translation of IsoPower metric name and units
Update translation files to include the new strings added in latest
commits.
2022-07-11 19:46:21 -03:00
jgpallero
1967134418 Minor fixes in Spanish translation (#4243) 2022-07-11 17:35:54 -03:00
Alejandro Martinez
ecfc23455a Revert to Mojave for macOS Travis-ci builds
[skip appveyor]
Builds on Catalina are failing due to 50min max time limit.
[publish binaries]
2022-07-11 14:46:05 -03:00
Mark Liversedge
b96a31400b Fix Xert secret compile error
.. missing include for Secrets.h in source

Fixes #4244
2022-07-11 12:20:20 +01:00
Alejandro Martinez
98a3a6984c Update INSTALL documents to Qt5.15.2 and generate Snapshots
To enable more testing of the new background refresh, building with
Qt5.15 and Xert/Nolio credentials.
[publish binaries]
2022-07-10 13:05:47 -03:00
grauser
05992c8c2f ci:patch secret.h for Nolio 2022-07-09 17:43:12 +02:00
grauser
7e8f3a3228 Add GC_XERT_CLIENT_SECRET
[publish binares]
2022-07-09 17:11:56 +02:00
grauser
d3fb4f1685 Add GC_XERT_CLIENT_ID 2022-07-09 15:44:21 +02:00
Alejandro Martinez
cb1e59f9dd Histogram Chart - setIsBlank when data series is not available
Changes isDataPresent to check for derived series wattsKg and wbal
Fixes #4238
2022-07-07 11:46:33 -03:00
Alejandro Martinez
086be52ad9 Disable Power Index for running
We don't have standard model parameters for running, yet.
2022-07-06 20:13:34 -03:00
Alejandro Martinez
da01a8f39b Toolbar Perspectives - Screen captures for the wiki
[skip ci]
2022-07-04 21:48:19 -03:00
Alejandro Martinez
6d4921ba09 Add context sensitive help for the toolbar
Includes updated screen capture for the wiki.
2022-07-04 17:31:38 -03:00
Alejandro Martinez
48c8725507 Remove Velo and WS models from syntax helper
They are disabled in v3.6 due to fitting issues.
2022-07-03 13:21:56 -03:00
Mark Liversedge
ab055101e1 Dont use count {} in user metrics
.. 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 !
2022-06-25 23:50:05 +01:00
Mark Liversedge
66275c6c21 Template user metric infinite recurse
.. 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.
2022-06-25 23:13:57 +01:00
Mark Liversedge
e602ba4d31 Better metric refresh progress updates
.. 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.
2022-06-25 09:33:12 +01:00
Alejandro Martinez
4345c97960 RideCache refresh - avoid overloading the GUI event loop
When using concurrent map QFutureWatcher flow controls progress
notifications, this commit implements a basic version sending
1/100 refresh updates.
2022-06-24 11:58:36 -03:00
Alejandro Martinez
9d2d8651ae DataFilter - Fix sma smooth direction
Reported at the forum, backward and forward are inverted,
lets use existing defines to avoid confusion.
2022-06-22 12:17:39 -03:00
Alejandro Martinez
f8b2a04b30 One time Summary chart was deprecated when upgrading athletes
With the option to cancel to give the user a chance to backup
before upgrading or reinstall v3.5
Fixes #4191
2022-06-17 11:44:52 -03:00
Alejandro Martinez
7fba9b1f5e Upgrade macOS builds on Travis-ci to xcode12.2 osx_image
[skip AppVeyor]
To use macOS 10.15 and newer Qt5 version
2022-06-14 15:37:57 -03:00
Alejandro Martinez
cb7b2a07d8 Upgrade Qt to 5.15.2 for Linux builds on Travis-ci
[skip AppVeyor]
2022-06-14 15:36:17 -03:00
Mark Liversedge
5684b89c69 Fixup previous commit
.. 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.
2022-06-12 19:24:36 +01:00
Mark Liversedge
9d9ad753f3 Metric refresh no longer uses QtConcurrent::map()
.. 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
2022-06-12 17:00:01 +01:00
Paul Johnson
dd5bc51604 User selectable map route line color and switchable route line out & back opacity (#4030) 2022-06-10 16:59:28 -03:00
Alejandro Martinez
c85054ed61 ComparePane - Filter segments matching sport
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.
2022-06-02 20:26:37 -03:00
Alejandro Martinez
fcbe02e83e TrainBottom - Raise autorepeat delay
Current value is to eager for some setups
triggering unexpected jumps in play position.
2022-06-02 19:39:49 -03:00
Alejandro Martinez
a5d64686d9 FIT file Import - Set Weight field from user_profile
Fixes #4224
Also removed compiler warnings
2022-05-20 12:39:45 -03:00
Alejandro Martinez
a63bee518d CP Estimator - start 7 days periods on mondays
For consistency with the rest of GC and to make easier for users to understand how it works.
Fixes #4221
2022-05-19 13:38:49 -03:00
Alejandro Martinez
3e5fefa4ec Upgrade to Qt 5.15.2 for Windows build on Appveyor
Since Qt 5.14.2 was removed from Appveyor images
Also fixed R version to latest 4.1 since there are issues with 4.2
[skip Travis]
2022-05-15 19:25:08 -03:00
Alejandro Martinez
f74b5aed6d Tidy up ci scripts
Deprecated unused scripts and renamed Windows installer nsi file.
2022-05-15 13:33:48 -03:00
jgpallero
aeb6630ede Fix small typos in Spanish translation (#4218) 2022-05-15 09:48:09 -03:00
Alejandro Martinez
e97034fb7d Fix boundary condition in Estimator
Last activity is not considered when it starts a new 7 day period.
Fixes #4220
2022-05-13 20:58:28 -03:00
Poncho
9b29fb2f8d travis/linux: set QTWEBENGINE_DISABLE_SANDBOX=1 (#4216)
There is an issue with qtwebengine (chromium) and glibc 2.34 affecting Arch
and similar rolling release distributions when using Qt<5.15.5
See: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/374204
Fixes: https://github.com/GoldenCheetah/GoldenCheetah/issues/4196
[publish binaries]
2022-05-08 17:41:01 -03:00
Paul Johnson
3a9620a3d9 Pass ride context to Python DPs when available (#4214)
Partial fix for #4095 - Python DPs now work in automatic mode using the run on save option.
2022-04-28 12:55:39 -03:00
Alejandro Martinez
be1af0f6d6 Import Name element from fitlog files
Also fixes a (likely) typo when downloading from sporttracks.mobi
Fixes #4212
2022-04-20 19:33:38 -03:00
Alejandro Martinez
98c22dc185 AppVeyor - change to Previous Visual Studio 2019 image
Since Qt5.14.2 was removed from the current one.
Once this becomes unavailable we would need to go forward to Qt5.15
2022-04-12 20:31:46 -03:00
Alejandro Martinez
4c975c7af2 Filter by sport of selected activity on Activities view
Missing part of #3280
Fixes #4204
2022-04-12 12:52:03 -03:00
Alejandro Martinez
345b70f38f Upgrade python AppImage version for Linux builds
[skip AppVeyor]
Python 3.7.12 AppImage is no longer available,
upgrade to 3.7.13
2022-04-10 10:30:38 -03:00
Alejandro Martinez
12828cdce6 Revert "Upgrade Travis-ci Linux builds to Qt5.15.2"
This reverts commit 5251c5bbcc.
It doesn't fix #4196 according to feedback in the users forum
2022-04-10 10:24:22 -03:00
Alejandro Martinez
5251c5bbcc Upgrade Travis-ci Linux builds to Qt5.15.2
[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]
2022-04-08 22:37:12 -03:00
Stranger
a0c2034fa9 Russian translation update (#4198) 2022-03-20 15:07:08 -03:00
Alejandro Martinez
93d0ac113a Remove autoRepeat from TrainBottom connect buttom
It is likely proking some weird behavior reported at the forum,
and it doesn't seems to make any sense in this case anyway.
2022-03-16 11:41:10 -03:00
Alejandro Martinez
2e33c745c6 Add cadence data to Xert download if present
It seems to be supported according to https://www.xertonline.com/API.html
2022-03-16 11:37:22 -03:00
Alejandro Martinez
6b7121bdcb Add encrypted keys for Nolio sync and generate test build
GC_NOLIO_CLIENT_SECRET shortened to GC_NOLIO_SECRET to avoid travis-ci limit.
[publish binaries]
2022-03-07 12:36:53 -03:00
Sping Zhao
c0894805ac Simplified Chinese updated. (#4188) 2022-03-02 02:04:50 -03:00
Alejandro Martinez
61afa38826 Python Charts - Replace $$ by chartid in scripts
It worked for the console, but it failed for scripts running on a separate thread.
Fixes #4185
2022-03-01 17:00:36 -03:00
Alejandro Martinez
eb66524775 Update default config URL for v3.6 release
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
2022-02-28 14:19:51 -03:00
Alejandro Martinez
c8f9b75624 Fix CP History chart in default Trends layout
To consider the change in models short names
2022-02-28 14:12:32 -03:00
Alejandro Martinez
bf09243cba Add Help Overview png for the wiki
[skip ci]
2022-02-27 17:22:45 -03:00
Alejandro Martinez
54e96060f3 Update German Translation
Contributed by Marcen at users forum
2022-02-26 22:04:22 -03:00
Alejandro Martinez
328cd2a64d Enable translation of Overview Table Legacy models 2022-02-23 20:30:12 -03:00
Alejandro Martinez
820a2f4b23 lupdate translations files to include last added terms
Includes updated spanish translations for these terms.
2022-02-21 18:55:42 -03:00
Alejandro Martinez
c2b82d1be7 Enable traslation of UserChart newer options 2022-02-21 18:55:00 -03:00
Alejandro Martinez
a0dc39822f Enable translation of HelpWhatsThis Table of Contents 2022-02-21 18:54:11 -03:00
Alejandro Martinez
1c157a69a1 Enable translation of Banister helper stats 2022-02-21 18:53:06 -03:00
Alejandro Martinez
a04976fa41 Update German translation
Contributed by Marcen at users forum
2022-02-21 18:41:29 -03:00
Alejandro Martinez
1a285d1050 DataFilter - Add isrun option to estimates function
To allow selection of Bike/Run precomputed models in Trends charts
2022-02-21 11:54:41 -03:00
Poncho
2373fc687a Cloud: include "Secrets.h" in Nolio.cpp
Otherwise, build fails with:
error: ‘GC_NOLIO_CLIENT_ID’ was not declared in this scope
error: ‘GC_NOLIO_CLIENT_SECRET’ was not declared in this scope
2022-02-20 14:17:17 +00:00
Thomas
7a19fe4b95 final changes 2022-02-18 13:20:50 +00:00
Thomas Plazas
f20d9ac85f Delete .idea directory 2022-02-18 13:20:50 +00:00
Thomas
65446397e2 code review 2022-02-18 13:20:50 +00:00
Thomas
041e426671 code review 2022-02-18 13:20:50 +00:00
Thomas
25307467c7 laps 2022-02-18 13:20:50 +00:00
Thomas
67294a61f3 Nolio version 1.1 2022-02-18 13:20:50 +00:00
Thomas
4d7b56a942 save 2022-02-18 13:20:50 +00:00
Thomas
789b1d90aa streams 2022-02-18 13:20:50 +00:00
Thomas
ba39715254 save 2022-02-18 13:20:50 +00:00
Thomas
37cacd51ae workout get from api 2022-02-18 13:20:50 +00:00
Thomas
9e41e22037 can refresh tokens now 2022-02-18 13:20:50 +00:00
Thomas
cd97b5b5f0 OAuth authentification works 2022-02-18 13:20:50 +00:00
Thomas
140621db42 OAuth start 2022-02-18 13:20:50 +00:00
Thomas
e8829c66ec Nolio added to cloud connectors 2022-02-18 13:20:50 +00:00
grauser
22a5930069 Translation : French update 3/3 2022-02-17 08:53:01 +01:00
grauser
6b878c906b Translation : French update 2/3 2022-02-16 21:51:14 +01:00
Stranger
1dbbd26dec Russian translation update (#4174) 2022-02-16 11:39:06 -03:00
Sping Zhao
ec6d7838d1 Improved Chinese translation (#4171) 2022-02-15 14:15:27 -03:00
Alejandro Martinez
f0b0d18e0e Update Spanish translation 2022-02-14 15:39:46 -03:00
Alejandro Martinez
326e5ff46d Enable translation of model fit summary in CP Chart 2022-02-14 15:39:14 -03:00
Alejandro Martinez
edf0cd72ea Update Spanish Translation 2022-02-14 15:11:48 -03:00
Alejandro Martinez
2a1e4e52cc Enable translation for new Metadata fields
Mostly Garmin metrics, Feel and Raw Data tab
2022-02-14 15:11:48 -03:00
grauser
7c80da9832 Translation : French update 1/3 2022-02-14 18:03:32 +01:00
Paul Vandenbosh
d3c7f7abc4 Translation (French) : Improve several translations 2022-02-12 18:54:18 +01:00
Alejandro Martinez
7417e9cf1f Train - Limit ant+/btle thread exclusion to avoid deadlocks
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.
2022-02-12 11:58:02 -03:00
grauser
f09e357993 FIT : Add Polar in Manu/Product list 2022-02-12 10:36:08 +01:00
Mark Liversedge
150155ba84 VERSION 3.6 RELEASE CANDIDATE 1 FEB 2022
.. 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]
2022-02-09 09:15:30 +00:00
Sping Zhao
919a418895 Updated Simplified Chinese translation. (#4155) 2022-02-06 05:34:08 -03:00
Poncho
130abda5fe Python Chart Web: allow LocalContentCanAccessRemoteUrls (#4154)
new versions of qtwebengine block those requests by default

fix "Access to fetch at *** from origin 'file://' has been blocked by CORS policy:
   Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https."

see https://forum.qt.io/topic/132956/qwebengineview-javascript-fetch-cors-error-but-works-on-chrome-desktop
2022-02-05 14:21:40 -03:00
Alejandro Martinez
a13da9e917 Train - Separate rr and vo2 file access coordination
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.
2022-02-05 10:27:32 -03:00
Alejandro Martinez
3db1839471 Train - Sync rr and vo2 files closing to avoid data loss
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.
2022-02-04 12:12:28 -03:00
Alejandro Martinez
5237b460f1 Withings - Use new OAuth2 API to get access and refresh tokens
Fixes #4152
2022-02-02 16:19:22 -03:00
Alejandro Martinez
2f1194b0bd Decode Stress extra field from FIT files
Fixes #4153
2022-02-01 20:35:10 -03:00
Alejandro Martinez
32b1f0f7d1 Enable language independent filter by interval type
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
2022-01-27 11:08:32 -03:00
jgpallero
bef7e51d52 Update Spanish translation (#4150) 2022-01-26 15:32:18 -03:00
Alejandro Martinez
1b0e6059cf Show Train Sidebar after the session stops
It is necessary to select files for the next session.
Complements 309907b
2022-01-25 21:21:14 -03:00
Alejandro Martinez
4812661c9c Move Settings in Athlete menu
It did't look good in the previous position.
2022-01-25 21:17:21 -03:00
Alejandro Martinez
cd75224105 lupdate translation files to include the latest strings 2022-01-25 21:12:17 -03:00
Alejandro Martinez
2b39ad28c8 Add SubSport to SpecialFields to enable translation 2022-01-25 21:10:50 -03:00
Alejandro Martinez
0449988fb1 Update Spanish translation
Continuation of f906e87
Contributed by @jgpallero
2022-01-22 20:50:17 -03:00
Alejandro Martinez
f906e8751c Update Spanish translation
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
2022-01-17 16:53:00 -03:00
Alejandro Martinez
7230e28730 Enable standard key bindings for Pause/Continue and Stop while training
Space for Pause/Continue and Escape for Stop.
This is helpful when the bottom bar is hidden, complements #4135
2022-01-12 20:43:27 -03:00
Alejandro Martinez
25dfe5bf3a Enable Auto-hide bottom bar in Train View option
Fixes #4135
2022-01-12 18:39:12 -03:00
Mark Liversedge
309907b0ad Hide sidebar when train mode starts
.. as a convenience, since it is not very useful during
   a workout session.
2022-01-12 09:13:53 +00:00
UgoBor
f66b7e13a7 Update Italian Translation (#4132) 2022-01-11 15:42:36 -03:00
Alejandro Martinez
09b987e595 Fix ErgFile copy paste bugs
Contributed by Joachim at the users forum
2022-01-09 21:01:40 -03:00
Mark Liversedge
50f5efbfdb Resintate metadata numeric min/max limits
.. a regression introduced in e0ec5ba2d1 removed the limits
   for double and integer metadata fields.

Fixes #4125
2022-01-09 08:28:58 +00:00
Alejandro Martinez
0e8702c3b0 Set RPE and Feel from FIT files from Garmin devices when present
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
2022-01-08 11:49:51 -03:00
Alejandro Martinez
f4630ea078 Revert "Set HTTP User Agent in Web chart and OAuth dialog"
This reverts commit 46be903027.
Fixes #4123
2022-01-05 19:34:29 -03:00
Alejandro Martinez
beed0b2023 Update German Translation
Contributed by Marcen from goldencheetah-users forum.
2022-01-04 18:17:58 -03:00
Alejandro Martinez
214caf3389 Fix floating point regular expresion in DataFilter lexer
Source: https://www.regular-expressions.info/floatingpoint.html
Fixes #4109
2022-01-04 15:02:03 -03:00
Alejandro Martinez
346c84f8b7 Add Garmin Rally 100/200 PowerMeter to FIT file importer 2022-01-04 12:01:03 -03:00
Mark Liversedge
8aa6818f2d Use consistent terminology
.. more renaming of overview charts to tiles, and also renamed
   the AddChartWizard to AddTileWizard.
2021-12-30 09:56:56 +00:00
Mark Liversedge
a41935d8d2 Use consistent terminology
.. overview has tiles not cards (with apologies to translators
   but better to fix now than later).
2021-12-24 11:21:59 +00:00
Mark Liversedge
ecb7910d40 Remove sample{} from template examples
.. 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
2021-12-23 14:44:45 +00:00
Mark Liversedge
066047354b Tweak theme colors
.. overview card alternate and vibrant colors.
2021-12-23 12:34:43 +00:00
Mark Liversedge
db28dd9fdf Overview Tiles and UserChart background setting
.. 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.
2021-12-22 17:35:58 +00:00
Mark Liversedge
13b026eb3a Use consistent terminology
.. overview contains tiles, not charts, except when its a
   user chart.
2021-12-20 18:42:03 +00:00
Mark Liversedge
7e10b0524a Fix annotations with standard colors
.. colors were not translated to standard colors when
   setting the style sheet for a label.

Fixes #4112
2021-12-19 19:47:06 +00:00
Mark Liversedge
b8beaf3946 DataFilter - round(expr) and round(expr, dp)
.. 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.
2021-12-19 16:04:03 +00:00
Mark Liversedge
6441a6faf8 Overview Minimum Columns Settings
.. most users likely won't use this, but the minimum number
   of columns to scale the scene is now configurable in
   the settings dialog for the overview.
2021-12-19 13:52:57 +00:00
Mark Liversedge
35cebf4747 Add Blank Overview
.. 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.
2021-12-19 12:32:45 +00:00
Mark Liversedge
d7e9e305c5 Fixup color initialisation
.. color initialisation was broken by 7b93b2a5
2021-12-15 08:26:05 +00:00
Alejandro Martinez
3976a78977 Update Spanish Translation
Final version except for detected errors.
2021-12-14 20:24:05 -03:00
Alejandro Martinez
806f012dea Update German translation
Finished version, contributed by marcen from the users forum.
2021-12-14 18:50:49 -03:00
Alejandro Martinez
7b93b2a533 Enable translation for Color Selector and Add Tile Wizard
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
2021-12-14 18:43:10 -03:00
Mark Liversedge
2554e033f0 Wiki Python Chart
Image for the wiki

[skip ci]
2021-12-11 09:11:10 +00:00
Alejandro Martinez
ede006341f xdata honors interval boundaries when set
Like samples function, to make it easier to write xdata based custom metrics.
Fixes #4103
2021-12-10 11:37:51 -03:00
Mark Liversedge
d2a1134dbc Ergfile text cues parsing
.. a bit more flexibility in how we parse these elements since
   there is no standard and they're pretty simple anyway.
2021-12-10 12:55:10 +00:00
Mark Liversedge
315d35dab1 Tweak chartbar menu indicator
.. was too subtle, especially with stealth themes and
   placement too far away from text.
2021-12-09 20:37:18 +00:00
Mark Liversedge
f934ae2a5b Perspective tile mode fixup again
.. 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.
2021-12-09 17:18:30 +00:00
Mark Liversedge
a32d0a781b Train View Perspective Switch - 2 of 2
.. 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
2021-12-09 14:51:12 +00:00
Mark Liversedge
522844508e Train View Perspective Switch - 1 of 2
.. 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.
2021-12-09 12:30:28 +00:00
Mark Liversedge
be8ae85dbd Rename Overview
.. clunky, but for such an edge case its not worth the effort
   to make the UX slicker. At least now we can rename.

Fixes #4032
2021-12-09 10:13:19 +00:00
Mark Liversedge
7fd2c98a20 Manage Perspectives Drag/Drop on MacOS
.. drag/drop in the dialog ddn't work.

Fixes #4102
2021-12-08 21:41:09 +00:00
Mark Liversedge
c7d7972213 Stealth themes
.. more monotone and subtler coloring which is also used to
   change the chart bar hover and tab decorations.
2021-12-08 17:12:40 +00:00
Mark Liversedge
5704668007 Fix MacOS sidebar scrollbar styling
.. scrollbars no longer autohide and overlay with Qt on Mac
   running MacOS 12 (Monterey), so we style them in the same
   way as Linux and  Windows.
2021-12-06 16:58:11 +00:00
Mark Liversedge
71d9db909e Fix crash on 2nd athlete import ride
.. Fix crash when you open a 2nd athlete and import or download
   an activity whilst still on the athlete view.

Fixes #4094
2021-12-06 11:49:58 +00:00
Mark Liversedge
4ae6dbea93 Tweak TopN text color
.. to match the same text color used in data table since it
   was a little dull in dark mode and hard to read.
2021-12-01 08:31:40 +00:00
riccioclista
8b0af9abf5 Workout Editor: Only scale on Ctrl+mouse wheel (#3113)
Co-authored-by: Antonius Riha <antoniusriha@gmail.com>
Co-authored-by: Alejandro Martinez <amtriathlon@gmail.com>
2021-11-30 14:09:40 -03:00
Mark Liversedge
48a3afc59e Fixup style sheet QString warning
.. recent update for MacOS generated a warning on Linux/Windows.
2021-11-30 14:40:10 +00:00
Mark Liversedge
257d877d03 Tweak styling for Zones/Measures config on MacOS
.. tab styling is very different there.
2021-11-30 13:23:56 +00:00
Mark Liversedge
e0ec5ba2d1 Tweak Metadata Styling on MacOS
.. removes spin boxes and border around fields
2021-11-30 13:10:19 +00:00
Mark Liversedge
006dbdf102 VERSION 3.6 DEVELOPMENT NOV 2021
.. sneaking out a beta release for last minute feedback and
   testing before finalising the release over December.

[publish binaries]
2021-11-29 18:10:13 +00:00
Mark Liversedge
5c996e2317 MacOS sidebar color name
.. wasn't updated when we separated toolbar and sidebar colors
2021-11-28 19:11:50 +00:00
Mark Liversedge
ec67b66023 Perspective tab/tile fixups (aka train view)
.. 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).
2021-11-28 17:51:09 +00:00
Mark Liversedge
acd510d65f Set view isTiled() when switchin perspective
.. 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.
2021-11-28 17:51:09 +00:00
Mark Liversedge
d6274c0fff Cache pixelsize calculation in pixelSizeForFont
.. 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.
2021-11-28 17:51:09 +00:00
Yukihiro Nagano
d6d969f819 Update Japanese Translation (#4086) 2021-11-28 09:12:08 -03:00
Alejandro Martinez
8dbaad3876 Fix copy paste error in DataFilter intervals
Fixes #4084
2021-11-27 20:35:02 -03:00
Alejandro Martinez
0762f0daaf Critical Power Chart - Fix no use of performance tests in Trends
I introduced this bug in 3a07cc5, sorry.
2021-11-27 20:16:16 -03:00
Mark Liversedge
f9b2b60b37 Standard Colors selection sorted
.. when choosing a standard color the dialog now sorts the
   list of standard colors to make it easier to find.
2021-11-25 11:39:57 +00:00
Mark Liversedge
b27d3d42c8 Color options sort
.. colors are organised by group in preferences and can
   be sorted by the user to help find what they are
   looking for.
2021-11-25 10:47:45 +00:00
Mark Liversedge
c74a1e76a3 Grouping Colors
.. 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.
2021-11-24 13:45:00 +00:00
Mark Liversedge
a8de13b7cf Add chartbar background color config
.. so users can configure the color of the chartbar, but more
   likely to just setup via themes.
2021-11-24 12:34:01 +00:00
Mark Liversedge
680f7b9665 User chart scaling option name change
.. "Scaling" becomes "Font scaling" to make it clearer
   to users what the setting does.
2021-11-24 08:51:15 +00:00
Alejandro Martinez
79fd18ef55 Train - Use Simulated Speed enabled by default for new users
Intended to minimize support questions from new users.
Fixes #4075
2021-11-23 17:17:20 -03:00
Mark Liversedge
77c9b8d645 Datafilter - append() update sum
.. vectors sum is pre-calculated as functions are
   evaluated. but was missing for the append() function.
2021-11-22 22:36:48 +00:00
Alejandro Martinez
8d3f580c0f Aerolab - scale x-axis distance when imperials units are used
Also zoom to interval limits
Fixes #4074
2021-11-21 11:04:49 -03:00
Mark Liversedge
20201c16a8 View sidebar controls
.. 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.
2021-11-18 09:16:34 +00:00
Stefan
b12e1fa9b6 Fix font issue under Windows 10. 2021-11-17 12:54:18 +00:00
Mark Liversedge
2f703594e9 Hovering Color
.. add GColor(CHOVER) and used in sidebar, chartbar and
   toolbar when hovering over a button or tab.
2021-11-15 16:47:33 +00:00
Alejandro Martinez
32bd7955a8 Extend the range of default crank length
To include custom lengths from 130 to 220, default 175.
2021-11-13 20:37:20 -03:00
Alejandro Martinez
6e7931508f DataFilter - Use Duration for fatigue zone percentanges
W'bal series doesn't have gaps, so Time Recording can inflate
percentanges when there are pauses.
2021-11-11 19:21:13 -03:00
Alejandro Martinez
552c44d847 Fixed pre target 2021-11-10 21:31:09 -03:00
Alejandro Martinez
0cfa1e7d49 PythonEmbed - Duplicate timeout waiting for Python version output
Some users have reported intermitent errors, likely depending on machine load.
2021-11-10 09:18:28 -03:00
Alejandro Martinez
7ca84ecd3e Withings Authorization - Use https for callback URL
Fixes #4065
2021-11-09 16:39:38 -03:00
Mark Liversedge
5a2e1cc3a8 Update README.md
Add link to NOTIO forl
2021-11-08 17:05:21 +00:00
Mark Liversedge
595b38360e User Chart Label Font Scaling
.. the label annotations needed the scaled font applied.
2021-11-04 18:03:22 +00:00
Alejandro Martinez
89dc137a52 Rename Withings key defines in gcconfig.pri.in
[skip ci]
To to match those currently used in the code.
Fixes #4060
2021-11-04 10:44:54 -03:00
Mark Liversedge
655fb69b42 Overwiew Layout fixup
.. 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.
2021-11-04 09:21:41 +00:00
Alejandro Martinez
320cddb1e1 SportTracks download - ensure termination while processing samples
Fixes #4044
2021-11-03 10:40:29 -03:00
Yukihiro Nagano
7a08f9e92c Update Japanese translation (#4059) 2021-11-03 09:15:13 -03:00
Alejandro Martinez
f04a20db21 Add metric description as what's this help to MetricSelect
Handy when a user is inspecting a pre-built Overview chart
2021-10-31 19:53:06 -03:00
Alejandro Martinez
0c4e5f3080 CloudService Sync - Honor metric/imperial setting
Fixes #4056
2021-10-31 14:48:55 -03:00
Mark Liversedge
5225ef0f02 Re-apply Another ChartSpace Layout fix (resolved)
.. 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).
2021-10-31 15:26:15 +00:00
Mark Liversedge
180af0ab04 Revert "Another ChartSpace Layout fix"
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
2021-10-31 13:09:44 +00:00
Mark Liversedge
a023e0efc0 Another ChartSpace Layout fix
.. 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.
2021-10-31 10:04:12 +00:00
Mark Liversedge
16cc48f933 Add all the Metrics with W' to the lexer
.. 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
2021-10-31 08:25:37 +00:00
Erik Botö
04b6334f59 Add support for FTMS devices (#4045)
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
2021-10-29 12:49:06 -03:00
Alejandro Martinez
7929944f73 Update German Translation
Contributed by forum user Marcen
2021-10-27 15:41:23 -03:00
Alejandro Martinez
e1ce93728d Add What's this help for tile configuration in Overview charts 2021-10-27 12:21:55 -03:00
Alejandro Martinez
3096fb42a1 Fix expression precedence in Bike and Power estimators
Likely not too relevant, but it was an error.
Fixes #4049
2021-10-26 19:58:01 -03:00
peret2000
1ead8e0922 Estimate Power: corrected adjustment of CdA when not set (#4051)
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>
2021-10-26 14:42:13 -03:00
Mark Liversedge
3f66fec5f7 UserChart refresh for intervals
.. 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.
2021-10-23 19:17:54 +01:00
Mark Liversedge
6473ed76ce Default opacity 100% and width 2.00 on UserChart series
.. 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.
2021-10-20 17:01:37 +01:00
Alejandro Martinez
9c727a8770 Update German Translation
Contributed by marcen at the forum
2021-10-17 14:46:03 -03:00
Mark Liversedge
5b838b4a0f Windows command line --no-angle
.. 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.
2021-10-15 18:09:28 +01:00
Mark Liversedge
ee3c30f527 Tweak Linear Regression annotation
.. size too thick on low-dpi and virtual dpi displays and avoid trying
   to fit when there is no curve data being shown.
2021-10-15 18:09:28 +01:00
Alejandro Martinez
d9b768514a Update translation files 2021-10-14 11:54:12 -03:00
Mark Liversedge
970e44a913 annotate(lr, style, "colorname")
.. 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"
2021-10-13 18:36:29 +01:00
Alejandro Martinez
007dc4b518 Avoid crashes in DataFilter when athlete has no activities
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.
2021-10-13 11:51:02 -03:00
Alejandro Martinez
289962cd11 DataFilter - Avoid crash when evaluate(spec, dr) is called on a malformed expression
Reported at the forum, easily reproducible creating a KPI tile
in Trends Overview Chart.
The added check is already present in remaining evaluate versions.
2021-10-12 20:55:01 -03:00
Mark Liversedge
0e8d452956 Annotations tweak
.. show/hide along with associated curve
   honor scaling, e.g. when on an overview
   use plot marker color for line and text
2021-10-12 23:04:27 +01:00
Mark Liversedge
a3f42c0746 Horizontal and Vertical Line Annotations on UserChart
.. 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).
2021-10-12 22:13:09 +01:00
Mark Liversedge
9976746e49 DataFilter::eval() more const pass by reference
.. for the specification and daterange.
2021-10-12 14:16:56 +01:00
Alejandro Martinez
c8c4666faa Add GoldenCheetah.pdb to Windows installer
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.
2021-10-11 18:51:13 -03:00
Alejandro Martinez
f43e6433e3 Avoid crash in formulas when requested metric is not available
Found while testing Overview Charts contributed by users to CloudDB
using custom metrics without notice.
2021-10-10 18:48:10 -03:00
Alejandro Martinez
d2a7f5797a Add Athlete > Settings to main menu
For completeness and to allow access to Athlete Settings
from other views.
Fixes #3723
2021-10-10 18:45:59 -03:00
Alejandro Martinez
94ccac5e0f Avoid using HomeBrew on macOS ci builds for failing dependencies
[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]
2021-10-09 20:32:02 -03:00
Mark Liversedge
8f6d30d6d1 Trigger build of october development release
[publish binaries]
2021-10-09 11:21:48 +01:00
Mark Liversedge
474edee78f VERSION 3.6 DEVELOPMENT OCTOBER 2021
.. mark up a development release for more testing.
2021-10-09 11:18:46 +01:00
Alejandro Martinez
ae8a8c0b4b Python - add importlib_metadata to requirements
To support libraries using importlib.metadata in Python 3.8
Fixes #4047
2021-10-07 12:02:50 -03:00
Mark Liversedge
6c0c56ab5b Ignore Qt Creator build directories
.. keeps git status clean.

[skip ci]
2021-10-06 11:01:04 +01:00
Mark Liversedge
09e2ac95da Use doxygen to generate code documentation
.. 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]
2021-10-05 09:58:56 +01:00
Alejandro Martinez
fab0c1aae4 Updated Linux build instructions
[skip ci]
2021-10-04 16:04:34 -03:00
Erik Botö
10317e4730 travis/linux: use quiet mode for unzip and pip 2021-10-04 13:02:19 -03:00
Erik Botö
8330664467 travis/linux: use --no-verbose on all wget commands
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.
2021-10-04 13:02:19 -03:00
Erik Botö
4f30e98e50 Fix python-version in travis after_success.sh for linux build
The upstream AppImage for python3.7.x got upgraded from 3.7.11 to
3.7.12, causing the script to fail.
2021-10-04 13:02:19 -03:00
Alejandro Martinez
272963b832 Python embedding - print error messages to stderr
To diagnose system dependent user reported problems
2021-10-02 19:26:21 -03:00
Mark Liversedge
ff3d6b4a63 Generic Annotations
.. 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.
2021-10-02 12:06:38 +01:00
Alejandro Martinez
734d9c2739 Update Travis build status in Readme
[skip ci]
2021-10-01 17:29:54 -03:00
Mark Liversedge
d0bb437fc0 Chartspace more tolerance in hover on tile edges
.. on hidpi displays it took a deft touch to grab the edges of
   a tile, since the tolerances did not take into account the
   hi density of pixels.
2021-10-01 12:49:15 +01:00
Mark Liversedge
d7957363ff Fix Legend Proportions (and spacing bug)
.. 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.
2021-10-01 12:47:53 +01:00
Mark Liversedge
aecc1c970a Datafilter syntax highlighter and "()[]{}"
.. 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.
2021-10-01 08:50:54 +01:00
Mark Liversedge
7be34c1dcd malloc.h, you ok grandad?
.. its stdlib.h now old timer.
2021-09-30 19:56:43 +01:00
Mark Liversedge
70ed4e36e0 Voronoi diagram on chart
.. The diagram now displays on a chart, but there are a few issues.
   Will work through them as more testing done.
2021-09-30 19:00:35 +01:00
Mark Liversedge
4f005d4491 DataFilter - annotate(voronoi, centers)
.. 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.
2021-09-30 12:31:40 +01:00
Mark Liversedge
5502d87af7 Additional Refactor Voronoi
.. 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.
2021-09-30 08:42:38 +01:00
Mark Liversedge
d56d52c01f Refactor Future's algorithm
.. 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.
2021-09-29 10:07:30 +01:00
Mark Liversedge
d568dd0e06 Linux build error (Another Voronoi fixup)
.. apologies, working on multiple platforms at once is a pain.

   will refactor the Steven Future code into its own C++ class
   in the next few days.
2021-09-28 23:02:01 +01:00
Mark Liversedge
dfdf0c5898 Fixup last commit linker error (Future's algorithm)
.. 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.
2021-09-28 20:00:22 +01:00
Mark Liversedge
53ee8f358c Future's Algorithm
.. for calculating Vornoi diagrams.
2021-09-28 19:28:42 +01:00
Mark Liversedge
4c720884b6 DataFilter - kmeans()
.. 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.
2021-09-28 17:31:09 +01:00
Mark Liversedge
4c6c8e6d71 Additional Windows fixups for Fast Kmeans
.. std::max needs <algorithm> and don't need <unistd> at all.
2021-09-28 11:45:34 +01:00
Mark Liversedge
5fb2dfb73e Fast Kmeans on Windows
.. remove unused general functions that work with memory and time
   in a non-portable way.
2021-09-28 11:35:32 +01:00
Mark Liversedge
1dc1cd678f Fast Kmeans Algorithm
.. 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.
2021-09-28 10:25:17 +01:00
Alejandro Martinez
a3c1f6d2fc Check for inconsistencies between Speed and Distance/Time in Editor
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.
2021-09-21 18:45:42 -03:00
Mark Liversedge
fb76ecc33c pdf and cdf for Gamma distribution
.. its quite handy.
2021-09-20 21:27:44 +01:00
Mark Liversedge
8580a45c38 Datafilter pdf/cdf for normal and beta distributions
.. 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.
2021-09-20 19:16:52 +01:00
Mark Liversedge
ca3a48c0bc Fixup cdf
.. should be monotonically increasing not decreasing.
2021-09-19 12:11:43 +01:00
Mark Liversedge
e26ab4f957 Datafilter - Gaussian Probability functions
.. pdf(x) and cdf(x) return the probability density function
   and cumulative density function for x.
2021-09-19 09:00:47 +01:00
Mark Liversedge
d97adfe987 Overview User Chart Export
.. 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.
2021-09-18 19:11:57 +01:00
Mark Liversedge
65853b095d Overview Import Chart
.. 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).
2021-09-18 17:53:42 +01:00
Mark Liversedge
c592de6af9 Export Overview Data Table to CSV
.. via an "Export Data" button in the config dialog.
2021-09-17 14:01:08 +01:00
Mark Liversedge
e0892371b7 Overview respond to interval hovering
.. 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.
2021-09-14 17:55:59 +01:00
Mark Liversedge
6236611aee Interval time tweak
.. 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.
2021-09-14 09:17:07 +01:00
Alejandro Martinez
ea26efc44a Add intervals(time) to formula language
Fixes #4040
2021-09-13 18:48:42 -03:00
Mark Liversedge
60430fa97b Datafilter - match() should only return first match
.. 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
2021-09-13 22:03:39 +01:00
Mark Liversedge
437c38f959 Limit palette for a Heatmap color
.. 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.
2021-09-13 17:05:11 +01:00
Mark Liversedge
08876a9065 Datafilter - metrics(time)
.. to get time of day for ride.
2021-09-13 15:57:12 +01:00
Alejandro Martinez
4d9367ed20 Add Time for the current activity to formulas
Part 1 of #4040
2021-09-12 20:06:26 -03:00
Mark Liversedge
dab1520e39 Overview Data Table scroll wheel
.. 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!).
2021-09-12 14:48:56 +01:00
Mark Liversedge
be5f0b3d22 Datafilter - "vector1[indexes] <- vector2" fixup
.. 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;
   }
2021-09-11 17:00:38 +01:00
Mark Liversedge
bd64625c05 Heat and Normalize
.. 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.
2021-09-11 08:58:38 +01:00
Mark Liversedge
cb874b6793 Heat color on trends overview
.. 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)
2021-09-10 21:05:55 +01:00
Mark Liversedge
2477096345 Overview Data table heat coloring
.. 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
2021-09-10 14:45:49 +01:00
Mark Liversedge
f6375f18f9 Overview Table Header Line too thin
.. not sure when this changed, but makes the line disappear
   when so thin.
2021-09-09 10:38:49 +01:00
Alejandro Martinez
a6628eb447 Reposition Interval and Banister helpers when off window
This is already fixed when it is out to the right,
but still can happen to the left, continuation of b36bbdc
2021-09-08 12:43:59 -03:00
Mark Liversedge
e3e826a017 Blocks can be used as datafilter function parameters
.. 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.
2021-09-04 17:31:31 +01:00
Alejandro Martinez
578a7fb263 Spanish Translation - Last update
Until errors are reported or new terms added.
2021-09-03 12:25:22 -03:00
Alejandro Martinez
41fbd9563a Spanish Translation - Partial Update 2021-09-02 23:20:00 -03:00
Mark Liversedge
d953b44c00 OverviewItemConfig Legacy Selector
..is only needed for configuring data tables.

Fixes #4031
2021-08-31 21:08:56 +01:00
grauser
32c7b68f43 Translation : lupdate translations/gc_fr 2021-08-31 18:01:01 +02:00
Mark Liversedge
4ddaa041a9 Don't process events when recreating user charts
.. 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
2021-08-31 10:48:16 +01:00
Mark Liversedge
b5046f4be1 Fix Dark Theme Stress Balance
.. it was black, which wasn't the best choice against a
   dark background (!)
2021-08-30 10:11:11 +01:00
MaksVasilev
01beed8f46 Untraslated string
Fixed version of #4027
2021-08-28 13:04:42 -03:00
Mark Liversedge
d7c1b66b27 Overview Data table remember sort
.. so it gets reinstated after restart
2021-08-28 09:49:18 +01:00
Mark Liversedge
9b679a7d79 Clip data overview table painting
.. it looked nasty going all the way to the tile boundary.
2021-08-27 15:31:29 +01:00
Mark Liversedge
78850dabc3 ChartBar buttons match main toolbar
.. aesthetics adapted to have same feel.

.. the actual + icon had embossing in it (!)
2021-08-27 14:56:30 +01:00
Mark Liversedge
494e01ba7a DataOverviewItem legacy program on trends
.. added the legacy selector to trends view.
2021-08-27 12:08:08 +01:00
Mark Liversedge
5e516aefca DataFilter Aggregate helpers for metrics
.. 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.
2021-08-27 12:07:37 +01:00
Mark Liversedge
e31f05236c Fix Overview Data table date sorting in German
.. and possibly other locales/language combinations
2021-08-27 09:45:20 +01:00
Mark Liversedge
13dc1059bc Python console perspective setting
.. use perspective property from the chart.
2021-08-26 13:54:50 +01:00
Mark Liversedge
ec46e545f5 User Chart and property "perspective" SEGV
.. 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
2021-08-26 13:46:44 +01:00
Mark Liversedge
1e480b6965 Less debug
.. last commit had some erroneous debug
2021-08-25 15:54:53 +01:00
Mark Liversedge
5e8e490e51 Datafilter powerindex(power,duration)
.. returns the powerindex for the given power and duration
   which can be vectors.

.. useful to transform meanmax power to strengths and
   weakness rating.
2021-08-25 15:52:55 +01:00
Mark Liversedge
fa296f7c13 Further update for UserChart scale crash
.. need to also add blocking around generic chart which
   can be called in different threads.

.. see previous commit for details.
2021-08-25 11:15:15 +01:00
Mark Liversedge
cc8b6b114d UserChart Scaling causes crash
.. 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
2021-08-25 09:48:44 +01:00
Mark Liversedge
73d28661fa User Chart support Stacked Percent Style
.. we now support percent stack bar charts, which are useful (and
   popular) for time spent in zone style charts.
2021-08-25 08:38:25 +01:00
Mark Liversedge
a4d928e4a0 More muted and modern Toolbar buttons
.. 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.
2021-08-24 20:56:31 +01:00
Stranger
7c944d6100 Russian traslation update (1 of 2)
Part 2 in a week
2021-08-24 09:39:36 -07:00
Stranger
c973bd7d85 Untraslated strings 2021-08-24 09:39:36 -07:00
Mark Liversedge
e02e19a979 Mac Toolbar UI Tweaks
.. bit more breathing space required, as overly compressed.
   Especially since there is no application menu bar on Mac.
2021-08-24 15:35:38 +01:00
Mark Liversedge
fecaad5cbf Titlebar/Toolbar icons
.. to replace current toolbar icons
2021-08-24 13:43:08 +01:00
Mark Liversedge
1e18321da7 User Chart UI tweaks
.. 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.
2021-08-24 09:58:18 +01:00
Alejandro Martinez
524dad3f4d TcxParser - Handle files with missing Lap StartTime
Using the first Trackpoint Time as start_time.
Fixes #4015
2021-08-23 22:47:57 -03:00
Jérôme Launay
2096342fe4 Translation : Update French translation 2021-08-23 23:56:18 +02:00
Alejandro Martinez
15595090e7 Add Qt5OpenGL.dll to Windows installer
Required by f8cdbf3, both should be reverted together, if necessary.
2021-08-23 00:07:58 -03:00
grauser
bf2a1735ed FitRideFile : Add Giant and Scosche in manufacturers 2021-08-22 17:45:15 +02:00
grauser
78a4532793 FITRideFile : Add Device types
fix #4020
2021-08-22 17:30:30 +02:00
Mark Liversedge
31f51dbdd5 Toolbar Styling on MacOS
.. remove conditional for styling the toolbar on Mac. This is
   an artefact from the old "UnifiedTitleAndToolBar" which we
   no longer use.
2021-08-22 11:02:49 +01:00
Mark Liversedge
f4a14b6ac9 Athlete View Open Button rendering
.. not sure why, but the border was fugly. Tidied it up.
2021-08-22 10:26:02 +01:00
Mark Liversedge
33018aab77 Time Series User Chart plotting "Optimisation"
.. 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.
2021-08-22 08:41:14 +01:00
Mark Liversedge
81d59d4637 Fix overview data table paint on scroll
.. 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.
2021-08-21 18:04:08 +01:00
Mark Liversedge
6d3ae32e61 MacOS snafu for AthleteTab styling
.. no need to do any conditionals in stylesheet, and worse
   they break the styling anyway.
2021-08-21 17:08:42 +01:00
Mark Liversedge
5f548785ad ChartSpace wheel events more responsive
.. scroll by a larger factor, makes the scrolling feel
   far more responsive.
2021-08-21 16:47:24 +01:00
Mark Liversedge
1297d76ee4 UserChartOverviewItem paint events
.. 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.
2021-08-21 16:42:29 +01:00
Michal Powalko
f86bc6752e Add support for Garmin Forerunner 745 2021-08-21 13:01:58 +01:00
Mark Liversedge
f8cdbf3e39 Force ANGLE GPU acceleration on Windows
.. 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.
2021-08-20 13:32:03 +01:00
Mark Liversedge
e1ed960714 Another ChartSpace spanned tile layout tweak
.. to stop tiles that overlap by 1 pixel when including the spacing
   from being moved.
2021-08-20 11:30:33 +01:00
Mark Liversedge
39c135a29b Avoid translations in DataFilter expressions
.. as reported on the forums, translations can rename metric
   names inadvertently. We avoid this by using the untranslated
   names in datafilter expressions.
2021-08-19 18:49:14 +01:00
Mark Liversedge
efba58b509 Another ChartSpace spanning tile fixup
.. 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.
2021-08-19 12:54:10 +01:00
Mark Liversedge
ba3c0bf34e UserChart Bar/Stacked show Category on legend
.. when hovering over a bar chart its sometimes useful to see the
   category name (x-axis) on the legend.
2021-08-18 20:05:05 +01:00
Mark Liversedge
e10aac4de4 UserChart support stacked bar chart
.. initial support, relatively basic but seems to work ok.

Fixes #4012
2021-08-18 16:15:26 +01:00
Mark Liversedge
7cc2219293 Axis group by fill zero for bar charts
.. when aggregating on a date axis we do not fill gaps
   e.g. when no rides for a period. This causes the bar
   chart to be somewhat misleading.
2021-08-18 08:40:10 +01:00
Mark Liversedge
29485aa327 Fix DIV0 crash in Overview
.. possible cause of crash reported on the forums.
2021-08-18 08:38:37 +01:00
Mark Liversedge
f9fa6ca401 Overview Data Table Sort incl. Files
.. 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.
2021-08-17 19:36:23 +01:00
Mark Liversedge
d57c3c9ce5 Fix TopNOverviewItem refresh when config changes
.. lookup metric when the configuration changes.
2021-08-17 18:44:42 +01:00
Mark Liversedge
0d2310e76a Overview Zone tile refresh
.. updates when config changes, not just at restart.
2021-08-17 18:24:00 +01:00
Mark Liversedge
d7ae5610cf Overview items respond to config changes
.. 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.
2021-08-17 17:45:21 +01:00
Mark Liversedge
eaa6120467 Overview Vertical Scrollbar
.. rounded and color changes when dragging, to align with the
   tile scrollbars and basically a bit more modern.
2021-08-17 12:17:26 +01:00
Mark Liversedge
e464762f7f Imperial/metric conversion error
.. in metricstrings(), asstring() and intervalstrings()
2021-08-16 22:53:03 +01:00
Mark Liversedge
195514c30e Fix Invalid JSON for .gchart
.. 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).
2021-08-15 09:42:15 +01:00
Mark Liversedge
5fd1a08419 Save/Restore Overview column widths
Fixes #4007.
2021-08-15 09:36:24 +01:00
Mark Liversedge
2ea3080d24 VERSION 3.6 DEVELOPMENT BUILD AUGUST 2021
.. marking up for release of a new development build.

[publish binaries]
2021-08-14 11:17:36 +01:00
Mark Liversedge
fd546b4da1 Overview default config
.. 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.
2021-08-14 10:13:51 +01:00
Mark Liversedge
2b30f9aa50 DataOverviewItem Vertical Scrollbar
.. 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.
2021-08-13 12:35:43 +01:00
Alejandro Martinez
09de27b0d2 Estimate Power - Add warning about accuracy
The sooner new users realize (or accept) they need a power meter
for power analysis of general outdoor rides, the better.
2021-08-12 16:50:15 -03:00
Alejandro Martinez
cc3f291113 Add encrypted API Key for RideWithGPS to Travis-ci builds
[skip AppVeyor]
To enable #3371 for Linux and macOS builds
2021-08-12 13:36:04 -03:00
Alejandro Martinez
dcd2a69951 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2021-08-12 13:01:16 -03:00
Magnus Gille
c3bbd3a9ee Add support for Garmin HRM-Pro
Fixes: #3984
2021-08-12 16:51:56 +01:00
Mark Liversedge
d449933ab1 Refresh Perspective Selector on Add/Delete
.. 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.
2021-08-12 16:50:06 +01:00
Alejandro Martinez
7b2bd79448 Add encrypted API Key for RideWithGPS to AppVeyor builds
To enable #3371 for Windows builds
2021-08-12 12:23:57 -03:00
Mark Liversedge
6e88ee4ca6 Date consistency
.. 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).
2021-08-12 16:11:18 +01:00
Mark Liversedge
b893e702b3 Iverview Data Table Negative Numbers
.. negative numbers were treated as strings because the
   matching pattern did not contain a '-'.
2021-08-12 13:35:55 +01:00
Mark Liversedge
18dbedc586 Fix Overview tile config
.. because the config widget is created before the tile
   configuration is loaded it needs to be updated before
   being shown to the user.

Fixes #4001.
2021-08-12 10:01:00 +01:00
grauser
fcad1ed196 RideWithGPS : Correct/implement API v2
Fix #3371
2021-08-11 22:20:23 +02:00
Mark Liversedge
8375f539db Bar Chart and Group By Category Labels
.. 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.
2021-08-10 21:02:59 +01:00
Mark Liversedge
cc0bb2e6d6 UserChart Smoothing and GroupBy
.. 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.
2021-08-10 18:47:39 +01:00
Alejandro Martinez
95cd28a279 Python embedded - Include Pandas 1.2.3
Pandas 1.3.x provokes problems on some charts, like HRV Trends
and otheres reported at the forum. Let's wait until it stabilizes
2021-08-09 20:27:46 -03:00
Alejandro Martinez
39fc9e4537 Enable View - Reset Layout considering perspectives
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.
2021-08-09 17:30:10 -03:00
Alejandro Martinez
1f77f08ae0 V3.6 Upgrade processing - put the current chart config into a general perspective
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.
2021-08-08 14:24:29 -03:00
Mark Liversedge
91f2c46c3e Athlete/View switch update perspective selector
.. 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.
2021-08-08 15:19:36 +01:00
Mark Liversedge
01e0d14757 Renaming classes
.. 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.
2021-08-08 13:05:06 +01:00
Mark Liversedge
29a76773a6 Overview Data Table tweaks
.. 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.
2021-08-07 20:44:13 +01:00
Mark Liversedge
abdce42223 User Sort DataTable on Overview
.. 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.
2021-08-07 14:39:10 +01:00
Mark Liversedge
98466cc9cf Overview Data Table and Intervals
.. 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.
2021-08-07 09:23:12 +01:00
Alejandro Martinez
924da10958 DataFilter intervals() and intervalstrings() for Activity and Trends views
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
2021-08-06 16:54:23 -03:00
Alejandro Martinez
0f9b92f8cf Datafilter - remove tabs introduced accidentally in previous commit 2021-08-06 14:44:07 -03:00
Mark Liversedge
171760097d GenericPlot scale labels
.. the scale factor was not being applied to data labels on
   a user chart.
2021-08-06 11:46:26 +01:00
Mark Liversedge
db9623a201 Alternate Json string protection
.. 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
2021-08-06 07:28:21 +01:00
Mark Liversedge
62012f1990 Fix Overview BubbleViz refresh bug
.. 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.
2021-08-05 18:06:22 +01:00
Alejandro Martinez
b36bbdc3c0 CP Chart - Reposition model helper when off window
This is already fixed when it is out to the right,
but still can happen to the left.

Fixes #3995
2021-08-05 13:09:17 -03:00
Mark Liversedge
00b50b47c3 activities() datafilter function
.. 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".
2021-08-05 13:48:18 +01:00
Mark Liversedge
1986df1c95 DataFilter string escaping
.. 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.
2021-08-05 10:56:23 +01:00
Alejandro Martinez
15bbe288a0 Enable DataFilter zones to be used in Trends View
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.
2021-08-04 16:06:28 -03:00
Mark Liversedge
534a6a4ef1 Overview table clickthru fix for single row
.. need to highlight first row of table when only a
   single row for click thru. Since values are shown in
   rows not columns.
2021-08-04 15:15:52 +01:00
Mark Liversedge
d41e7dd1f6 Logical and is '&&' not 'and'
.. annoyingly gcc allows this which is why I keep making
   this silly mistake.
2021-08-04 13:36:28 +01:00
Mark Liversedge
a98ac12d0e Fix clickthru SEGV for Bubble and TopN overview items
.. they raised signals in paint events which was highly
   problematic (!)

Fixes #3993
2021-08-04 13:21:09 +01:00
Mark Liversedge
49989f95b6 Overview Data Table - Part 3 of 4
.. 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.
2021-08-04 13:05:46 +01:00
Mark Liversedge
98e49c3228 Fixup UserChart mouse interaction on a Chartspace
.. when a user chart is placed on an overview we filter mouse
   events from the chartspace and not the widget due to
   events being discarded.

   See this issue for more details:
   https://github.com/GoldenCheetah/GoldenCheetah/issues/3992
2021-08-03 22:38:15 +01:00
Alejandro Martinez
171882dc9f DataFilter zones - use translated strings from WPrime and RideFile
Also use joules for fatigue zone limits like the old summary.
2021-08-03 17:14:44 -03:00
Mark Liversedge
bd864344bb Fixup for legend mouse events in chartspace
.. 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.
2021-08-03 19:39:31 +01:00
Mark Liversedge
72f91c31a8 Fix user chart axis color
.. when using named colors the axis was always black because
   the color was not being translated via the RGBColor macro.
2021-08-03 15:51:36 +01:00
Mark Liversedge
155273232f User Chart on Overview - Part 2 of 3
.. 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.
2021-08-03 14:36:35 +01:00
Alejandro Martinez
a0f77fbf70 Remove sport parameter from zones DataFilter function
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.
2021-08-02 20:32:47 -03:00
Alejandro Martinez
fd384d69ba Fix zero div crash in Overview Data Table when names() returns an error
Found while removing sport parameter from zones.
2021-08-02 20:21:13 -03:00
Alejandro Martinez
7e998d965a Report full OS version string for all supported platforms
Fixes #3991
2021-08-02 18:00:13 -03:00
Alejandro Martinez
f1045d1aed DataFilter zones - use pace units instead of %CV
Like old Summary and most APPs, easier for athletes and coaches.
2021-08-01 16:55:58 -03:00
Mark Liversedge
557a0a27ec Fix User Chart Legend CPU hog
.. was caused by an eventfilter that caused a redraw on every single
   event (which included the repaint it caused, hence an infinite loop).

Fixes #3989
2021-08-01 18:40:33 +01:00
Mark Liversedge
e772e068d5 Add User Chart to Overview - Part 1 of 3
.. 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.
2021-08-01 10:20:24 +01:00
Mark Liversedge
c91f6d89ac Quieten gcc warnings a little
.. for R and Python embedding code, where casting and pointers
   are complex and not an issue, but gcc likes to warn us.
2021-07-31 11:54:41 +01:00
Mark Liversedge
031b268270 Sustain metrics needed isTime()
.. to ensure they are formatted as time metrics.
2021-07-30 22:02:03 +01:00
Mark Liversedge
b086b779cf Overview Data Table - Part 2 of 4
.. config dialog offers options to recreate the old summary
   window sections;
   * totals, averages, maximums, metrics
   * zone summary
2021-07-30 18:40:02 +01:00
Mark Liversedge
c60f6f4bb6 Zones DataFilter Function
.. 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));
   }
2021-07-30 13:57:04 +01:00
Mark Liversedge
173b1a754e Stop Filter box expanding in config dialogs
.. 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.
2021-07-28 21:46:49 +01:00
Mark Liversedge
0f432a7824 ChartSpace fixups for spanned tiles
.. 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)
2021-07-28 20:36:04 +01:00
Mark Liversedge
0ffca019ea Chartspace scene resize when spanning into empty column
.. when you extend a tile across an empty column to the right
   the scene was not being resized to take this into account.
2021-07-28 10:25:22 +01:00
Mark Liversedge
360bc29d52 DataFilter unit() and name() functions support 'date'
.. so we can get a translation of the word "Date".

.. also fixed up the default trends view data table tile to
   use it, instead of hardcoded "Date".
2021-07-28 08:20:29 +01:00
Mark Liversedge
7f005935e5 Overview Data Table - Part 1 of 4
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).
2021-07-27 21:34:46 +01:00
Alejandro Martinez
b9fbcce56e Fix copy paste error in FixElevation
Introduced by 061cb93.
Fixes #3973
2021-07-26 11:29:57 -03:00
Alejandro Martinez
a918a5c28e Histogram Chart - Disable Show Zone Limits option for Trends
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
2021-07-24 20:52:48 -03:00
Alejandro Martinez
c89d15e067 Histogram Chart - Add Show Zone Limits option for Polarized zones
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.
2021-07-23 17:21:46 -03:00
Alejandro Martinez
86e6b4781c Allow Running Model estimates in DataFilter formulas
This should have been part of ff0b329
Fixes #3958
2021-07-23 15:26:25 -03:00
Alejandro Martinez
92e3438ef3 Histogram Chart - Add Show Zone Limits option for WBal zones
This is part 2 of #3911, part 3 Polarized Zones.
The sport used to select zones in rangemode needs an update,
this will be part 4.
2021-07-23 12:22:55 -03:00
Alejandro Martinez
59a2f3841f Histogram Chart - Add Show Zone Limits option for Power/HR/Pace
This is part 1 of #3911, part 2 will be WBal zones and part 3 Polarized Zones.
2021-07-22 21:14:45 -03:00
Mark Liversedge
a52a07de7a DataFilter functions for Overview Data Table
.. 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
2021-07-20 22:25:29 +01:00
Mark Liversedge
806e907584 Fix Overview resize spanned column fencepost bug
.. when calculating the spanned item's width there was a
   fencepost error in the logic causing the spanned item
   to be resized incorrectly.
2021-07-20 18:27:35 +01:00
Mark Liversedge
0cc4a338d2 Overview Items Span Columns
.. 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).
2021-07-20 17:37:16 +01:00
grauser
b6f1151990 FitRideFile : correction for byte ff is not NA 2021-07-19 22:22:49 +02:00
Mark Liversedge
85e5353990 Train view honor colors better
.. 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).
2021-07-19 15:37:56 +01:00
grauser
456b06348f FitRideFile : Change hex convertion 2021-07-19 12:38:10 +02:00
grauser
c502c9bbc0 FitRideFile : Add decodeDeveloperID
Just read values (without storing)
2021-07-18 10:08:33 +02:00
Mark Liversedge
e34a36f98a V3.6 upgrade processing - reset theme
.. 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.
2021-07-18 07:55:33 +01:00
Mark Liversedge
663b6af8fb Fix toolbar vs sidebar color configuration
.. they got conflated, now are separate colors but when we
   apply a theme they are set to the same color, of course
   the user can override this.
2021-07-17 11:41:49 +01:00
Mark Liversedge
1b38e556c3 Tab Bar menu image for WIKI 2021-07-15 13:46:59 +01:00
grauser
3e21d6bd39 FitRideFile : Use qbswap 2021-07-14 10:49:50 +02:00
Alejandro Martinez
8e3863218d Avoid crashes when Python APIs are called from User Metrics
There is no perspective involved in this case.
2021-07-12 20:41:28 -03:00
grauser
c29a776c21 FitFile : Some devices (eg Coros Pace 2) declare uint32 with size 1
Fix #3645
2021-07-11 16:42:53 +02:00
grauser
566d562982 FitFile : Add IpBike and correct float32 for endian
Fix #3682
2021-07-11 16:11:17 +02:00
grauser
c78fcda1e3 Translation : lupdate + french update/progression (1/3) 2021-07-11 15:03:42 +02:00
Alejandro Martinez
61d00c161f Fix crash on PythonChart - set perspective on RunScript 2021-07-10 11:15:15 -03:00
Alejandro Martinez
bd49279553 Upgrade Python to 3.7.11 for Travis-ci Linux builds
[skip appveyor]
Python 3.7.10 AppImage is not available anymore.
[publish binaries]
2021-07-09 18:14:28 -03:00
Mark Liversedge
73a354156d VERSION 3.6 DEVELOPMENT BUILD JULY 2021
.. marking up for release of a new development build.

[publish binaries]
2021-07-09 14:37:30 +01:00
Mark Liversedge
cb092b9d73 Interval Metric config becomes Favourite Metrics
.. Unifying the metric config to "Favourite" metrics that are
   used on the interval sidebar, compare pane and trends popup.
2021-07-09 12:56:14 +01:00
Mark Liversedge
722588f1db Remove RideSummaryWindow configuration pages
.. now the RideSummaryWindow is deprecated we no longer need
   to configure the metrics / bests being displayed on it.
2021-07-09 11:20:29 +01:00
Mark Liversedge
9d6e08547f Deprecate RideSummaryWindow
.. 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.
2021-07-09 09:02:50 +01:00
Alejandro Martinez
39a7e67085 Add parent widget to AddPerspective dialog to stop it being hidden
raise doesn't fix the issue on Windows
2021-07-08 18:24:47 -03:00
Mark Liversedge
c4d6ee065e Raise the AddPerspective Edit dialog to stop it being hidden 2021-07-08 19:49:26 +01:00
Mark Liversedge
b738038907 Trends view perspective filter
.. 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.
2021-07-08 15:17:14 +01:00
Mark Liversedge
3bc1391cb1 Fix display artefacts from last commit
.. although its sub-optimal, this fix resolves rendering issues
   on startup in analysis view (blank chart bar and related).
2021-07-06 18:16:36 +01:00
Mark Liversedge
73e174a982 Startup Analysis view select perspective
.. at startup the perspective selection logic for analysis
   view was not called and just defaulting to the first
   available perspective in the analysis view.
2021-07-06 17:23:17 +01:00
Mark Liversedge
20d34664e3 Analysis View Switch Perspective automatically
.. 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).
2021-07-06 15:39:47 +01:00
Mark Liversedge
8c5144657c Export perspective filename
.. add the view type it is for to the default name, so at least
   the user will have some clue when sharing etc.
2021-07-05 12:00:52 +01:00
Mark Liversedge
eadc3a78bf Honor type of Perspective when import/exporting
.. 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.
2021-07-05 11:42:39 +01:00
Mark Liversedge
68e7fcacb4 Perspectives - Part 4a of 4
.. Import and Export perspectives to an '.gchartset' file
   as XML data.

.. Added to MainWindow's View menu and the Manage Perspectives
   dialog.
2021-07-05 11:06:02 +01:00
Mark Liversedge
4e570230a7 Standard Colors Tweaking
.. 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.
2021-07-04 22:04:26 +01:00
Mark Liversedge
830317ef03 Search Standard Colors in Appearances options
.. so its easier to find the one you want to set.
2021-07-04 21:30:44 +01:00
Mark Liversedge
1335786957 Remove debug
.. erroneous updates left in last commit. Apologies.
2021-07-04 21:13:44 +01:00
Mark Liversedge
271c0a979a Add search when choosing standard colors
.. 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
2021-07-04 21:10:08 +01:00
Mark Liversedge
1026145f9b Perspectives - Part 3 of 4
.. 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.
2021-07-04 15:34:40 +01:00
Alejandro Martinez
fe2643eb65 Workout Editor - Change the representation of 1 point workout
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.
2021-07-03 18:47:35 -03:00
Alejandro Martinez
6ecff9e2d1 Travis-ci - build only to generate binaries
[skip appveyor]
To spare scarce Travis-ci credits.
2021-07-02 11:54:56 -03:00
Alejandro Martinez
9023014833 Change build status from travis-ci.org to travis-ci.com
[skip ci]
2021-06-29 17:24:41 -03:00
Alejandro Martinez
c7599be666 Disable RideWithGPS upload
It doesn't work since v1 API was deprecated and v2 support is not complete,
so let's disable it for now.
Related to #3371
2021-06-29 09:47:07 -03:00
Alejandro Martinez
0dd9d045cd Disable dynamic reapply of DataFilter
When activities list is filtered, RideNavigator lose the focus on selected
activity if the filter is reapplied on rideSelected.
Fixes #3341
2021-06-27 19:41:27 -03:00
Alejandro Martinez
7540b69eea Fix error in German translation causing non-refreshing R Chart in Trends
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
2021-06-26 10:38:33 -03:00
Alejandro Martinez
de3fadf8e7 Disable extended selection mode in Train workout list
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
2021-06-25 19:43:36 -03:00
Alejandro Martinez
a70231c4bb Update Workout_Control.png for v3.6
[skip ci]
2021-06-25 17:26:39 -03:00
Alejandro Martinez
0262d5f968 Disable VideoSync when using Qt5 video
It is not ready to use.
2021-06-25 14:00:40 -03:00
Alejandro Martinez
6919ade54e Fix build error on VideoWindow when building with Qt5 video
This bug was introduced by #3764
Fixes #3907
2021-06-25 12:04:57 -03:00
Alejandro Martinez
0243aedded Athlete Library setting - Avoid warning when there is no change
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
2021-06-24 19:32:52 -03:00
Mark Liversedge
32a6089f50 Fix SEGV in validation of xdata function
.. xdata() caused a crash in the validator since it tried
   to dereference parameters and caused an index assert.
2021-06-23 12:35:10 +01:00
Mark Liversedge
58c5cc20d2 Trends Chart support named colors
.. better support for themes, trends chart colors update
   based upon the theme if we use named colors.
2021-06-23 10:55:24 +01:00
Mark Liversedge
8753032170 Tidy up perspective selection
.. and setting current ride / date ranges. fixing a regression
   introduced with the recent perspective changes.
2021-06-22 18:40:59 +01:00
Mark Liversedge
e448aa1a8d Fixup date range selection on trend view
.. broken in part 2 of the perspectives updates.
2021-06-22 17:46:29 +01:00
Mark Liversedge
58c8b98f47 Fix UserChartData SEGV when no ride selected
.. edge case but common for new users with no data.
2021-06-22 17:24:24 +01:00
Mark Liversedge
586033c6a5 Fix Chart tab color when dragging
.. it always had a black background instead of the color
   of the tab being dragged, which was jarring with a
   light color scheme.
2021-06-22 17:01:04 +01:00
Mark Liversedge
154077793e Move source for Perspective
.. originally Charts/HomeWindow.{cpp,h} now moved to
   Gui/Perspective.{cpp,h} since its a core Gui element.
2021-06-22 15:53:17 +01:00
Mark Liversedge
07d835e076 Perspectives - Part 2 of 4
.. 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).
2021-06-22 14:51:13 +01:00
Mark Liversedge
3888246b42 Perspectives - Part 1 of 4
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.
2021-06-18 16:15:56 +01:00
Alejandro Martinez
061cb9328c Fix Elevation - Add MapQuest API Key as DP parameter
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
2021-06-14 19:04:34 -03:00
Alejandro Martinez
c3a1afa0a0 Reduce stack use of DataFilter evaluator
Making Result parameter of Leaf::eval a const reference.
Fixes stack exhaustion on Windows while evaluation nested formulas.
2021-06-13 09:47:26 -03:00
Alejandro Martinez
968bdc1d17 Train WorkoutWidget and WorkoutWizard - Avoid crashes when no zones
Even when zones are created for new athletes, better be safe.
2021-06-11 14:19:11 -03:00
Mark Liversedge
d17d3c59a3 VERSION 3.6 DEVELOPMENT BUILD JUNE 2021
.. marking up for release of a new development build.

[publish binaries]
2021-06-08 08:23:18 +01:00
Alejandro Martinez
99f73bdba5 Use translated version of Bike in sports list for zones
[publish binaries]
2021-06-06 15:03:19 -03:00
Alejandro Martinez
df08c607d1 Update translations files and fix minor translations related issues
There is a pending issue: Class 'GColorDialog' lacks Q_OBJECT macro
[publish binaries]
2021-06-06 11:48:47 -03:00
Alejandro Martinez
2b063c91c2 Ensure default sport for zones 2021-06-06 05:28:40 -03:00
Alejandro Martinez
6e4dba86f0 Fix crash at startup when there is no power.zones 2021-06-05 19:56:15 -03:00
mp
316e62d27c Added missing include <limits> header for std::numeric_limits (#3894) 2021-06-04 11:04:18 +01:00
Alejandro Martinez
a5043d1b59 Identify common endurance sports names for endurance athletes
including translations
To ensure consistency in zones assigment and sync.
Other sports can be added as usual.
[publish binaries]
2021-06-02 11:11:50 -03:00
Alejandro Martinez
0ba409a192 CPPlot - Display model parameters in Pace units for Row
Missing from previous commits
2021-05-29 19:03:23 -03:00
Alejandro Martinez
aed30180f6 Add Pace Row to LTMPopup
Missing from previous commit
2021-05-29 10:47:58 -03:00
Alejandro Martinez
773e5a21b0 Add Row to default sports and Pace Row (min/500)
Fixes #3892
2021-05-27 21:08:34 -03:00
Alejandro Martinez
0d0cf42918 Enable specific HR and Power zones for other sports
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]
2021-05-26 19:04:32 -03:00
Alejandro Martinez
5472b0b50b Fix missing replacement in LMPlot.cpp from last commit
It goes undetected by MSVC, weird.
2021-05-26 17:09:33 -03:00
Alejandro Martinez
3a07cc52d7 Generalize Power Zones for any sport
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
2021-05-26 16:15:27 -03:00
Alejandro Martinez
380dc47ac7 Generalize HrZones for any sport
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
2021-05-25 20:28:15 -03:00
Mark Liversedge
815496a8d1 Flatten Train View Load Colors
.. 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.
2021-05-23 10:07:28 +01:00
Mark Liversedge
6486e89145 Fix show efforts on CP Plot
.. showEfforts was not being initialised when the plot was created
   which resulted in sustained efforts always being shown regardless
   of the chart setting.
2021-05-22 15:24:47 +01:00
Mark Liversedge
d83041282d User Charts and the Configured Colors - Part 2 of 2
.. 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.
2021-05-22 15:11:20 +01:00
Mark Liversedge
176226545f Logical operator is && not "and" in C++
.. bit of a brain fart that g++ clearly allows, whilst MSVC doesn't.
2021-05-22 13:10:45 +01:00
Mark Liversedge
df1d83c357 User Charts and the Configured Colors - Part 1 of 2
.. 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).
2021-05-22 12:49:55 +01:00
Alejandro Martinez
20a7d74c16 Air density calculator: add ability to use relative humidity
Fixes #1383
2021-05-21 20:28:15 -03:00
Mark Liversedge
489c499ba7 isinf() not std::isinf()
.. sigh. should have been in last commit to fix the one prior.
2021-05-21 13:36:05 +01:00
Mark Liversedge
95e5cb3bc4 isnan() not std::isnan()
.. fixup last commit.
2021-05-21 12:42:38 +01:00
Mark Liversedge
9a0b6e0bc7 qSort is deprecated, use std::sort
.. 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>
2021-05-21 11:30:46 +01:00
Alejandro Martinez
44f49c54d6 Air Density Calculator - Use Average Temp from current activity
When available. Fixes #1386
2021-05-20 20:24:22 -03:00
Ale Martinez
bee7d48ac2 DropBox - Report message on connection error 2021-05-18 13:35:39 -03:00
Ale Martinez
d7e1747a2b Python API - setTag/delTag/hasTag manage overrides
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.
2021-05-18 13:03:07 -03:00
Alejandro Martinez
9315b301d7 Add setTag/delTag/hasTag to Python API
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
2021-05-17 19:32:41 -03:00
Mark Liversedge
4d5841e4b1 Move Boost GeometricTools_BSplineCurve.h to contrib
.. it is not our code.
2021-05-16 12:27:17 +01:00
Mark Liversedge
e1ac00b860 Move contributed sources to contrib directory
.. 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.
2021-05-16 10:33:09 +01:00
Alejandro Martinez
3d07321b2f RideNavigator - Use uniform row height (#3890)
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
2021-05-15 16:55:38 -03:00
Mark Liversedge
c4204231cc Fix Train Multi/Poly Regression compiler warnings
.. they hide real issues.
2021-05-15 15:24:31 +01:00
Mark Liversedge
f279898bd5 Fix Realtime widgets compiler warnings
.. they hide real issues.
2021-05-15 14:50:22 +01:00
Mark Liversedge
6560194db4 Fix LM compiler warnings
.. they hide real issues.
2021-05-15 14:30:40 +01:00
Mark Liversedge
aaa6bac5ed Fix Colors.cpp compile warnings
.. they hide real issues.
2021-05-15 14:07:08 +01:00
Mark Liversedge
a4e9b52eeb Fix TTSReader compiler warnings
.. spurious warnings hide real issues.
2021-05-15 12:58:56 +01:00
Mark Liversedge
ae2df3a271 Fix KurtInRide/SmartControl compiler warnings
.. they hide issues that are real.
2021-05-15 12:42:25 +01:00
Mark Liversedge
ce920126f5 Fix Imagic compiler warnings 2021-05-15 12:32:34 +01:00
Mark Liversedge
cebf46a99d Disable warning messages for BSPline/FixGPS
.. on a mission to clean up compiler warnings that hide real issues.
2021-05-15 12:19:52 +01:00
Ale Martinez
f072a1ad6e EPM Parser - Don't overwrite distance from position records
For older files with dpf match is not exact, missing coordinates
can be completed using FixGPS.
2021-05-12 19:09:59 -03:00
Paul Johnson
f77f040ae7 Additional Median Option in "Fix Power Spikes" Data Processor (#3887) 2021-05-12 13:43:26 -03:00
Ale Martinez
07c532a588 EPM Parser - Compute distance for old files with dpf 2021-05-09 14:24:19 -03:00
Ale Martinez
6572bbb52a Train View - Auto select matching media and videosync files
When a workout file is selected.
Fixes #3886
2021-05-08 19:06:59 -03:00
Nils
3e153f03ac Velo Hero: Use HTTP with TLS and custom User-Agent (#3885) 2021-05-08 18:07:49 -03:00
Ale Martinez
ac606065aa Train View - Save workout name as Route metadata
Fixes #3630
2021-05-08 17:05:09 -03:00
Ale Martinez
0a03aac7e8 Train View - Cancel any pending start on disconnect 2021-05-07 10:46:05 -03:00
Ale Martinez
79f4bb2815 Train View - Optional countdown for start workout
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
2021-05-06 20:11:46 -03:00
Ale Martinez
d932811c97 PMCData - create a DataFilter for eval at refresh time
To avoid crashes at refresh time on PMC formulas with an expression argument
like sts(BikeStress ?: TRIMP_Zonal_Points)
Fixes #3788
[publish binaries]
2021-05-05 18:29:47 -03:00
Ale Martinez
1e1ddfaaee PMCData - use the metric case when expression is a metric name
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.
2021-05-04 20:38:54 -03:00
Ale Martinez
3e6214624d Activity Chart - don't smooth when secs are not available
This is an edge case, but let's avoid a weird behavior.
2021-05-02 17:13:46 -03:00
Ale Martinez
88060faab6 Activity chart full replot on x-axis change
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.
2021-05-02 09:53:54 -03:00
Ale Martinez
6c2a435759 Set Activity plot to Blank when the x-axis series is not present
Fixes #3588
2021-05-01 21:09:26 -03:00
Ale Martinez
c9e01353a0 Equipment update on Strava download
This is a simpler and more efficient version of 96c8508, no need to use
getGearById service since SummaryGear is already available in DetailedActivity
2021-04-30 21:26:02 -03:00
Ale Martinez
9ff6d6ab97 Allow Device metadata field changes like standard fields
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
2021-04-30 12:51:08 -03:00
Mark Liversedge
d27327d8c1 Improve error message for measures field names
.. 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.
2021-04-30 15:23:38 +01:00
Ale Martinez
55e9cdb444 Restrict Scope authorization to drive.file for Google Drive
Full drive access was revoked and drive.apps doesn't work,
bug drive.file is enough for our purposes.
Fixes #3440
2021-04-26 13:08:56 -03:00
Ale Martinez
46be903027 Set HTTP User Agent in Web chart and OAuth dialog
To avoid Google authentication problems.
Fixes #3876
2021-04-26 11:58:42 -03:00
dconka
6c960f11c3 Add more Sigma Sport devices (#3877)
Add new SIGMA Devices ROX 11.1, ROX 2.0, ROX 4.0 and missing PURE GPS
2021-04-26 09:31:22 -03:00
Ale Martinez
96c8508da2 Get Equipment name on Strava download
When the downloaded activity has gear_id, details are retrieved
and name is added to Equipment metadata field.
[publish binaries]
2021-04-23 19:55:51 -03:00
Ale Martinez
37c1ec4bd8 Sync Strava trainer tag
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.
2021-04-23 18:11:25 -03:00
Ale Martinez
5540160d3f Sync Strava commute tag
A new "Commute" tag of type CheckBox, added to Workout Tab,
is used on Strava Sync.
Fixes #3700
2021-04-21 19:49:57 -03:00
Alejandro Martinez
2536bafcb2 Tidy up issue template [skip ci] 2021-04-21 18:38:36 -03:00
Alejandro Martinez
8de66b8f2b Update issue template [skip ci]
Let's try to make it more explicit...
2021-04-21 17:59:39 -03:00
Ale Martinez
2cbf324a26 Upgrade Python to 3.7.10 for Travis-ci Linux builds
[skip appveyor]
Python 3.7.9 AppImages is not available anymore.
2021-04-21 12:53:20 -03:00
Ale Martinez
4c7bdc3963 Add context help for Training Preferences and AddDeviceWizard
[publish binaries]
2021-04-21 11:51:07 -03:00
Ale Martinez
133364e597 Fix startup crash on Windows/Linux with HighDPI monitors
The problem is setStyle being applied before button creation...
This bug was introduced in c15d1bc, sorry.
2021-04-20 19:07:55 -03:00
Ale Martinez
39d19e8c1a TrainSidebar - Delay setWhatThis after addWidget
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.
2021-04-19 14:34:13 -03:00
Ale Martinez
f0f1b13754 Deprecated defaultString from DeviceConfiguration
It is not used anymore.
2021-04-18 22:03:57 -03:00
Ale Martinez
de10c10a50 AddDeviceWizard - Add Virtual Power Name to final step
For clarity sake, we may add some validations and warnings later.
2021-04-18 21:05:47 -03:00
comediebenji
5d666c8233 Correcting bug with quote character in workout Textevents and ZWO export (#3872)
Add protection for all XML special characters in workout Textevents and ZWO export
2021-04-18 18:22:34 -03:00
grauser
696a04e8a0 Fit : Add Garmin Edge 130/130Plus 2021-04-18 10:22:24 +02:00
Ale Martinez
e261794992 AddDeviceWizard tidy up
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
2021-04-17 20:40:46 -03:00
Alejandro Martinez
465ec039a2 Enable SportTracks debug as a runtime option (#3869)
It can be enables adding:
--debug-rules "gc.sporttracks.debug=true"
to the command line.
2021-04-15 18:40:53 -03:00
Ale Martinez
ea548695b6 deriveExtCPParameters - Initial estimates setup after data verification
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
2021-04-15 12:21:45 -03:00
Oleksiy Mishchenko
0b3a883303 Read EPOC from Garmin FIT file (#3860)
- Read Garmin/Firsbeat estimation of exercise load based on EPOC
- Add "Garmin Edge 1030 Plus" to the list of known devices
2021-04-14 21:34:04 -03:00
Michel Dagenais
c474dae4b6 Facility to trace all the USB communications (#3855)
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.
2021-04-14 21:01:44 -03:00
Ale Martinez
cb04baf734 Update Context Help for Options/Preferences and ScopeBar
Includes separation of Global/Athlete Options and New SideBar.
[publish binaries]
2021-04-14 12:52:31 -03:00
Ale Martinez
e79b474ea8 Add Context Help to Compare Pane and Workout Control 2021-04-13 14:36:01 -03:00
Ale Martinez
c01b696551 Add Context Help for Python, R, Web, Overview and User charts
Fixes #3868
2021-04-13 13:06:09 -03:00
Ale Martinez
5a1bd1a27e Add Context Help to Train View Sidebar and Charts
Fixes #3866
2021-04-12 23:58:04 -03:00
Ale Martinez
c15d1bc33b Add What's This to Help Menu and Toolbar
To make context help easier to access and promote the use of the wiki.
2021-04-12 18:26:32 -03:00
Alejandro Martinez
a0a9c31641 ConfigDialog - Enable What's this and disable min/max buttons
To make config dialog more similar to athlete config.
's
2021-04-10 19:44:20 -03:00
Alejandro Martinez
5f78616696 RideMapWindow - Fix wiki link and add subdomain to OSM Tile Servers 2021-04-10 17:07:58 -03:00
Ale Martinez
4ed2565b2f Map Chart - allow using apikey in OSM url and some useful defaults
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]
2021-04-09 16:03:04 -03:00
Ale Martinez
6e77d6bde8 Recognize Paul Johnson
https://github.com/GoldenCheetah/GoldenCheetah/commits?author=paulj49457
2021-04-09 12:34:10 -03:00
Ale Martinez
df1b5fdcaa RideMapWindow - Fix marker icons position for OSM maps
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
2021-04-09 12:31:13 -03:00
Paul Johnson
378cf95784 New Map Chart display options (#3851)
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)
2021-04-09 12:30:11 -03:00
Ale Martinez
2a8678d416 Overview Metric Tile - Enable decorations for Pace related metrics
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.
2021-04-08 19:27:10 -03:00
Ale Martinez
e3fda3cc0d Overview - Fix up/down in Metric and RPE tiles
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.
2021-04-07 21:11:44 -03:00
comediebenji
a2b95df762 Add "Ramp" qName to ZwiftParser (#3863) 2021-04-07 11:03:57 -03:00
Alejandro Martinez
3f476a8226 Add Polarized option to ZoneOverviewItem (#3858)
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]
2021-04-04 09:43:08 -03:00
Paul Johnson
92f81ef711 Removed the unused styleOptions from RideMap (#3849)
* Removed the unused styleOptions functions and associated Q_PROPERTY.
* Remove unused dark.css resource
Co-authored-by: Ale Martinez <amtriathlon@gmail.com>
2021-04-02 18:56:47 -03:00
Ale Martinez
e849b4fd81 Workout Editor - round decimal watts for qwkcode and remove cues
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
2021-04-02 14:54:22 -03:00
Ale Martinez
239f66fa6f Enable external links in AboutDialog
Fixes #3856
2021-04-01 10:39:10 -03:00
Ale Martinez
be3cb9d149 Change links to goldencheetah.org to use https 2021-04-01 10:36:11 -03:00
Michel Dagenais
58617cb165 Add debugging options to select the log file, format and rules, and redirect stderr (#3837)
* 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
2021-03-30 13:17:18 -03:00
Paul Johnson
5c33ffb1d4 Fix compiler warning in MetricSelect.cpp (#3852) 2021-03-28 20:15:04 -03:00
Ale Martinez
b9b6745da5 Upgrade Travis-ci Linux build environment to bionic
[skip AppVeyor]
In preparation for the end of xenial support
2021-03-27 12:21:02 -03:00
Ale Martinez
763235a573 Update INSTALL-LINUX to build v3.6 on Ubuntu 18.04
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.
2021-03-26 20:06:42 -03:00
Ale Martinez
e9abe68736 Fix compiler warning: shift of negative value in LocationInterPolation.h
It is harmless but annoying and polutes build logs, lets avoid it.
2021-03-26 18:59:08 -03:00
Ale Martinez
cabe078453 Change LTMPlot curves QHash to QMultiHash
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
2021-03-20 20:19:59 -03:00
Michel Dagenais
2be7a2c86e Compute the altitude incrementally from slope for Manual Slope Mode (#3847) 2021-03-18 23:22:09 -03:00
Ale Martinez
0fe28abe5a Add Time and Percent in Zones I-II-III metrics for HR, Power and Pace
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]
2021-03-18 21:07:10 -03:00
Ale Martinez
5714a74e88 Add configurable Aerobic Threshold Velocity to Pace Zones
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
2021-03-17 20:55:48 -03:00
Ale Martinez
44c6749d14 Add configurable Aerobic Threshold Power to Zones
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
2021-03-17 13:05:20 -03:00
Ale Martinez
b79166fa59 Add configurable Aerobic Threshold HR to HrZones
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
2021-03-16 19:52:50 -03:00
Alejandro Martinez
fc9e302aef Remember SRM offset from last successful calibration (#3843)
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
2021-03-13 18:09:23 -03:00
Michel Dagenais
921e81fad8 Insure that Web pages are deleted before the Web Profile to avoir error messages (#3845)
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
2021-03-13 17:16:22 -03:00
Ale Martinez
3308372445 Add getCRC method to detect all changes in UserMetricSettings
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
2021-03-07 19:03:12 -03:00
Ale Martinez
e6b302dd6c Revert "Add getFingerprint method to detect all changes in UserMetricSettings"
This reverts commit c726325af6.
2021-03-07 10:48:07 -03:00
Ale Martinez
e1b8293f01 Revert "Remove unused fingerprint field from UserMetricSettings"
This reverts commit 92d1244b68.
2021-03-07 10:46:34 -03:00
Ale Martinez
92d1244b68 Remove unused fingerprint field from UserMetricSettings
Code cleanup related to previous commit
2021-03-06 20:52:39 -03:00
Ale Martinez
c726325af6 Add getFingerprint method to detect all changes in UserMetricSettings
Fixes #3838
2021-03-06 16:51:31 -03:00
Ale Martinez
209470bf8f Add "Use template Athlete" option to Athlete creation
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]
2021-03-04 13:53:21 -03:00
Ale Martinez
bc9eaccde2 Update Windows Readme.txt and remove old install scripts 2021-03-04 11:24:36 -03:00
Ale Martinez
2d6cc255ec Fix link to wiki on Windows installer
Fixes #3834
2021-03-04 11:09:45 -03:00
Ale Martinez
58f8d9394d Missing break from previous commit 2021-03-04 10:54:03 -03:00
Ale Martinez
06914d9446 Add Athlete > Delete menu
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.
2021-03-03 22:27:17 -03:00
Alejandro Martinez
453b05a188 Enable Athlete Open menu to allow creation of new athletes (#3836)
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.
2021-03-03 19:27:43 -03:00
Ale Martinez
ace6760fbb Set parent widget for file select dialog on Measures CSV import
This fixes an annoying behaviour on Linux where the file select dialog
sometimes is not open on top of import dialog.
2021-02-28 13:17:24 -03:00
dconka
da75f0cc38 Update FitRideFile.cpp (#3832)
Add missing SIGMA SPORT Products with consistent format
2021-02-27 19:46:57 -03:00
Michel Dagenais
14b287109f Illustrate trainer maximum resistance versus rider maximum force (#3830)
[skip ci]
2021-02-25 09:03:21 -03:00
Ale Martinez
b44be0897d Implement value(v, metric) for UserMetric
It needs to be overriden like value(metric)
2021-02-23 19:29:56 -03:00
Christoph Wurst
cf31bffed2 Correctly recognize the Sigmasport iD.FREE product (#3745)
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>
2021-02-23 19:18:02 -03:00
ericchristoffersen
d84d329a78 Fix VLC Hangs with Intentional State and Ordered Async Dispatch (#3764)
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
2021-02-23 19:13:15 -03:00
Ale Martinez
8d89ba4e67 Add constants for Axis type to R and Python API 2021-02-22 20:41:28 -03:00
Ale Martinez
276791edb9 No Fortius Calibration on building without LibUSB
Fixes #3827
2021-02-18 20:39:01 -03:00
Ale Martinez
2d64166acd Added "with Barometer" to TCX and GPX creator tag
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
2021-02-17 10:41:28 -03:00
Paul Johnson
cbe75fae47 Fixes #3439 - Activity start time for imported iBike CSV files is incorrect (#3825) 2021-02-16 10:55:16 -03:00
Ale Martinez
537b6677d3 Fix L/R balance in FIT import
To match the code comment and honor FIT file specification
Fixes #3819
2021-02-15 10:38:00 -03:00
peret2000
980c99cfae LiveMapWidget uses configured zoom (#3823)
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>
2021-02-13 10:37:01 -03:00
Ale Martinez
cdb117486a Overview Chart Screenshots for the wiki
[skip ci]
2021-02-11 16:11:06 -03:00
Iain Macdonald
01b0e4767b ANT+/FE-C Trainer capabilities request fix (#3818)
Co-authored-by: IainMacdonald <iainmacdonald@rogers.com>
fixes #3784
[publish binaries]
2021-02-05 15:58:25 -03:00
Ale Martinez
0eb8d63d07 Add fallback for Athlete Bodyfat
Computed from FatPercent and Weight when FatKg is 0
2021-02-05 11:08:11 -03:00
Ale Martinez
d59b7d43f4 Add fallback for Athlete Bodyfat Percent
Computed from FatKg and Weight when FatPercet is 0
2021-02-04 21:13:32 -03:00
Ale Martinez
d392984993 Add config(sex) and config(dob) to formulas
To enable formulas like Harris-Benedict basal metabolic rate
or TRIMP variants which depend on sex and age.
Fixes #3523
[publish binaries]
2021-02-01 13:51:51 -03:00
mattipee
c72b81ea84 Fortius "rolling" calibration (#3804)
* Rolling calibration
* Differentiate "Give the pedal a kick" and "Allow wheel speed to settle"
2021-01-29 20:00:38 -03:00
Michel Dagenais
773b076606 Get the Altitude for CRS files even when Fast Forwarding (#3806)
* 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
2021-01-29 18:45:56 -03:00
Michel Dagenais
5dc4ace31d Fix the request - reply interactions with the Fortius (#3801)
* 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
2021-01-28 18:12:00 -03:00
mattipee
0427042709 RealtimeController::setWindResistance() should be passed CdARho, not just CdA (#3800)
* Dynamic wind resistance based on altitude
* Clarity CdA vs CdARho
2021-01-28 09:45:13 -03:00
mattipee
d76701285d Change timing to sleep between send and read (#3795) 2021-01-24 20:29:25 -03:00
mattipee
97ce2989bf LibUsb::OpenFortius - Remove call to usb_set_altinterface() (#3732)
Was known bad on OSX, proved an issue on LINUX (for me), and tested on WINDOWS following its removal
2021-01-24 20:27:45 -03:00
Sigfreid74
d8c21e4070 Change Colours for some data series in Train Telemetry (#3792)
Fixes #3796
2021-01-21 13:53:49 -03:00
mattipee
0d3a8c911a Fortius calibration (#3790)
Added calibration trainer command, delayed check for user stopped pedaling with visual feedback on progress and saved calibration for next use on success.
2021-01-21 09:17:18 -03:00
Ale Martinez
a298715bb5 Fix Crash and copy paste error in WorkoutEditor
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.
2021-01-16 20:02:20 -03:00
mattipee
1b18ec7eeb Fix force/speed/power calculations for Fortius (#3785)
* 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
2021-01-16 18:05:33 -03:00
ericchristoffersen
33a4cf517d Move manual modes onto common load timer path. (#3776)
Simplify handling of manual modes so they use the same path and load_timer as the non-manual modes.
This means one less path to maintain and modify.
2021-01-15 20:19:36 -03:00
Ale Martinez
105f15e3e0 FixGaps: improve interpolation of left/right balance for smart recording
Similar to 2b6473d
2021-01-15 11:35:07 -03:00
Ale Martinez
d21a603fa1 LRBalance related metrics check for RideFile::NA
Invalid values are now mapped to RideFile::NA on import,
0 and 100 are valid values and should not be excluded.
Fixes #3473
2021-01-14 20:52:30 -03:00
Ale Martinez
5d510388cf TRAIN - Fix LRBalance from ANT+ channels
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
2021-01-14 20:13:22 -03:00
Ale Martinez
0b7d817c2d Estimate CP for Runs - Increase distance precision to 3 digits
Distance is in km/mi and 1 digit is not enough to use timed tests to
exhaustion, for distance based TTs likely this is not an issue.
2021-01-14 20:13:22 -03:00
grauser
2b6473da60 Fit : improve interpolation of left/right balance for smart recording 2021-01-14 21:57:51 +01:00
grauser
cefc2cb81c FIT : add some manufacturers 2021-01-14 21:57:51 +01:00
grauser
b29f72d19c RideFitFile :
- Add Right contribution bit in FIT exported
  - Don't asssume left data if right side not confirmed
  - Plot 0 left/Balance

Fix #3017
2021-01-14 21:57:51 +01:00
Christian Taedcke
75ba4c0e90 Daum: Improve support for more cockpits (#3775)
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.
2021-01-14 16:43:54 -03:00
Ale Martinez
1d4e93350a User PIE and BAR Charts honor x-axis Date and Time settings
So labels/categories are displayed in Time/Date format
in a similar way to Line and Scatter charts.
2021-01-13 20:30:26 -03:00
Ale Martinez
1120704073 Add screenshots for the wiki - New Metric Trends Curves
[skip ci]
2021-01-12 21:29:01 -03:00
Ale Martinez
41456b5cc1 Upgraded embedded Python to 3.7.9 for Windows builds
[skip travis]
2021-01-11 19:06:56 -03:00
Ale Martinez
cf745c1200 Regenerate vlc3 cache for Linux AppImage
[skip AppVeyor]
Fixes #3763 "main libvlc error: stale plugins cache ..."
2021-01-07 19:49:15 -03:00
Ale Martinez
89d99ccecf UserData screenshots for the wiki
[skip ci]
2021-01-06 18:03:31 -03:00
willfaust
08ff66a7bd Correct spelling of "optimise" in readme (#3758) 2021-01-06 08:43:00 +00:00
Ale Martinez
dfe4da61d8 Fix GC_VERSION for tag builds
The use of / instead of \ as path separator on cmd script line causes
tag builds lack proper version string and report (developer build)
[skip travis]
2021-01-05 20:29:34 -03:00
Mark Liversedge
3c5d53a5bb VERSION 3.6 DEVELOPMENT JANUARY 2021
.. marking up for development release

[publish binaries]
2021-01-05 13:21:37 +00:00
Ale Martinez
9b52cf6a6c Athletes View - Skip non-athlete directories 2021-01-02 16:44:41 -03:00
Ale Martinez
944f0ba73d Athletes View - Allow athletes without config/avatar.png
In the same way ChooseCyclistDialog and MainWindow do.
2021-01-01 22:11:14 -03:00
Ale Martinez
24203a01ad Remove libpng warning: iCCP: known incorrect sRGB profile
When loading noavatar.png
2021-01-01 22:04:10 -03:00
Ale Martinez
c6c5505610 FitRideFile - don't use deleted swimXdata pointer
Fixes #3740
2020-12-30 10:43:20 -03:00
ericchristoffersen
f251e982ae Fix tts videosync with non zero start distance (#3739) 2020-12-29 20:41:16 -03:00
Ale Martinez
d881a2b3be Add BT40 pair screenshot for the wiki
[skip ci]
2020-12-29 11:05:40 -03:00
Ale Martinez
4e3a258a1c Add Device Wizard - Reword BTLE pair page
For clarity sake.
2020-12-28 21:30:59 -03:00
Ale Martinez
6f79286302 BT40Device: add erg mode support for Tacx ANT over BLE
This is a continuation of 6ca1bd9 and fixes #3319
2020-12-28 20:59:07 -03:00
Ale Martinez
ea1aa13a9b BT40Device - Remove annoying compiler warnings
Introduced with Kurt Kinetic support
2020-12-28 20:57:27 -03:00
Ale Martinez
c25e9f2749 Consider only athletes with config/metadata.xml on v3.6 upgrade
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]
2020-12-26 21:02:55 -03:00
Ale Martinez
5eb519a214 Overview Chart - Allow string values in KPI tiles
This enables the user to display different texts, according to
metrics or metadata conditions, using string valued formulas.
2020-12-26 10:51:37 -03:00
Ale Martinez
61b5fee924 Added Start with last opened Athlete option to config
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]
2020-12-24 11:14:32 -03:00
ericchristoffersen
ae318a43ba Handle tts videosync distance outliers (#3730)
Fixes #3729
2020-12-23 11:02:09 -03:00
Ale Martinez
759c6593cf Measures Download tidy up
Next step would be to refactor MeasuresDownload for simplification
and generalization
2020-12-22 12:36:41 -03:00
Ale Martinez
6f948346a4 Export Chart Image Don't use Native Dialog
Hangs when exporting User Chart Images
Similar to 67801f4, related to #3372
2020-12-19 11:01:04 -03:00
Ale Martinez
e098816f2b Don't allow "_" in user metric name
since it is alread used to replace blanks and breaks some functionality,
for example names with "_" don't appear on column chooser.
2020-12-17 15:52:32 -03:00
Ale Martinez
055833eed9 RideNavigator - Avoid .000 msecs and 00:00:00 in metric values 2020-12-17 11:29:22 -03:00
Michel Dagenais
f0d839c37b Screenshots of training views for the wiki (#3722) [skip ci] 2020-12-16 19:04:08 -03:00
Michel Dagenais
c373e65010 Screenshots for Train view documentation (#3715) [skip ci] 2020-12-14 23:56:53 -03:00
ericchristoffersen
0d57f88ac2 Redo bicyclesim settings layout and typos. (#3714) 2020-12-14 20:56:21 -03:00
Ale Martinez
d5b09a4c9c Measures CSV import - allow values in sexagesimal format
Initial use case is sleep_time from HRV4Training
[publish binaries]
2020-12-14 18:46:45 -03:00
Stefan
afb69d8edb Smooth sidebar icons 2020-12-14 18:46:45 -03:00
ericchristoffersen
603c8cd651 FixSimulated Speed setting now honored in Ergo Mode. (#3713)
* Simulated Speed setting now honored in Ergo Mode.
* Update text and add tooltips
2020-12-14 17:23:15 -03:00
Ale Martinez
983874d599 Measures config - consistency checks for addField and setField
Default to 1.0 for unitsFactor.
[publish binaries]
2020-12-13 20:03:47 -03:00
Ale Martinez
906cffba8e Measures Config - preserve Measures order on save/restore 2020-12-12 17:04:38 -03:00
Alejandro Martinez
af19f31b24 Add Measures configuration to General Settings (#3709)
It allows to add/edit/remove Measures Groups and Measures Fields.
Reset is a rescue option to go back to default configuration.
Fixes #2872
2020-12-11 20:26:48 -03:00
ericchristoffersen
47cb560633 Geoloc double to string precision (#3711)
Fixes #3710
2020-12-11 20:25:46 -03:00
ericchristoffersen
e24d25ff47 Fix VideoSync Errors (#3704)
Fixes #3702
2020-12-10 15:43:46 -03:00
ericchristoffersen
373f3b7a35 Build warnings (#3705) 2020-12-10 11:18:57 -03:00
ericchristoffersen
b887f69a1b Simulated Hypoxia for Train Mode (#3699)
Fixes #3698
2020-12-10 07:41:39 -03:00
David Rio Deiros
80086ace46 Makefile that captures details on how to build GC on raspberry pis (#3695)
[skip ci]
2020-12-09 14:42:31 -03:00
Christian Taedcke
53e19a006d Daum minor code cleanup (#3692)
* 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.
2020-12-04 09:47:03 -03:00
Peter Kanatselis
2d1e36549c Live map with route (#3534)
* Updated LiveMap widget with route
* OSM URL configurable in video-layout.xml file
* Enhanced HTML and JS code
2020-12-03 21:02:44 -03:00
Ale Martinez
763458564c Honor clear selection of media in Train Sidebar
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]
2020-12-02 19:12:56 -03:00
Ale Martinez
5f68d2dce0 VideoWindow - Don't show LiveMap when there is no video
Fixes #3621
2020-12-02 18:39:15 -03:00
Christian Taedcke
3c639d3377 Daum: Adapt code for 8008 TRS pro (#3691)
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.
2020-12-02 18:38:46 -03:00
Christian Taedcke
ec11d90160 Daum: Fix signed byte issues (#3690)
Because of QByteArray, the member bytes a signed char,
so a raw byte of 0x80 is interpreted as -128 and not as
128 as expected by the code.
2020-12-02 18:07:59 -03:00
ericchristoffersen
c49fa4f4d5 Minor ErgFilePlot cleanups. (#3688)
Complement of #3686
2020-12-01 19:26:02 -03:00
Ale Martinez
8c01d6291e Make intervals from JSON files segments in ErgFiles
Since they can overlap
Complement of #3686
2020-12-01 15:51:44 -03:00
ericchristoffersen
34526f2fe9 Readable Segments in ErgFileOverview (#3686)
Model and Display Segments - Fixes #3685
2020-12-01 15:49:59 -03:00
ericchristoffersen
487ec866f5 Fix 3680: Text, Chim and Lap Issues (#3681)
Fixes #3680
2020-12-01 09:44:49 -03:00
Ale Martinez
36df458406 Add reveal control for data series to CP chart
Similar to Scatter chart, to avoid the need to have several instances
for different data series sparing tabbar space.
Related to #2039
2020-11-29 23:00:57 -03:00
Ale Martinez
1b61f076ca Add reveal control for data series to Histogram chart
Similar to Scatter chart, to avoid the need to have several instances
for different data series sparing tabbar space.
Fixes #2039
2020-11-29 16:09:32 -03:00
Ale Martinez
cb37db2281 Export to CSV with UTF8 and ISO date format
For broader support of translations and date formats
Fixes #3613
2020-11-28 17:56:06 -03:00
Ale Martinez
1957404d03 Fix table mode in Metric Trends charts when there is only 1 group 2020-11-28 17:08:52 -03:00
Ale Martinez
90acbedabb Enable Group by TOD in table mode Metric Trends chart 2020-11-28 11:55:48 -03:00
Ale Martinez
56532be1ea Fix #3613 - BikeScore document location
[skip ci]
2020-11-27 10:50:42 -03:00
Ale Martinez
bed5f1e820 Parse Vertical Speed extra native series from FIT files 2020-11-25 20:16:41 -03:00
Daniele Santini
a42ca208b6 Trim TCX files before importing (#3470)
Allows to import TCX files with leading whitespaces, such as those generated by Strava

Fixes #3149
2020-11-25 18:21:54 -03:00
ericchristoffersen
9ff48f067a Fix Lap Bugs (#3678)
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.
2020-11-25 13:27:37 -03:00
Ale Martinez
70fa7c0a45 Add Core Temperature series name and use consistently
Fixes #2214
2020-11-25 13:21:44 -03:00
Ale Martinez
e874714f60 Round to the second when importing erg files to Workout Editor
Fixes #2322
2020-11-24 18:03:46 -03:00
ericchristoffersen
71f34634e3 Rotational Inertial for Custom Virtual Power (#3653)
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
2020-11-24 12:19:01 -03:00
ericchristoffersen
afd6552b3b Fix #3669 - Don't copy dual mode files twice. (#3670) 2020-11-23 11:46:48 -03:00
Ale Martinez
8e5a2b42d0 Truncate non integer watts when importing workout files
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
2020-11-22 14:00:25 -03:00
Ale Martinez
bf02c868ea Add back to previous lap button to Train bottom bar
Uses RewindLap implemented as part of #3442
[publish binaries]
2020-11-20 20:20:49 -03:00
Eric Christoffersen
25bb4beaa5 Support stateless ergfile location query (#3442)
Remove query state from ergfile and videosyncfile.
Stateful ergfile queries are now made through an adapter.
Implement RewindLap.
Fixes #3416
2020-11-20 20:20:30 -03:00
ericchristoffersen
c187dbe686 Fix3672 - Read out of range when tts has 0 points (#3673) 2020-11-19 06:50:01 -03:00
Ward Muylaert
44fd1885a1 Add ~Mercator projection to overviewitem route (#3665)
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.
2020-11-18 19:56:12 -03:00
Ale Martinez
197d320bf8 Add jump to next lap marker button to Train bottom bar
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.
2020-11-18 18:45:25 -03:00
Ale Martinez
d17bba8ce1 Add intervals as lap markers in json workouts 2020-11-18 18:41:55 -03:00
ericchristoffersen
fe4301a7e2 Teach ttsreader to process routes and segments (#3668)
* 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.
2020-11-18 12:30:05 -03:00
Ale Martinez
aaf6f282b0 Add DistanceRemaining to RealtimeData based on RouteDistance
Fixes #3648
[publish binaries]
2020-11-15 16:54:52 -03:00
riccioclista
f30dd0a9c5 Workout: Save LAP markers in mrc files (#3114)
When saving an mrc file in the workout editor, lap markers are ignored. This fixes it.
2020-11-14 18:11:18 -03:00
ericchristoffersen
d4aebbb441 Fix 3596: Fix display of route elevation. (#3664)
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.
2020-11-13 09:05:28 -03:00
ericchristoffersen
f47c3003a7 Fix 3498 - truncate distances for display (#3663)
For distance display, better to truncate than to round up.
2020-11-12 21:49:32 -03:00
ericchristoffersen
a7b08c4abf Fix issues 3580, 3582 (#3662)
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...
2020-11-12 21:48:43 -03:00
Ale Martinez
a107a0203c Defaults are duplicates when both field and value match
Fixes #3610
2020-11-12 14:44:33 -03:00
qheath
aaa7889172 make the date range of relative seasons (e.g. in Trends) update as time passes (#3546)
* 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
2020-11-12 11:06:04 -03:00
qheath
9e5980f82c fix LTM Chart to show all events from the date range (#3540)
* 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
2020-11-11 18:17:06 -03:00
Ale Martinez
45345679a6 Fix #3608 2020-11-11 17:56:14 -03:00
Ward Muylaert
c187d4325b Sort routes when they are added to an activity (#3661)
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.
2020-11-11 13:38:41 -03:00
Ale Martinez
7d32bb4446 Recognize Ward Mylaert and Scott Conover 2020-11-10 20:57:22 -03:00
Scott Conover
bbc7a03178 Fix issue #3571: segment matching (#3573)
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.
2020-11-10 14:27:58 -03:00
Ale Martinez
cec7c4dd52 Don't refresh R and Python charts on intervalsChanged
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.
2020-11-09 21:07:39 -03:00
Ale Martinez
4273480bf4 Re-enable run script on interval selection in a Python chart
This feature was availabe in v3.5, it is enabled for R charts
and both have selected field on activity interval APIs to exploit this.
Fixes #3660
2020-11-09 17:40:48 -03:00
Ale Martinez
a5252334ef Merge pull request #3657 from ward:manage-filters-up-down 2020-11-08 19:39:15 -03:00
Ward Muylaert
e05cf52446 Add up and down button to NamedSearch dialog
Also know as the Manage Filters dialog. Reordering was not possible in
the interface yet, you were forced to edit the xml file to do any
reordering.
2020-11-08 18:35:32 -03:00
Ale Martinez
1345779cfc Fix typo in MeterWidget
It makes slope text to disappear in the second half of the ride
2020-11-07 18:23:39 -03:00
Ale Martinez
cfd456c798 Reorder musclekg and boneskg when Body Measures are created
They are interchanged by mistake
Fix #3655
2020-11-04 16:17:52 -03:00
Ale Martinez
4af953ee00 Fix ProgressBar percentage in Overview KPI tile when istime
Pending from previous commit
2020-11-03 20:36:56 -03:00
Ale Martinez
617ebc3d82 Fix count in Athlete_Weight metric
It has to be 1 so each activity has equal weight when averaging,
instead of being weighted by duration.
[publish binaries]
2020-11-03 13:27:52 -03:00
Ale Martinez
3e846a3d20 Fix ProgressBar in Overview KPI tile when istime
Pending from previous commit
2020-11-03 13:23:52 -03:00
Ale Martinez
da8341f619 Add istime option to KPI tile in Overview chart
To enable display in sexagesimal format (hh:mm:ss),
similar to istime in User Metrics.
[publish binaries]
2020-11-02 19:20:18 -03:00
Ale Martinez
d3cafc4aed Fix laps in crs files generated by Workout Wizard
Fixes #3652
2020-10-31 19:12:13 -03:00
Ale Martinez
42b37ce017 Avoid Travis-ci macOS build being cancelled generating dmg
[skip appveyor]
2020-10-31 16:19:31 -03:00
Ale Martinez
fc9c116fa4 Separate metric conversion from formating when value is provided
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
2020-10-31 11:13:31 -03:00
Alejandro Martinez
a2da081681 Update after_success.sh
travis_wait is a function on build shell, not available on shell scripts
2020-10-30 14:31:32 -03:00
Alejandro Martinez
b6e3ae4c96 Update after_success.sh 2020-10-30 13:06:17 -03:00
Ale Martinez
eb6f111a0d Change include files renamed in f5f38f5 2020-10-28 14:26:17 -03:00
Mark Liversedge
f5f38f54e9 Project Style prefers CamelCase
.. we tend to avoid using underscores (_) in preference for
   camel case. Especially for filenames.
2020-10-28 09:28:26 +00:00
Mark Liversedge
6ed93a22a1 Fix compile failure on case sensitivity
.. e77096d introduced a compile error on O/S where filenames
   are case sensitive.
2020-10-28 08:01:52 +00:00
Mark Liversedge
f4dd2f10bd Revert "Overview Unit Conversion"
This reverts commit 2d446cc9c2.
2020-10-28 07:56:06 +00:00
Mark Liversedge
2d446cc9c2 Overview Unit Conversion
.. don't do metric/imperial conversion again when aggregating
   metrics in a date range.

Fixes #3647
2020-10-28 07:52:04 +00:00
Ale Martinez
4c50c1fb53 Avoid crashes in Overview when a metric not available is referenced 2020-10-25 17:55:35 -03:00
Ale Martinez
83a50db2cb Upload Travis-ci builds to free.keep.sh instead of transfer.sh
[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.
2020-10-25 11:43:24 -03:00
ericchristoffersen
e77096df35 Support Kurt Kinetic Inride and SmartControl (#3636)
* Support Kurt Kinetic Inride and SmartControl
* Teach BT40 about calibration - and kurt kinetic.
2020-10-25 09:25:18 -03:00
ericchristoffersen
f51856a52a Fix Error Setting Custom Wheel Diameter (#3643) 2020-10-25 02:26:01 -03:00
Alejandro Martinez
294bf71f96 Update ISSUE_TEMPLATE.md
[skip ci]
2020-10-24 16:44:13 -03:00
Mark Liversedge
4ab82e9755 Athlete Config Cosmetics
.. tabs in tabs looks fugly, so secondary tabs use underlines
.. background of accounts page was incorrect.
2020-10-23 10:26:29 +01:00
Ale Martinez
b7a56a9dd9 Implement moveSeriesUp and moveSeriesDown for User Charts
To enable series reordering.
2020-10-20 12:12:01 -03:00
Ale Martinez
cde4ec0194 Access global metadata.xml instead of athlete specific one
In remaining places: TreeMapWindow constuctor and APIWebService::listRides
Complements 80d7eed
2020-10-18 20:07:21 -03:00
Ale Martinez
ca191e3163 Initialize Athlete Settings on REST API listAthletes
Required for cvalue to work
Fixes #3627
2020-10-18 17:04:39 -03:00
Alejandro Martinez
d2a530e19e Prevent Windows From Going to Sleep While In Train Mode
Fixes #2324
[skip travis]
2020-10-18 11:32:02 -03:00
Michel Dagenais
4c62c52fc3 Fix a small issue in setPowerScaleFactor (#3634)
If a value was set for the powerScaleCalibration factor, the weight was clipped between 0.8 and 1.2kg. That would be an easy ride uphill for sure.
2020-10-15 00:02:21 -03:00
Michel Dagenais
b2e90c0af6 Remove modal dialog for Fortius disconnect (#3633)
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.
2020-10-14 23:02:38 -03:00
Ale Martinez
52c1441e03 Implement 2 param value and toString for PeakPace and BestTime
Fix #3629
2020-10-12 15:06:59 -03:00
Ale Martinez
3d1f8ee5fa Fix Data Series constants in library.py
Added GC.SERIES_LPCO, following values shifted by one,
and GC.SERIES_HRV removed.
Fixes #3625
2020-10-07 17:07:31 -03:00
Ale Martinez
1023e599a0 Fix copy/paste error in RideFileTableModel
Fix #3623
2020-10-06 13:09:08 -03:00
Ale Martinez
586ead3638 Avoid Cancel becomming default button on RideImportWizzard
Fixes #3581
2020-10-05 11:48:05 -03:00
grauser
d50e1a8552 FITRideFile : Correct bug for multiple values in record point
fix #3619
2020-10-04 23:03:27 +02:00
Ale Martinez
8c30a6da4a Set Web Page chart color
Fixes #3617
2020-09-29 12:01:21 -03:00
Ale Martinez
a1087c9bb3 Upgrade VLC to 3.0.8
For Windows, Linux and macOS builds.
[publish binaries]
2020-09-28 15:06:13 -03:00
Ale Martinez
e363f57a74 Generate missing configure to build srmio for Linux
[skip appveyor]
2020-09-28 11:04:50 -03:00
Ale Martinez
c61a6d846e Update GC version on info.plist.app 2020-09-27 21:13:50 -03:00
Ale Martinez
22ea3399fe Update srmio download for Travis-ci Linux builds
[skip appveyor]
It is not available anymore on previous location
2020-09-27 21:13:38 -03:00
Ale Martinez
16dfd234e2 Simplify Windows setup script and upgrade to VLC 3
[skip travis]
2020-09-27 20:08:37 -03:00
Ale Martinez
4351c68770 Upgrade to VLC 3 for Travis-ci Linux builds
[skip appveyor]
2020-09-27 14:14:13 -03:00
Ale Martinez
c10b666b55 Travis - Enable VLC 3 on macOS builds
[skip appveyor]
2020-09-27 14:13:41 -03:00
Ale Martinez
0dfa8f0e00 Fix Measures conversion error on Athlete Options
When using imperial units
2020-09-24 15:00:39 -03:00
Ale Martinez
9264d112ef Fix connect error in Live Map Chart 2020-09-23 21:13:24 -03:00
Ale Martinez
5fdf427f39 Change Travis-ci macOS image to 11.3 and use included Qt5.14.1
Temporary workaround for #3611
[publish binaries]
2020-09-23 15:40:42 -03:00
Peter
4c19365e8b Live Map Chart (#3487) 2020-09-22 11:25:14 -03:00
Ale Martinez
28cbf3b943 Override existing watts on power estimators manual call
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.
2020-09-20 20:58:07 -03:00
Ale Martinez
410b28f4db Apply Bearing fix to Fix Derive Headwind
Same as 5066fa9
2020-09-20 20:18:40 -03:00
Ale Martinez
73e175e0f3 Fix Measures issues and display in reverse order
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.
2020-09-15 16:25:35 -03:00
Mark Liversedge
8e84ed280d Only create OpenGL context on Linux
.. 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]
2020-09-15 10:58:56 +01:00
Ale Martinez
0d4c289b9e Fix missing QtWebEngineProcess in HomeBrew Qt 5.15.1 deploy
[skip appveyor]
[publish binaries]
2020-09-13 12:34:15 -03:00
Mark Liversedge
f358f335b0 DataFilter - store/fetch values
.. 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]
2020-09-12 09:59:04 +01:00
ericchristoffersen
1593576cff Apply recent alt fixes to route. (#3604) 2020-09-10 15:16:15 -03:00
ericchristoffersen
5066fa990d Lat and Lon now get DegreesToRadians (#3600)
Bearing calc to geolocation fix bike and running power
2020-09-09 17:23:15 -03:00
ericchristoffersen
a418b601b1 Altitude smoothing fixes (#3599) 2020-09-09 17:21:44 -03:00
Michel Dagenais
01f1e0e9bd Fortius fixes (#3595)
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.
2020-09-08 20:27:59 -03:00
Ale Martinez
aeb0e142cd Add battery status to Device Info from FIT files
Fixes #2238
2020-09-08 17:50:28 -03:00
Ale Martinez
7cacf01e8d Revert "Add Qt5OpenGL.dll to Windows installer"
This reverts commit b2da0afb83.
Since OpenGL on Windows was disabled.
[skip travis]
2020-09-08 10:37:18 -03:00
Mark Liversedge
e95eb7b39d Only Enable ChartSpace OpenGL on Linux
.. 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
2020-09-08 09:47:40 +01:00
Mark Liversedge
fc3de5f84a No --newgui as MainWindow refactored
.. 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.
2020-09-08 09:40:17 +01:00
Mark Liversedge
97f58096cb Update README.md
Better grammar and more detail that is relevant to someone new to GoldenCheetah.
2020-09-08 07:00:24 +01:00
Ale Martinez
2fb044e653 Change to Python 3.7.9 for macOS Travis-ci builds
[skip appveyor]
To keep Python version in sync across platforms.
2020-09-05 20:15:40 -03:00
Ale Martinez
de02184079 Change to Python 3.7.9 for Linux Travis-ci builds
[skip appveyor]
Python 3.7.8 AppImage is no longer available
2020-09-05 11:38:44 -03:00
Mark Liversedge
6164dd963f VERSION 3.6 DEVELOPMENT SEPTEMBER 2020
.. marking up for development release

[publish binaries]
2020-09-05 08:20:10 +01:00
Ale Martinez
8c5b416b56 Fix sensor serial number import from FIT files
Type is uint32z according ANT+ specification
2020-09-03 21:32:08 -03:00
Ale Martinez
b2da0afb83 Add Qt5OpenGL.dll to Windows installer
Required by 8b651b5
[skip Travis]
2020-09-02 10:59:53 -03:00
Mark Liversedge
8b651b50dc OpenGL rendering
.. 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
2020-09-01 15:29:37 +01:00
Ale Martinez
b69daad663 Fix error when computing Recovery Points in FilterHrv
We need to use Symbols, not names, to avoid translation related issues
Complements 0179c3b
2020-08-31 13:29:20 -03:00
Ale Martinez
0179c3b3d8 Fix Regresion when computing Recovery Points in FilterHrv 2020-08-30 13:53:01 -03:00
Michel Dagenais
894d9e6e23 Propagate Weight and other simulation parameters to training devices (#3500)
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.
2020-08-29 19:22:44 -03:00
Mark Liversedge
9e4fe431e4 Chart space remove drop shadow
.. even with opengl the performance is terrible.
2020-08-29 11:12:06 +01:00
Mark Liversedge
c3f7cf1404 Chart Space drop shadow
.. create a bit of depth

[publish binaries]
2020-08-28 17:38:42 +01:00
Ale Martinez
f1c6394305 Use the new Data instead of Ride Editor for Python Fixes
Fix crash reported at the forum
2020-08-26 11:38:47 -03:00
Ale Martinez
0f40659052 Fix comment on BT40Device 2020-08-26 11:37:35 -03:00
Ale Martinez
16d5c82f21 Fix sample measures.ini documentation error
[skip ci]
2020-08-25 18:39:40 -03:00
Mark Liversedge
96b4cacec9 DataFilter - xdata() function
.. 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.
2020-08-25 19:42:04 +01:00
Ale Martinez
1a184f925d Fix Qt message handler used when API Web Service is enabled
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]
2020-08-25 14:17:30 -03:00
Ale Martinez
84f706f370 Use different time base for BTLE speed computation
Depending if data come from Power or CSC sensor.
Complements #3456 Fixes #3578
2020-08-25 13:59:32 -03:00
Ale Martinez
42632c4d8d Avoid crashes on Trends Overview when metric is unavailable
Metric, TopN and Donut crash on setData when the base metric
is not available, for example when a User Metric was removed.
2020-08-24 19:12:11 -03:00
Mark Liversedge
203c505f34 Update Readme.md
Describe GoldenCheetah from a user perspective, not a developer.
2020-08-24 17:06:06 +01:00
Ale Martinez
5ef8817107 Move Pace units from athlete to general settings
Also change defaults to match metric/imperial for consistency.
Fixes #2253
2020-08-23 12:53:53 -03:00
Ale Martinez
46e07a7016 Make measures.ini global looking for it in gcroot
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]
2020-08-22 19:14:42 -03:00
Poncho
35606d321c src/Core/Context.cpp: include Settings.h (#3577) 2020-08-22 11:48:58 +01:00
Mark Liversedge
fbd095a2d4 Split Global and Athlete configuration
.. 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]
2020-08-22 11:36:24 +01:00
Ale Martinez
79071a2f3b Fix Travis-ci macOS builds - change sip source
Python sip 4.19.8 is not available anymore from Riverbankcomputing.com,
lets download from sourceforge.net like we do for Linux and Windows builds.
2020-08-21 17:33:15 -03:00
Mark Liversedge
80d7eed382 RideMetadata and friends moved to GlobalContext
.. 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]
2020-08-21 19:01:37 +01:00
Ale Martinez
a0409e8cea Fix truncated json when importing Lap Swim FIT files
Due to NAN distance on 1sec pauses, introduced in 3f9892d
[publish binaries]
2020-08-20 17:04:19 -03:00
Ale Martinez
6cdd5bbbe7 Shorter timeout on transfer.sh upload to avoid timeouts
Uploads are quite fast or don't work, so don't wait too much.
2020-08-20 17:03:01 -03:00
Ale Martinez
39feb5807c Show metrics in locale aware collation order
Unicode order can be confusing for some locales
Reported in #3542
2020-08-20 10:55:37 -03:00
Mark Liversedge
99fb4f551e Tweak RideEditor header cosmetics
.. solid line between header and data, just makes it less of
   a see of text by separating the header from the data.
2020-08-19 11:47:35 +01:00
Mark Liversedge
6fcabd699a Ride Editor bottom tabs match Ride Metadata tab style
.. 4px width bar etc.
2020-08-18 10:01:48 +01:00
Ale Martinez
bdd6d2c219 Fix KPI Tracker in chart library
Best 60min Power was Best 60min Speed, separately fixed the web version
Fixes #3574
2020-08-17 17:55:25 -03:00
Mark Liversedge
90e20d79bd Unified Editor and Metadata
.. 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).
2020-08-16 18:14:18 +01:00
Mark Liversedge
ebca2b846a Modernise the Metadata tabbar
.. flat styling with an indicator underneath the current selection.

.. been meaning to do this for absolutely ages.
2020-08-16 09:51:35 +01:00
Ale Martinez
2a43f11c72 Revert "Windows builds log to goldencheetah.log when not debugging (#3485)"
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]
2020-08-15 19:36:16 -03:00
Mark Liversedge
6cdb848e9f Show metric refresh progress on Athlete View
.. part of a general process of centralising status, progress messages
   and indicators into one place.
2020-08-15 11:47:41 +01:00
Mark Liversedge
2372b4cdbe RideNavigator one more row of text
.. feels a little less cramped. but still needs to be completely
   overhauled for v3.6 UX
2020-08-15 10:31:12 +01:00
Mark Liversedge
2eed6f66dc Allplot less transparency
.. when filling curves as looks washed out with white backgrounds.
2020-08-15 10:30:12 +01:00
Mark Liversedge
3c6bbd5ec6 Theme Tweak add MS Teams inspired theme
.. same understated purple and white.

.. also removed some of the old (rubbish) themes.
2020-08-15 09:54:40 +01:00
Ale Martinez
1eae9f4071 Metrics Trends chart - Fix averaging group counter in table mode
The group counter was not reset and incremented unconditionally
in table mode, producing wrong averages when zeros are excluded.
Fixes #3566
2020-08-14 19:01:07 -03:00
Ale Martinez
414cc630fd Don't compute Pace Swim for non swimming activities
Fixes #3570
2020-08-14 12:57:46 -03:00
Ale Martinez
2ada830c5b Fix generated distance for lap swims
Fixes #3567
2020-08-14 12:29:47 -03:00
Mark Liversedge
80ba487153 Fix SEGV configChanged after athlete closed
.. 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.
2020-08-14 13:43:41 +01:00
Mark Liversedge
9bb1f3434d Fixup RideCache Load in Thread
.. 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.
2020-08-14 10:25:21 +01:00
Alejandro Martinez
64e83121ca Computrainer Button tidy up (#3538)
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
2020-08-13 21:29:42 -03:00
Ale Martinez
97da9f9539 Increase precision to 3 digits on RideEditor XData
Fixes #3568
2020-08-13 20:10:05 -03:00
Alejandro Martinez
c52d260949 Generalize Body/Hrv Measures and add Nutrition data as example (#3564)
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
2020-08-11 21:02:19 -03:00
Ale Martinez
9a2d71dc5d Avoid rounding when computing speed and cadence on Lap Swims
Fixes #3563
2020-08-11 19:11:03 -03:00
Mark Liversedge
1d9f570ed8 Introduce a Global Context
.. 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.
2020-08-11 22:16:13 +01:00
Alejandro Martinez
6bc48200e7 Windows builds log to goldencheetah.log when not debugging (#3485)
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]
2020-08-10 21:21:34 -03:00
Ale Martinez
c886158c16 Honor default locale on RideEditor copy/cut
paste and paste special are already doing this via strtod
Fixes #2552
2020-08-10 11:29:02 -03:00
Ale Martinez
c49180460d Avoid multiple ConfigDialog creation and close on exit
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
2020-08-09 15:38:08 -03:00
Ale Martinez
7c90abf675 Fix percentage calculation in Overview Zones histograms
It was restricted to the first 4 zones, likely a copy/paste error.
Fixes #3559
2020-08-08 20:28:20 -03:00
Ale Martinez
f0fd495a21 Remove special case for Device metadata tag query
Keeping exception for isset/set/unset
Fixes #3428
2020-08-07 16:00:05 -03:00
Ale Martinez
3f9892d130 Change lap swim import from FIT files
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
2020-08-04 13:56:32 -03:00
Mark Liversedge
8150d5b7ce Protect against closing first athlete opened
.. 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]
2020-08-04 07:47:22 +01:00
Mark Liversedge
edec952b86 Athlete View 2 of 3
.. 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.
2020-08-03 20:09:47 +01:00
Mark Liversedge
7d9337fb23 Theme Tweaks
.. 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.
2020-08-03 20:09:47 +01:00
Ale Martinez
7e3f141124 Don't crash when Python chart APIs are called without a Chart
Just do nothing and return false.
Fixes #3554
2020-08-03 12:59:42 -03:00
Ale Martinez
750f7fb258 Fix missing return in previous commit
5a27239e01
2020-08-02 12:14:02 -03:00
Ale Martinez
08632206c3 Update Preferences Appearance screen capture for the wiki
[skip ci]
2020-07-31 14:52:00 -03:00
Ale Martinez
51eb9e6c96 Remove climb detection logging to climb.log
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]
2020-07-30 14:26:03 -03:00
Ale Martinez
7189c6d759 Remove config(SCV) from formulas - CV is sport dependent now
Just like CP et.al.
Also removed unused D' and SD'
Fixes #3551
2020-07-30 14:04:30 -03:00
Ale Martinez
5a27239e01 Add Garmin Varia Radar and Light
Fixes #3549
2020-07-30 13:30:12 -03:00
Ale Martinez
9a62573087 Change Body&HRV date entry format to match the list
For consistency, lets use the same format in the form,
it can be changed at translation time.
2020-07-30 12:44:56 -03:00
Mark Liversedge
e2c6f2ea28 Fix Sort order in TopN on Overview for Pace type metrics
.. use isLowerBetter() for sorting.

Fixes #3552
2020-07-30 16:10:52 +01:00
Mark Liversedge
7a4be49492 RideCache load performance improvement
.. 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.
2020-07-30 15:44:02 +01:00
Mark Liversedge
11092bf436 Athlete View 1 of 3
.. 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).
2020-07-29 21:38:38 +01:00
Mark Liversedge
c52a861a9a User Chart refresh on filter changes
.. quite a few of the standard signals are ignored. this one fixes
   up refresh when the home filters are changed.
2020-07-29 21:38:38 +01:00
Mark Liversedge
f01ed7c77c Add BikeScore user doc
BikeScore documentation, as referenced from the FAQ
2020-07-29 12:13:22 +01:00
Ale Martinez
fa1e1d00ae Change FixLapSwim DP to preserve all previous data
Not just HR, also fixed sync issues when there are gaps in recording.
2020-07-23 16:59:13 -03:00
Ale Martinez
1dde50f6e5 Change LTMPopup Click-thru to use the new navigation model
For consistency with new charts.
2020-07-22 19:13:05 -03:00
Ale Martinez
5d18b810a7 Fix incorrect debug message in Video Layout Parser 2020-07-20 15:13:25 -03:00
Mark Liversedge
947393914f Generic Chart Click-thru 2a of 2b
.. 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.
2020-07-17 17:59:53 +01:00
Mark Liversedge
3bf2f13764 Generic Chart Click-thru 1 of 2
.. 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.
2020-07-17 13:37:06 +01:00
Alejandro Martinez
1f8bafb334 Text Cues on TrainBottom display pane (#3544)
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 #1118
Fixes #2967
Prerequisite for #2098
2020-07-16 12:55:41 -03:00
Mark Liversedge
911b9bd966 Move BlinnSolver to Metrics
.. it doesn't belong in Core.
2020-07-16 07:33:09 +01:00
Mark Liversedge
ba5cf3ed1d Datafilter String Support - 4 of 4
.. 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]
2020-07-15 12:42:00 +01:00
Mark Liversedge
c850a532f6 Remember sidebar setting
.. 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 !
2020-07-14 22:41:38 +01:00
Mark Liversedge
b9039e7767 Generic Chart Nits
.. legends can have spaces in them (painting error) and you can now
   hover over a slide to see its value.
2020-07-14 19:57:50 +01:00
Mark Liversedge
2874bf6bfa DataFilter vectors - metadata()
.. 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.
2020-07-13 22:45:32 +01:00
Mark Liversedge
4b93632b42 User Chart Pie and Bar charts now work
.. 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.
2020-07-13 20:56:24 +01:00
Mark Liversedge
e885966195 Fix User Pie Chart Labels and Colors
.. bug not clearing labels before setting and now uses a gradient
   based upon the color selected by the user.
2020-07-13 14:43:06 +01:00
Mark Liversedge
1a5b7e1464 Datafilter String Support - 3 of 4
.. 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.
2020-07-13 13:39:42 +01:00
Mark Liversedge
c98695cd34 Datafilter String Support - 2 of 4
.. 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.
2020-07-12 17:53:42 +01:00
Mark Liversedge
f767b066df Datafilter - bool() also coerce vectors
.. was introduced to coerce an expression to boolean, but should have
   also supported vectors.
2020-07-12 09:25:26 +01:00
Mark Liversedge
169bd9c4e0 Datafilter String Support - 1 of 4
.. 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.
2020-07-12 09:13:19 +01:00
Ale Martinez
5bd48dd4f6 Change Fix Speed DP name to Fix Speed from Distance
To match the english menu option, and set kph present
when it is not, even if values have not changed.
Both were misleading to users.
2020-07-11 15:29:03 -03:00
Ale Martinez
9b2226d3ba Install Python 3.7.8 for macOS Travis-ci builds
[skip appveyor]
Homebrew has upgraded python3 to 3.8.3 and, due to how dependences
are handled, it is difficult to continue to use Homebrew Python 3.7
2020-07-10 15:06:21 -03:00
Mark Liversedge
b91c8395c0 Revert "Fit : Decode Dev Fields"
This reverts commit 2e4fa9f406.
2020-07-10 08:51:31 +01:00
Mark Liversedge
cc27d6be84 Cosmetic nits and themes
.. tidying up after some recent changes, menu colors got mucked up and
   tested on low dpi monitors etc.
2020-07-10 08:51:03 +01:00
Ale Martinez
a1d2fd8f41 Fix Travis-ci macOS builds - restore python 3.7 simlinks
[skip appveyor]
Likely removed by python 3.8 forced upgrade.
2020-07-09 16:03:53 -03:00
grauser
a33a74923b AllPlot : Show/hide interval markers
fixes #2215
2020-07-09 17:18:10 +02:00
grauser
c701c8a510 RideWithGPS : Use API version 2 2020-07-09 17:13:11 +02:00
grauser
2e4fa9f406 Fit : Decode Dev Fields 2020-07-09 17:13:11 +02:00
Ale Martinez
9a72ab4269 Fix Travis-ci macOS builds - use python3.7
[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.
2020-07-09 11:29:27 -03:00
Mark Liversedge
98ff3aaf11 Editor heading alignment fix
.. taken 10 years to fix this glitch.
2020-07-08 08:25:18 +01:00
Mark Liversedge
83b551deaf Fix SEGV on drop activity into compare pane
.. needed to check context was set before adding to deletelist.
2020-07-07 22:13:49 +01:00
Ale Martinez
af94c6f8c5 Change Python version to 3.7.8 for Travis-ci Linux builds
[skip appveyor]
Build are failing since the AppImage for 3.7.7 is no longer available.
[publish binaries]
2020-07-07 11:26:46 -03:00
Mark Liversedge
6349e53232 Fix MetricOverviewItem aggregation
.. bad bug, aggregation was lost and replaced with whatever the
   value of the last item is when aggregating metrics for a
   season.

[publish binaries]
2020-07-07 13:08:59 +01:00
Mark Liversedge
eba028475a Simplify and Finalise Dark/Light Theme
.. and also a border around overview cards, which makes the light theme
   easier on the eye.
2020-07-07 11:24:35 +01:00
Ale Martinez
e3d11c27a8 Train - Enable devices reordering via drag and drop
Fixes #3421
2020-07-06 20:00:07 -03:00
Mark Liversedge
0f73c15c0e Overview TopN select activity
.. 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.
2020-07-06 10:16:17 +01:00
Mark Liversedge
20e0b4aeca Fix SEGV navigation with forward button
.. stackpointer increment before redo and indexing into the stack
   when stackpoint is -1 in NavigationModel::forward().

.. introduced in the last commit.
2020-07-06 08:06:12 +01:00
Mark Liversedge
b313cb4f37 Overview Bubble Select Activity
.. 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.
2020-07-06 07:42:22 +01:00
Mark Liversedge
64da909243 Basic Navigation Model
.. 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
2020-07-05 16:38:30 +01:00
Ale Martinez
94c723f4a0 Fix Hr and Power Zone metrics
Sanity check was reversed so decimal part always computed to max
and becomes undervalued.
Fixes #3531
2020-07-05 11:27:40 -03:00
Ale Martinez
c16d4c4667 Fix crash when adding video without overlay widgets support
Disabled meters layout selector initialization when we don't
have overlay widgets support enabled.
Fixes #3530
2020-07-04 15:31:21 -03:00
Ale Martinez
3b2aa33c6a Run and Bike power estimators - add preconditions to description
Fixes #3528
2020-07-03 15:33:36 -03:00
Ale Martinez
e6938a38f8 Video Player - Add Reset Meters layout to default button
To allow users update video-layout.xml config file to the one
provided with the binary.
2020-07-03 15:08:49 -03:00
Mark Liversedge
5518ac98a8 Light/Dark theme settings again
.. just to ensure same aesthetic effect with tabs and overview in dark
   or light theme. last of these for a while, I promise.
2020-07-03 10:41:11 +01:00
Mark Liversedge
88e6c4cbd2 Apply theme set chrome to match
.. if a dark theme set chrome dark, if light set it light.
2020-07-03 07:03:30 +01:00
Mark Liversedge
b02a640d6e Selection Sidebar honor CCHROME config
.. 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).
2020-07-03 06:42:15 +01:00
Mark Liversedge
ec195656f7 GC Learning Curve PPT
.. upload into user doc
2020-07-02 15:33:58 +01:00
Ale Martinez
d0dba1d8a1 Reimplement isLowerBetter for User Metrics
User Metrics redefine type() so we need to use it instead of _type
Fixes #3527
2020-07-01 22:04:57 -03:00
Mark Liversedge
1599546b68 Honour RideMetric::isLowerBetter() when ranking
.. also tweaked the overview colors (sorry no separate commit).
2020-07-01 14:18:36 +01:00
Ale Martinez
709994c3e7 Add muscle mass and bone mass to Withings download
Fixes #3497
2020-06-30 19:01:50 -03:00
Ale Martinez
c2abdc2a5b Xert cloud download - spd and alt fields can have decimal part
Interpreting them as integers produces lot of zeros in those cases.
Fixes #3526
2020-06-30 14:17:45 -03:00
Stranger
cd2de5dc3d Russian translation update (#3522)
Correcting existing translations and adding new. This is the last part for the moment. The next one after the RC is released.
2020-06-28 10:26:42 -03:00
Mark Liversedge
d9df2bb76b Cosmetic nits
.. 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.
2020-06-28 09:37:36 +01:00
Mark Liversedge
8ec6d513b8 Cosmetic nits
.. toolbar searchbox match chrome colors
.. trends add chart menu had 2 entries for the user chart.
2020-06-27 16:36:20 +01:00
Mark Liversedge
0b5153a6a5 Overview better date handling
.. 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.
2020-06-27 10:40:40 +01:00
Mark Liversedge
93259ce7e0 Overview improve displaying of time based metrics
.. we added isTime() and toString() for a reason, lets exploit some of
   that when converting metrics to strings.
2020-06-27 08:52:55 +01:00
Mark Liversedge
00b498c8b7 Datafilter uniq / multiuniq name change
.. the uniq function renamed to multiuniq to align with the way
   sort / multisort work

.. makes uniq behave in the way most people would expect.
2020-06-27 07:55:55 +01:00
Mark Liversedge
2162cb1374 Fix DataFilter uniq() SEGV
.. both validate and eval code reference fparms instead of leaf->fparms
   causing a SEGV when evaluating malformed expressions.
2020-06-26 23:14:05 +01:00
Mark Liversedge
13c91cf67d Overview Bubble on Trends View
.. 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.
2020-06-26 22:39:33 +01:00
Ale Martinez
ac5ae5027b LiveMap overlay video widget - show/hide according to Location data presence
Fixes the LiveMap dissapering on pauses, we could refactor to move
this and similar ElevationMeter operations to Start event.
2020-06-26 16:05:03 -03:00
Ale Martinez
e90eaf281f Travis-ci cache Python packages to reduce build time on macOS
[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
2020-06-26 15:57:15 -03:00
Ale Martinez
5dd950c77b Revoke the blocking to upload Overview charts to CloudDB
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.
2020-06-25 11:34:59 -03:00
Mark Liversedge
9bdbf22f7c Datafilter samples() honor interval specification
.. the data filter is passed a spec to use for iterating over
   ride samples, but it was being ignored.

[publish binaries]
2020-06-24 20:36:18 +01:00
Michel Dagenais
a27065673c Allow Text meter widgets to be of same size and well aligned (#3506)
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.
2020-06-24 11:58:08 -03:00
Mark Liversedge
028e822aa4 Edit User metric warning if use sample() function
.. 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; }
2020-06-24 08:17:58 +01:00
Ale Martinez
fdf6d4e862 Python XDataSeries - Don't use RideFileCommand when readOnly
It is unnecessary and too slow
Fixes #3445
2020-06-23 21:16:28 -03:00
Alejandro Martinez
0e3766a504 Add EPM - Ergo Planet Movie format import (#3520)
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.
2020-06-23 17:11:02 -03:00
Ale Martinez
3bfcfa57aa Implement RideMetric value and toString with 2 parameters for Pace metrics
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
2020-06-23 15:51:57 -03:00
Stranger
4d205bd742 Update Russian translation (#3519) 2020-06-22 16:47:02 -03:00
ericchristoffersen
8956f60826 VirtualPowerTable: sort remove empty rows (#3517) 2020-06-22 15:17:32 -03:00
Ale Martinez
0e1bec38aa Enable GoldenCheetah JSON files as Workouts and VideoSync
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
2020-06-22 14:41:31 -03:00
ericchristoffersen
225cf0c9d5 Base code for additional ride and video types (#3469)
Related to #3376
2020-06-22 14:35:43 -03:00
Mark Liversedge
ad4d06faa8 MetricOverviewItem show Personal Bests
.. 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.
2020-06-22 13:56:45 +01:00
Ale Martinez
5eafea682b Fix untranslatable strings
Fixes #3513
2020-06-21 18:59:40 -03:00
ericchristoffersen
c3145c5f04 Make BicycleSim setting page translatable (#3518) 2020-06-21 18:35:58 -03:00
Mark Liversedge
0dc5fc2f6f Donut hover less jarring
.. big font for label feels jarring, made smaller and less vibrant
   color choice.
2020-06-21 09:17:30 +01:00
Peter
984d28abf0 LiveMap V0.1 - Tracking position
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.
2020-06-20 20:55:16 -03:00
Michel Dagenais
05e89e5c34 Add control to Video Player to select among several Meter Widget layouts (#3515)
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.
2020-06-20 14:41:19 -03:00
ericchristoffersen
32884b1c6a Support Custom Virtual Power Curve (#3410)
* 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.
2020-06-20 18:28:53 +01:00
Mark Liversedge
e1086afc50 Donut hover label
.. display the slice label when hoverring as it can sometimes be
   obscured or truncated, depending upon the layout/size of tile.
2020-06-20 17:57:26 +01:00
Mark Liversedge
21c07be749 Overview donut hover
.. show percentage for slice when hoverring.
2020-06-20 15:53:33 +01:00
Mark Liversedge
59f736bb50 Default Overview error
.. meta field is 'Workout Code' not 'Workout_Code', mildly confusing
   that user names don't have spaces whilst internal names do.
2020-06-20 15:13:27 +01:00
Mark Liversedge
a81c97c09b Donut highlight largest slice
.. explode and different colour.
2020-06-20 11:07:01 +01:00
Mark Liversedge
c72a14a023 Donut Overview Tile
.. 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 (!)
2020-06-20 10:28:47 +01:00
Stranger
903861bae9 Update Russian translation (#3516) 2020-06-19 18:26:41 -03:00
Mark Liversedge
dff682fd88 Overview Trend Filter Nits
.. 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).
2020-06-19 21:08:40 +01:00
Mark Liversedge
6637a45929 Missing Utils::jsonunprotect()
.. when parsing overview config.
2020-06-19 16:01:25 +01:00
Mark Liversedge
837a7c6154 Overview Trends View Filtering
.. overview items now have a filter that is applied

.. additionally the usual filters on the trends view are honored.
2020-06-19 15:46:37 +01:00
Ale Martinez
e32e233d5f Add Favero Assioma Duo and several Garmin sensor ids
Fixes #3503
2020-06-18 12:34:48 -03:00
Mark Liversedge
b66f65e129 Cosmetic SideSelector, Sidebar and Chartbar heights
.. all need to line up, so they aren't different by a matter of a
   small number of pixels as that leads to a jarring experience.
2020-06-17 16:35:45 +01:00
Mark Liversedge
9dbfc10e04 Visual clue chartbar tab has a menu
.. hover shows the menu indicator as subtly as possible, but will
   indicate to user there is a menu popup there as they hover.
2020-06-17 14:35:29 +01:00
Ale Martinez
3be603a9ee Ignore additional sports in tha same session
Also removed the old logic for mulstisport sessions, now replaced
by sessionSplit.
Add Garmin Fenix 6 models
Fixes #3507
2020-06-16 20:47:01 -03:00
Mark Liversedge
e4ad4ab1a3 Cosmetic nits
.. a faint baseline for sparkline in overview to provide context
   especially for plotting seasons

.. chartbar tabs taller and font centered.
2020-06-16 16:31:07 +01:00
Mark Liversedge
bf76bac59d Overview Trend Cosmetics
.. fill under a cumulative curve to indicate its not just the metric
.. truncate date ranges to today where it extends to the future
2020-06-15 17:55:44 +01:00
Mark Liversedge
c3463860d5 KPI Overview Item Show/Hide progressbar on config change
.. borked logic fixed up.
2020-06-15 17:18:07 +01:00
Ale Martinez
2034b8754a AppVeyor - Fix Version on Tag builds
[skip ci]
Version is not set for Tag builds due to a script error,
lets fix it for the next dev build.
2020-06-14 18:30:36 -03:00
Ale Martinez
1c4c83af5e FitRideFile - Don't try to split when we don't have a RideFile
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
Mark Liversedge
5c84f7f789 VERSION 3.6 DEVELOPMENT JUNE 2020
.. update build id prior to tag.

[publish binaries]
2020-06-14 18:56:18 +01:00
Mark Liversedge
dbecc005b5 Overview Chart on Trends view
.. updated the overview chart to support trend view and summarise
   a season or date range.

.. scope now meaningful in the item registry.

.. added a new TopNOverviewItem to view a ranked list of activities
   by metric.

.. updated sparkline to plot variable range (>30days)

.. sort and multisort datafilter functions adjusted as caused a
   SEGV during testing (sorry not in separate commit).
2020-06-14 17:48:17 +01:00
Ale Martinez
04b4d945fa FitRideFile - Don't call splitSessions without rideFile
To avoid crashes and since there is nothing to do.
2020-06-13 10:53:35 -03:00
Ale Martinez
74f3a213ac Don't try to split FIT files with errors
Fixes #3479
2020-06-12 19:17:39 -03:00
Ale Martinez
f3af493aba Enable Qt 5.15.0 for macOS Travis-ci builds
[skip appveyor]
Also upgrade Python to 3.7.7
2020-06-12 14:38:17 -03:00
Ale Martinez
f6bcccb04c Require Qt >= 5.13 to build v3.6
No need for conditional compilation for previous versions.
Added message at build time to avoid confusion.
2020-06-12 14:29:50 -03:00
Ale Martinez
c1727623a8 Recognize Polar S625x srd files
Add 2 test files from S625X
Fixes #3489
2020-06-12 13:07:37 -03:00
Ale Martinez
757a01e876 Add Garmin MTB Dynamics to FitRideFile
Grit and Flow - Fixes #3488
2020-06-12 11:34:06 -03:00
Michel Dagenais
20d8836708 Add user notification for bluetooth devices and services connected 2020-06-11 19:56:03 -03:00
Michel Dagenais
775765b853 Insure computation accuracy for speed and cadence
Some accuracy was lost in an integer divison for speed and cadence in
getCadence and getWheelRPM, the expression was correct but non obvious
in setWheelRPM, and the speed was not reset upon disconnection for
CyclingPower while this service is used for power and speed when present.
2020-06-11 19:56:03 -03:00
Michel Dagenais
3982267e29 Add support for the Wahoo Kirck (Core) through BlueTooth LE
All the commands to set the different parameters (weight, wheel size,
gradient or load, wind speed...) are added to BT40Device and
BT40Controller. A separate pull request will add support to actually
take advantage of these parameters, like the cyclist weight, now
available in this and other devices like the Fortius.
2020-06-11 19:56:03 -03:00
Ale Martinez
fc4b8f7cbc Update minimum Qt version to build v3.6
[skip ci]
2020-06-11 17:27:04 -03:00
Ale Martinez
7274268f47 Suppress deprecation warnings - will be fixed with Qwt 6.2 2020-06-11 15:10:41 -03:00
Ale Martinez
e1f9005cf5 Fix Qwt incompatibilities with Qt 5.15.0 2020-06-11 12:54:29 -03:00
Ale Martinez
16e00fde90 macOS Travis-ci builds - fallback Qt and Python versions
[skip appveyor]
Fallback to previous Qt and Python versions available on Homebrew
to until we can compile Qwt with Qt 5.15
Python comes back to 3.7.5 since the upgrade to 3.7.7 triggers a Qt upgrade.
Qt comes back to 5.13.2
2020-06-11 00:23:12 -03:00
Michel Dagenais
2418d3b95b Convert size from pixels to points for use in setPointSize (#3452)
Currently, size is computed from the QWidget geometry height in pixels and then used to set the font size in points. In many cases the result is not that bad because, depending on the screen size and resolution, the pizel size is not that far from one point. We now convert from pixels to inch (DPI) and then from inches to points (72 points/inch). This solves the problem of the text being clipped sometimes or the margin being too large.
2020-06-10 22:24:53 +01:00
Mark Liversedge
df2d436a02 User, R and Python Chart fill curves
.. add ability to plot filled curves.
2020-06-10 19:59:21 +01:00
Ale Martinez
20c975e7df Don't call locationAt/gradientAt in Erg mode
Since they reset the brackets, defeating their use by wattsAt and
forcing all searches start from the beggining, and generating
problems with ErgTimeRemaining, which depends on rightPoint.
This problems was introduced by 1402f6ad6a
Fixes #3491
2020-06-10 14:24:04 -03:00
Ale Martinez
7d8c27fd54 Initialize mode when parsing Erg2 workout files
Otherwise they can inherit the wrong mode from previous workout
2020-06-10 11:53:10 -03:00
Ale Martinez
b0a8c6edfa Add units to Load source for overlay widgets 2020-06-10 11:43:29 -03:00
Mark Liversedge
6163ece7d6 KPIOverviewItem painting nit
.. setData() was adjusting visibility of the progressbar and should not
   have been. Now calls itemGeometryChanged() to manage that correctly.
2020-06-10 09:54:40 +01:00
Mark Liversedge
66fb3b2bde Overview nits
Some nits from recent Overview updates:
* compiler error using 'and' instead of '&&', gcc happy, msvc not.
* kpi overview item default set to CP estimate
* add chart wizard formatting of final page.
2020-06-09 21:17:33 +01:00
Ale Martinez
14e6fd5393 Add VideoOverlays capture for the wiki
[skip ci]
2020-06-09 16:01:00 -03:00
Mark Liversedge
47d79bd872 KPI overview item
.. uses  a datafilter program to calculate a kpi and displayed alongside
   a progressbar that shows how the value is progressing to a goal.

.. its really useful to compute across estimates, mmp etc without having
   to write a custom metric

.. one simple example is to show CP estimates and progress towards
   a target CP or 5 minute best, or perhaps weight.

   A program to display the internally generated CP estimate using
   the Morton 3 parameter model would be:

   { round(estimate(cp3,cp)); }
2020-06-09 19:45:44 +01:00
Mark Liversedge
6e8bad3d19 Fix Overview Zone settings
.. data loss by updating during initialisation of config widget.
2020-06-09 08:50:00 +01:00
Ale Martinez
1ec634f043 Replace modal dialog with emit setNotification in Computrainer Controller
The "Cannot Connect to Computrainer" now shows in TrainBottom notification
area unobtrusively. Fixes #2439
2020-06-08 20:03:13 -03:00
Mark Liversedge
2b54f68d50 Overview Config Part 2 of 2
.. allow edit and remove of existing items on the overview.

.. due to the way widgets are managed by layouts we create the
   configuration widgets on demand and they will be deleted
   once the dialogs close.

.. this is fine for overview, but will require a significant
   level of refactoring once we start adding charts such as
   allplot, trends etc to be added to a chartspace.

[publish binaries]
2020-06-08 21:17:19 +01:00
Mark Liversedge
410aaf6a93 Overview Config Part 1 of 2
.. 'Add Tile' added to the overview menu - to enable users to
   choose and configure tiles to add to the dashboard.

.. ChartSpaceItems should now be registered to a new chart
   space item registry, which will eventually replace the
   current window registry

.. ChartSpaceItems need to register a method to create new
   items with default settings and provide a widget for
   configuring themselves.

.. A new config widget has been created to cover the
   overview tiles and some gui components for selecting
   metrics, metadata fields and ride series have also
   been added.

.. In part 2 we need to add the ability to configure
   existing tiles and also remove them.
2020-06-08 17:13:55 +01:00
Ale Martinez
60600948be Add Tacx NEO 2 Smart
Fixes #3484
2020-06-08 11:34:10 -03:00
Ale Martinez
3450f577d3 Add Garmin HRM-Dual
Fixes #3483
2020-06-08 11:31:54 -03:00
ericchristoffersen
d55cd20639 Elevation Widget: Lazy Init Polygon to Avoid 2x Route Point Iteration (#3477) 2020-06-07 12:55:24 -03:00
Mark Liversedge
56ecb3e538 Add Overview with default config
.. still have a problem with chartspaces that have zero items that we
   will need to address, but this at least means when we add an overview
   it isn't blank.

Fixes #3476
2020-06-06 11:05:34 +01:00
Alejandro Martinez
365848b79e On Windows attach to parent's console when no console is available
This gives a more Unix-like behavior when GC is launched from
cmd or PowerShell, including --debug output, on release builds.
Fixed #3481
[skip travis]
[publish binaries]
2020-06-05 17:59:33 -03:00
Mark Liversedge
125a92514c Fix ChartBar Remove Chart SEGV
.. context menu action and processing in event loop deletes the widgets
   whilst events are being processed for it. So in event processing we
   now return immediately after triggering context menus.
2020-06-05 10:05:33 +01:00
Ale Martinez
0881250542 AppVeyor - Change python._pth encoding
utf8 generates a BOM which Python doesn't like
lib/site-packages is included in path by include site
[skip travis]
2020-06-04 15:57:41 -03:00
Mark Liversedge
0286583d4b Fix UserChart series de-dedup when editing
.. when editing a series the de-dup check included the series we are
   in the process of editing- which of course led to it always detecting
   a duplicate.

.. we now exclude the series being edited from being checked as a dupe.
2020-06-04 08:11:19 +01:00
Mark Liversedge
7cc6733df1 Fix userchart duplicate series name SEGV
.. duplicate series names cause all sorts of problems with the
   internal maps and lookups and must not be allowed.

.. if the user creates/edits to create a duplicate series name
   we append '_n' (where n is any number from 1 upwards) to
   guarantee we never habe duplicates.
2020-06-03 21:47:45 +01:00
Mark Liversedge
4447f8bffd Fix SearchBox size regression
.. commit 28b2428 introduced a regression whereby the searchbox will
   expand to fill space which was jarring in chart settings.

.. this commit reinstates a fixed height, but slightly larger to
   remain compatible with the mainwindow toolbar.
2020-06-03 21:16:33 +01:00
Mark Liversedge
ddcd2825a2 LTM and CP chart menu override
.. from now charts that add custom actions will need to also add the
   action to pull up the chart settings - since it is assumed the
   custom actions are overriding the standard approach.

.. fixes a regression from the chartbar context menu on tabs commit
   where it is not possible to edit the setting for a trends or a
   critical power chart.
2020-06-03 20:45:20 +01:00
Ale Martinez
f24ee9be8a Reduce mimimum height of Python Fix Edit dialog
To fit in high-dpi laptops displays without too small font
2020-06-03 15:22:16 -03:00
Ale Martinez
5194d09ec3 BT40Device - Fix Ignoring the CSC service for device xxx message
The "Ignoring the CSC service for device..." was intended to notify when power
sensor is present the CSC service is ignored since it is redundant and may
cause problems, but it is misleading when there is no CSC or Power service.
Reported in #3471
2020-06-03 13:54:40 -03:00
Ale Martinez
bc13092cd2 Python Fixes - Clear context before to execute the script
Fixes #3459
2020-06-03 13:37:38 -03:00
Ale Martinez
15b491409a Fix AppVeyor deploy to S3
[skip ci]
It was uploading to S3 on every push to master.
2020-06-02 18:55:02 -03:00
Ale Martinez
92f3a237be Trim Python Home setting
If it contains blanks deployed Python detection fails,
lets make this a little more idiot-proof.
2020-06-02 18:44:07 -03:00
Mark Liversedge
a6ed25c7e4 Overview refactors cosmetic nits
.. spacing and margins got doubled and tripled up in layouts and
   some other related minor fixups.
2020-06-02 21:57:59 +01:00
Mark Liversedge
45a628b4b9 ChartBar context menu in Tab
.. instead of the 'More...' button in the top left of a chart when in
   tabbed mode we now have a menu button when you hover over a tab.

.. the menu button activates the chart menu for now, till we refactor
   to using a chart space.

.. the 'More...' menu is still available when in tiled mode (we need to
   decide what to do there).
2020-06-02 20:41:28 +01:00
Michel Dagenais
b6ee709520 Fix incorrect speed (halved) on BT40 (#3456)
Unlike for the cadence value which uses 1/1024 second units, the wheel
revolution value is based on 1/2048 second units [1]. It is easy to
notice the problem when you ride downhill at 25 kph instead of 50kph! In
addition, the speed was initially incorrect because the previous wheel
position value was stale. This would sometimes give the speed of a
rocket for the initial interval and make a jump on the distance of
several km.

[1] Cycling Power Service, Bluetooth Service Specification, Date 2016-05-03, Revision CPS_v1.1, Prepared By Sports and Fitness Working Group, head of page 15.

https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=412770,
2020-06-02 10:35:46 -03:00
Adrien Guinet
77bbca0a16 ErgFile: fix distance precision issues (#3435)
When parsing a "distance slope wind" type, a truncate to integers was done
after computation to meters. This involved rounding issues that were
accumulated, and were quite visible when such a file was used to synchronized
with an RLV video (the slope changes happened "too early").
2020-06-01 20:53:53 -03:00
Adrien Guinet
6ca1bd9a9c BT40: add support for Tacx's ANT over BLE (#3430)
This is based on https://github.com/abellono/tacx-ios-bluetooth-example/
This has only been tested so far with a Tacx Flow Smart T2240.
2020-06-01 20:51:01 -03:00
ericchristoffersen
93ff6c36b4 FixGPS - Dont Stomp Slope (#3468)
Rely on invalidate.
Fixes #3466
2020-06-01 11:57:20 -03:00
Ale Martinez
6a3734971d Add information about GSL as a mandatory dependency
[skip ci]
2020-05-31 19:35:47 -03:00
Mark Liversedge
f8f43eed4c Fir set RPE from Overview Regression
.. updating the RPE value via the RPE widget on the overview was lost in
   the last commit, this fix reinstates it.
2020-05-31 18:55:36 +01:00
Mark Liversedge
8a1842a9ba Refactor OverviewWindow for ChartSpace
.. the OverviewWindow class has been refactored to extract out the
   core dashboard UX/UI into a new class ChartSpace.

.. additionally, a ChartSpace contains a set of ChartSpaceItem which
   need to be subclassed by the developer.

.. for the Overview a set of OverwiewItem classes have been introduced
   such as RPEOverviewItem, MetricOverviewItem and so on. These are
   subclasses of the ChartSpaceItem.

.. The overview window implementation is now mostly configuration and
   assembly of a dashboard using OverviewItems and the ChartSpace.

.. This refactor is to enable the ChartSpace to be used as a drop in
   replacement for the existing TabView.

.. There are no functional enhancements in this commit, but the
   overview chart shouls appear to be unchanged by the user.
2020-05-31 18:16:53 +01:00
Ale Martinez
2d3eed0a98 Cleanup non-optional Defines from CI config
Removed redundant config and fixed GSL for windows instructions
Remove some compiler warnings to reduce log size
2020-05-30 18:13:20 -03:00
Ale Martinez
df160a10a1 Strava Download - Prevent laps overlapping and fix Lap Swim distance
Switching from start_index to start_date_local fixes #3457
Since Duration is End-Start+1, End is decremented to match elapsed_time.
fixLapSwims don't rely on Smart Recording being enabled and,
since km is distance at the end of the sample, a correction is added.
2020-05-30 16:55:25 -03:00
Mark Liversedge
a8473441ae GNU Scientific Library (GSL) Mandatory Dependency
.. making GSL mandatory, so we can rely on the modelling functions
   being available, amongst a few other things.

[publish binaries]
2020-05-29 15:51:58 +01:00
Ale Martinez
f18b5470ec Create Overlay Widgets with Qt::Tool flag on Linux
Michael Dagenais found this change makes the widgets to play nicer with
Windows Managers and avoids them to get on top of other programs windows.
Minimize and Restore is automatically handled now, so this commit partially
reverts b89019264e, removing MainWindow
state changes tracking, but keeping VideoWindow position tracking.
2020-05-27 18:04:41 -03:00
Alejandro Martinez
f51a6a6cb1 Remove Conditional Compilation for Qt < 5.9 (#3464)
This is a clean up to remove conditional compilation for all Qt versions
older than the last known to work: Qt 5.9 with Qt WebEngine and Qt Charts.
Includes an update note to INSTALL documents.
2020-05-27 09:26:25 -03:00
Mark Liversedge
cc6fa1d02a Refresh RideFileCache before Metrics
.. since user metrics may reference the ridefile cache as part
   of the formula e.g. bests(POWER, 1200)
2020-05-26 19:54:30 +01:00
Michel Dagenais
0352e19e34 Clip the Meter Widgets to the visible portion of the Video Window (#3462)
When the video widget is scrolled, the MeterWidget windows appeared on
top of the Main Window user interface. Now the visible portion of the
Video Window is tracked and used as a clipping region. This avoids
blocking the controls on bottom toolbar.
2020-05-26 14:56:11 -03:00
Mark Liversedge
4f64b88f0f Datafilter vectors - rank()
.. rank(ascend|descend, list) - returns the ranking of each element
   of list in order specified. Ranking will range from 1 to n.
2020-05-26 10:40:35 +01:00
ericchristoffersen
4348a6279c Issue 3373: FixGps to run on altitude alone. (#3374)
Fixes #3373
2020-05-25 19:03:26 -03:00
Eric Christoffersen
d52fb5a68f Fixes for interpolation and gpx file load
Interpolation math fixes: Slope and interpolation behave correctly when
ride point location doesnt change.
In gpx read: do not open same file twice with different read flags.
2020-05-25 13:34:27 -03:00
Ale Martinez
c179419feb Recognise Peter Kanatselis and Michel Dagenais
By contributions to Train View code
2020-05-25 12:45:46 -03:00
Michel Dagenais
b89019264e MeterWidgets must move / hide when main window is moved / minimized (#3458)
When the main window is minimized on Linux, the MeterWidgets stay on the desktop.
A signal were added to the main window for state changes.
The VideoWindow connects to that signal and hide/shows the MeterWidgets accordingly.

Currently, when you move the main window, the MeterWidgets do not follow
and become out of place. 
On every Telemetry update, check if the real position on screen of the
video window has changed in order to update the position of the meter
widgets. The Video Window can move for several reasons like when
scrolled or when the Main Window is moved. The Meter Widgets are not
clipped like the Video Window by its scroll area parent though.
2020-05-25 12:44:54 -03:00
ericchristoffersen
922ebf987b Teach elevation widget to honor skipping (#3443)
Elevation widget was showing progress based on distance, which is workout distance and didn't accout for distance change due to skip forward/skip back.

Add routedistance to realtimedata so elevation widget can access it
elevation using routedistance to show progress
Fix uninit iterator in elevation widget paint
Draw route distance in elevation widget
2020-05-25 11:16:54 -03:00
Mark Liversedge
ca5504e486 DataFilter tests() - no submaximal
.. the recent update to tests() to retreive the bests found did not
   ignore submaximal points.
2020-05-25 12:21:01 +01:00
Mark Liversedge
369ffd2040 DataFilter vectors - estimates()
.. estimates(model, cp|ftp|w'|pmax|x|date) - returns a vector of values
   for the model selected.

   As with the estimate() function, passing a duration value 'x' will
   return the PD model estimate for that duration.

.. also removed hard coded model names.
2020-05-25 11:29:37 +01:00
Mark Liversedge
f4fcc93693 Deprecate WebKit Support
.. The NOWEBKIT define is no longer required to build.
   We now only support building with Chromium QWebEngine
2020-05-25 09:00:36 +01:00
Michel Dagenais
e8b1f69d63 Meter widget on linux (#3454)
Enable Meter Widgets overlaid on Video Window for Linux

Meter Widgets, with a transparent background over the video window, use
little screen estate while providing all the needed information. They
were added for WIN32 first but actually work fine on Linux with minor
flag adjustments.
2020-05-22 17:07:42 -03:00
Mark Liversedge
6c31805981 DataFilter vector tests() update
.. tests(user|bests, duration|power) - with no parameters will just
   return the number of tests in a ride/date range, or with 2 parameters
   will retrieve user defined or bests found by algorithm the last
   parameter defines if duration (secs) or power (watts) values are
   returned.
2020-05-21 19:35:17 +01:00
Ale Martinez
f2d93cc2dc Travis - Cache Homebrew downloaded bottles to speedup macOS builds
[skip appveyor]
2020-05-20 21:49:11 -03:00
Ale Martinez
5a0b022188 Travis - Enable cache for D2XX folder
[skip appveyor]
To avoid download and copy on each build
2020-05-20 21:04:35 -03:00
Ale Martinez
1cb1beb09c Enable GC_VIDEO_VLC option for macOS
After this change:
QtMacVideoWindow.h is used only for native macOS video options:
    GC_VIDEO_AV (incomplete)
    GC_VIDEO_QUICKTIME (obsolete)
Otherwise standard VideoWindow.h is included with the same options for
the three supported OS:
    GC_VIDEO_NONE: placeholder for no video, currently used for macOS builds
    GC_VIDEO_VLC: basic video control plus videosync, macOS experimental
    GC_VIDEO_QT5: basic video control only, macOS experimental
Overlay Widgets only works on Windows with VLC.
Tested with VLC 3.0.8 on the 3 Operating Systems.
2020-05-20 18:39:50 -03:00
Mark Liversedge
47e67f4d37 DataFilter vectors - resample()
.. resample(old, new, yvector) - returns yvector resampled from old
   sample rate to new sample rate. Assumes yvector has already been
   interpolated or smoothed as needed (see the interpolate function)

   For example, resampling to 10s power samples in a user chart:
   {
    finalise {
        t <- samples(SECS);
        xx <- seq(head(t,1),tail(t,1),10);
        yy <- resample(RECINTSECS, 10, samples(POWER));
    }

    x { xx; }
    y { yy; }
   }
2020-05-20 14:46:57 +01:00
Mark Liversedge
5772f6fd2f DataFilter vectors - interpolate()
.. interpolate(linear|cubic|akima|steffen, x,y, xvalues) - returns a
   vector of yvalues for each element in xvalues where the points
   in x,y are interpolated using the selected algorithm passed
   in the first parameter. e.g:

   xx <- samples(SECS);
   yy <- samples(POWER);

   first <- head(xx,1);
   last <- tail(xx,1);
   zxx <- seq(first, last, 0.1); # 10ths of a second
   zyy <- interpolate(cubic, xx, yy, zxx);
2020-05-19 18:34:38 +01:00
Ale Martinez
d4a5eaa501 Add Python 3.7 to Windows Installer and Linux AppImage
For Windows we use Python embeddable distribution
For Linux the relocatable Python AppImage
Packages included: sip, numpy, pandas, scipy, lmfit and plotly
[publish binaries]
2020-05-17 20:54:10 -03:00
Mark Liversedge
881e517b1a DataFilter vectors - random()
.. random(n) returns a vector of n random numbers between 0 and 1.
2020-05-17 18:51:43 +01:00
Mark Liversedge
21415379af DataFilter vector - samples(WBAL|WBALSECS)
.. added WBAL and WBALSECS as options for the samples() function to
   retreive the w'bal value (in joules) and the secs too.

.. seconds are potentially different to the samples(SECS) values as
   the w'bal series is always in 1s samples with gaps in recording
   accounted for as part of the calculation.
2020-05-16 20:08:35 +01:00
Ale Martinez
89b74816f6 Travis - Add core modules to Python distribution on macOS
[skip appveyor]
Initially: sip, numpy, pandas, scipy, lmfit and plotly
Deployed Python added to search path
Binaries reference the Python library on Cellar
Related to 2c0ce8f5c5
2020-05-16 14:09:03 -03:00
Mark Liversedge
f3e9ba3573 Datafilter vectors - rev()
.. rev(vector) - returns the vector with the sequence reversed.
2020-05-15 16:51:28 +01:00
Alejandro Martinez
2b68037c72 Enable build using vlc 3 on Windows with MSVC
On Linux no changes are required
In both cases the dynamic libraries seem to be binary compatibles
2020-05-14 19:42:29 -03:00
Ale Martinez
71a81e7f01 Add sha256 hash for CI binaries to GCversionXXX.txt
[publish binaries]
2020-05-14 11:12:13 -03:00
Mark Liversedge
f261a76b9e Datafilter vectors - bin()
.. bin(data, bins) - returns a vector of the data binned into bins, any
   data less than the first bin will be discarded, and data greater than
   the last bin will be included in the last bin.

   the returned bin is based upon counts, so will need to be scaled
   if want duration in seconds.

   e.g:

   b <- bins(data, quantiles(data, c(0,0.25,5,0.75,1))) * RECINTSECS;
2020-05-14 12:45:11 +01:00
Ale Martinez
a94500f1c3 Add GCversionXXX.txt to CI builds results
Where XXX identify the OS, to give build context.
GoldenCheetah --version output plus the last commit.
[publish binaries]
2020-05-13 18:19:45 -03:00
Ale Martinez
2c0ce8f5c5 macOS Travis-ci build - change library path in Python interpreter
Adds SIP 4.19.8
2020-05-13 13:13:43 -03:00
Mark Liversedge
4b4d86f413 Datafilter bug fixes
.. annotate - didn't validate parameters - seemingly inocuous but there
   are multiple validators that update leaf->seriesType. When this did
   not happen a) syntax errors were ignored (and caused a crash) and
   b) functions like samples(POWER) returned the wrong data.

.. annotate - assumed parameters were numeric or string but did not
   support vectors.

.. lots of use of 'it' as a variable, overriding the scope of the
   DataFilter::eval() function parameter which in a couple of cases
   led to SEGV ('it' is used when indexing vectors).
2020-05-13 14:53:25 +01:00
Mark Liversedge
670698fdef Datafilter - quantile()
.. quantile(vector, quantiles) - returns quantile values for the vector
   passed. quantiles can be a single value, or vector of values. The
   quantile is expressed as a value between 0 and 1, where 0.5 would
   represent the median. Values outside this range are truncated to
   0 or 1.
2020-05-11 19:39:07 +01:00
Mark Liversedge
73f11db578 Datafilter - daterange() closure
.. daterange(from, to, expression) - executes the expression setting the
   selected daterange as from-to.

.. any expression that honours the trend view date selection will use
   the from-to dates provided.

.. for example, to get weight data for a specific daterange:

   measures <- daterange("2020/01/01", "2020/05/01",
                          measures("Body", "WeightKg"));
2020-05-10 20:14:26 +01:00
Mark Liversedge
021ecda647 DataFilter - meanmax() set date range
.. meanmax(SERIES [, start, stop]) - now allows the user to provide a
   date range for the meanmax data to collect. This is so you can, for
   example, plot a 'last 90 days' curve:

   {
      finalise {
         yy <- meanmax(POWER, Date-90, Date);
         xx <- seq(1, length(yy), 1);
      }

      x { xx; }
      y { yy; }
   }
2020-05-10 16:47:59 +01:00
Mark Liversedge
44475a03fb Datafilter - meanmax() computer
.. meanmax(xvector, yvector) - returns a mean-maximal curve in 1s
   intervals from the x,y pair passed in.

   the data will be truncated where xvector and yvector are different
   lengths, negative y values are set to 0 and the entire dataset
   will be interpolated where there are gaps (i.e. the data is not
   presented in 1s intervals).
2020-05-10 15:57:57 +01:00
Mark Liversedge
7ee6ef43c1 Datafilter - bests()
.. the vectorized version of best() - returns a vector of either dates
   or peak values for given duration, usage:

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

   bests(date [, start [, stop]]) - get the dates of the peak values
   but no duration needed but can still proved an optional date range.
2020-05-10 09:51:29 +01:00
Ale Martinez
caaae923ad Travis-ci builds - Add max-time to transfer.sh upload
To avoid the build being marked errored when the upload takes
too much time.
2020-05-09 20:07:37 -03:00
Ale Martinez
8627f26b2c Fix RideSummary Estimates
Use the the model name introduced in ed33157945
2020-05-09 19:53:22 -03:00
Mark Liversedge
f415dc38b0 Datafilter fix sum for [ selection ]
.. when you use a selection for a vector e.g. vector[x>0] the vector
   that is returned does not set result.number to the sum. This breaks
   most of the vectorized functions.

.. for example; mean(samples(POWER)[x>0]) should compute NZAP or
   non-zero average power, but instead it calculates as 0 due to
   the selection sum bug.
2020-05-09 20:00:26 +01:00
Mark Liversedge
3f92810240 Datafilter - median() and mode()
.. vectorized like mean() and sum() etc. Do what you expect and return
   the median and mode values.
2020-05-09 19:01:19 +01:00
Alejandro Martinez
fc00d28873 Update issue template
[skip ci]
Fixed reference to contributing guidelines
2020-05-09 13:39:02 -03:00
Mark Liversedge
7daf2fa63e DataFilter - dist()
.. get the ridefilecach distributions, precomputed distributions of the
   main data series (but not all).

.. dist(series, data|bins) - returns vectors of the series data (count
   of points for each interval) or the bins.
2020-05-09 15:59:38 +01:00
Mark Liversedge
eec8d6616c Datafilter - nozero()
.. nozero(v1) returns a vector of indexes into v1 for non-zero values.
   Whilst it is possible to do this with sapply() this convenience
   function is faster - and the use-case crops up very often.
2020-05-09 12:38:26 +01:00
Mark Liversedge
9bd6cff3e3 Fix scatter plot hover <25 points
.. the generic plot didn't register quadtrees if it thought they didn't
   contain any nodes, but didn't take into account the fact the root
   node could contain up to 25 points.
2020-05-08 21:33:15 +01:00
Mark Liversedge
d3c04e27fa Fix metric refresh SEGV
.. last commit didn't avoid the detach() derefernce in a thread because
   it used the [] operator which is non-const, instead we should use
   QVector::at(int)
2020-05-08 20:05:31 +01:00
Mark Liversedge
fd0a5955ef Fix some metric refresh SEGV
.. A few situations that cause race conditions and crashes when metrics
   are being refreshed, found whilst testint user metrics.

   1. access to QString is not thread-safe, fixed with a const
   2. metric vector resizing is needed even if all metrics are zero
   3. entire ride interval needs to be computed, assignment in thread
      is not thread-safe and was incomplete anyway.
2020-05-08 14:31:43 +01:00
Mark Liversedge
4029c3a9aa Datafilter - match()
.. match(vector1, vector2) - returns an index of values; for each value
   in vector1 it will return the index into vector2 if there. if the
   element in vector1 is not found in vector2 no entry will be added to
   the returned index.

.. e.g:

   a <- c(4,6,9);
   b <- c(1,2,3,4,5,6,7,8,9);
   d <- match(a,b);
   # d now contains 3,5,8 since indexes start from 0
2020-05-08 12:58:30 +01:00
Ale Martinez
c1edbcb00a Add GSL to CI builds
Complements c973328779
[publish binaries]
2020-05-07 16:25:45 -03:00
Ale Martinez
fcc9660b64 Upload binaries to S3
Only for commits to master with [publish binaries] in the commit message
Older binaries are removed, we keep only the last succesful build.
2020-05-06 21:19:24 -03:00
Mark Liversedge
532b29b9d1 Datafilter vector - mlr()
.. mlr(yvector, xvector1 .. xvectorn) - perform a multiple linear
   regression and return a vector of coefficients for each x.

.. under the covers the covariance matrix and chi-squared are both
   calculated, but discarded. We should make these available to the
   user at some point.

.. requires the GNU scientific library, which will become a mandatory
   dependency at some point soon.
2020-05-06 20:20:12 +01:00
Mark Liversedge
c973328779 Introduce GNU Scientific Library (GSL) as an optional dependency
.. will become a first class dependency, but for now, whilst we
   update the build systems it is optional.

.. to enable update gcconfig.pri with
   DEFINES += GC_WANT_GSL  ## switch GSL support on
   GSL_INCLUDES =          ## the include path (no -I)
   GCL_LIBS =              ## -Lpath and -lgsl -lgslcblas -lm or others

.. see gcconfig.pri.in for examples, Linux has been tested.

.. to install this new depdendency:
   Linux: sudo apt-get install libgsl-dev
   MacOS: brew install gsl
   Windows: vcpkg install gsl
2020-05-06 18:32:16 +01:00
Ale Martinez
76d459a895 Cache qwt in Travis and AppVeyor to reduce build time
Warning: the cache needs to be invalidated for changes in qwt to take effect
2020-05-05 19:51:45 -03:00
Ale Martinez
b6eabc63d1 AppVeyor - Remove zip generation and rename installer
Since the installer is working we don't need the zip anymore
[skip travis]
2020-05-04 12:14:50 -03:00
Ale Martinez
e7aaebcd00 Revert "Add version string for non tag builds"
[skip ci]
This reverts commit 7d06cd5ad1.
2020-05-02 15:19:09 -03:00
Ale Martinez
7d06cd5ad1 Add version string for non tag builds
Used to build binaries for the release, will be reverted afterwards.
2020-05-02 15:15:50 -03:00
Ale Martinez
cc11f1fa2d AppVeyor - Add version string for Tag builds 2020-05-02 15:14:49 -03:00
Ale Martinez
4cd24bc09a Travis-CI - Upgrade to Python 3.7 2020-05-02 14:12:01 -03:00
Ale Martinez
a4dbfa69d3 AppVeyor - Upgrade to Python 3.7 and remove console 2020-05-02 14:11:35 -03:00
Mark Liversedge
d042ec591e Fix crash on --no-python
.. if there is a python chart in the view, it will crash as setWeb
   does not check to see if embedding worked, and is called via the
   property system so must always check.
2020-05-02 14:07:57 +01:00
Mark Liversedge
211b9b23cd VERSION 3.6 DEVELOPMENT MAY 2020
.. first development release for v3.6
2020-05-01 18:37:01 +01:00
Mark Liversedge
d6c16dd9de User Chart Time Axis Bug
.. due to qt-bug 62285 we need to use local time not UTC for timespec
   since qt charts converts to local time internally.

.. this fixes axes starting at 1hr instead of 0h.
2020-05-01 13:53:22 +01:00
Alejandro Martinez
e1db9c832f Fix Travis-ci builds for macOS - Add QWebEngine dependence
[skip appveyor]
QWebEngine depends on QtQmlModels and QtQml in Qt5.14.2
2020-04-30 21:35:43 -03:00
human705
05ee4f40da Add Elevation Widget to Train Video Overlays (#3411)
* 1 - Add forceSquareRatio to MeterWidget
* 2 - Adjust default colors and add background text.
* 3 - Add Elevation widget, included in default layout visible only on slope mode.
Based on the work done by Vianney Voyer
Co-authored-by: Peter <pkanatselis@gmail.com>
2020-04-30 19:26:40 -03:00
Mark Liversedge
a0add0bdc9 Security alert - Remove jquery and related
.. RideWindow is no longer required and brings in artefacts that have
   security alerts. This code should have been deprecated previously
   and was retained in error.

Fixes #3426
2020-04-30 21:43:30 +01:00
Ale Martinez
a9ddef9667 Fix Travis-ci macOS builds
[skip appveyor]
icu4c was upgraded from 64 to 66 and the dmg patch failed.
Lets make the hack a little more generic
2020-04-30 15:08:35 -03:00
Mark Liversedge
d69fa7986f User Chart Series Errors Wrapping
.. when editing a user chart series program the errors in red at the
   bottom of the dialog get truncated instead of word wrapping.
2020-04-29 20:45:40 +01:00
Ale Martinez
3ff380ce0f Travis-ci Linux builds - Update to Qt 5.14.2 2020-04-29 16:11:57 -03:00
Ale Martinez
c0bed13cfa Add vlc plugins to Linux AppImage for Travis-ci builds
This avoids the need to install vlc 2.2 and set VLC_PLUGIN_PATH
Fixes #3394
2020-04-29 15:17:26 -03:00
Mark Liversedge
794efdaf06 DataFilter - exists()
.. exists("symbol") will tell you if the symbol exsits as either a
   function or a variable.
2020-04-29 18:49:04 +01:00
Ale Martinez
5e54c994b7 AppVeyor - Build Windows 64bit installer and add to Artifacts
Installer script cleanup to remove unused dependencies
2020-04-29 11:29:49 -03:00
Erik Botö
0a1b0846ce Add VO2 and Ventilation graphs to WorkoutWidget and add settings (#3415)
* Add VO2 and Ventilation graphs to WorkoutWidget and add settings

* When running tests with VO2 measurements, it can be useful to see a
  graph of at least VO2 but also Ventilation to determine when e.g. a
  ramp test results in a plateau and can be considered done.

* Make the color of some VO2 measurements configurable.

* Add chart settings to WorkoutWindow, so that plots can be enabled or
  disabled. Also add the possiblity to do averaging.

* Use the term Ventilation instead of Respiratory Minute Volume

* Rework to not affect RideFile

Move from using SeriesType from RideFile in order to allow more series
to be added without modifying RideFile.
2020-04-29 08:03:02 +01:00
Ale Martinez
28645ff7b0 AppVeyor - Add installer script
The installer building step is disabled, but it can be executed
offline using NSIS 3.05
2020-04-28 21:03:16 -03:00
Ale Martinez
ff433dcf76 AppVeyor - Use cache to reduce build time
Avoid downloading cached files from to reduce dependence on external services
We are too close to the 1h limit to depende on variable time downloads
2020-04-28 20:46:53 -03:00
Ale Martinez
429b5de44c AppVeyor - Add ReadMe, license, and icon files
We need them to generate an installer
2020-04-28 16:04:42 -03:00
peterbrant14
0fab9b901a Fix indexing bugs in the original TTS code (#3423) 2020-04-28 17:45:21 +01:00
Mark Liversedge
2e228ef52b Increase max Crr to 0.025
.. plausible value for knobbly tyres over sand or soft woodland.
2020-04-28 08:10:15 +01:00
Erik Botö
13b80dfda6 VMPro: Add possibility to start calibration manually (#3414) 2020-04-27 15:10:34 -03:00
Erik Botö
09dea59996 Enable BT on Windows (#3401)
In recent Qt versions there's support for BLE on Windows, so remove the
check that disables it.

In Qt 5.14.2 and earlier there's a bug which causes problem if you do
certain things in the context that the signals are emitted. This is only
on Windows, and might be fixed in later versions, but use
Qt:QueuedConnection for now to avoid this.

Some more details of this can be found in Qt bugzilla:
https://bugreports.qt.io/browse/QTBUG-78488
2020-04-27 13:50:19 -03:00
Erik Botö
4ae3d47d10 AppVeyor - Don't use parallel build for QWT (#3420)
Seems like QWT sometimes fails when using parallel build, so use -j1
when building it to force non-parallel build.
2020-04-27 11:02:45 -03:00
Mark Liversedge
3aca25c681 User Chart Program Editor Size
.. just make it bigger, so easier to see the whole thing, and also
   fixed up scaling as resizing the window.
2020-04-27 14:29:24 +01:00
Erik Botö
0caa399e06 AppVeyor - Update to Qt 5.14.2 (#3419)
Update to Visual Studio 2019 image, which now has Qt 5.14.2.
2020-04-27 09:04:42 -03:00
Ale Martinez
8fe784c8d2 AppVeyor - Remove upload to transfer.sh
It is not required since artifacts are more convenient and reliable.
2020-04-26 19:00:37 -03:00
Mark Liversedge
ed33157945 Minor Datafilter fixups
.. the while loop limit of 10000 loops is too low, especially when
   looping over ride samples.

.. the pd model short names contain spaces and will never work with
   the datafilter estimates() function.
2020-04-26 21:53:50 +01:00
Ale Martinez
75c3039358 AppVeyor - Enable CloudDB for Windows CI builds
Missing from previous commit
2020-04-26 11:54:03 -03:00
Ale Martinez
d5fffcc8fa Generate AppVeyor artifact before upload
This is a required step to upload to GitHub releases.
Don't fail on transfer.sh unavailability.
2020-04-25 21:27:56 -03:00
Ale Martinez
a853ce9e9d AppVeyor - Add secrets for Windows ci builds
To enable access to online services
2020-04-25 12:58:18 -03:00
Mark Liversedge
d399d1ce4c Fix month and friends to work with vectors
.. a cut and paste error !
2020-04-25 10:47:52 +01:00
Mark Liversedge
a82e1467b5 Datafilter vectors - aggregate()
.. aggregate(vector, by, sum|mean|max|min|count) - aggregate vector v
   grouping by vector by (which will be repeated if too short) using
   the function sum .. count to perform the aggregation.

.. returns the aggregated series, modelled on the R aggregate function.
2020-04-25 09:57:33 +01:00
Ale Martinez
c6dd6a1f64 AppVeyor - Add VLC plugin folder
Also enabled Robot and console for testing and debugging purposes.
2020-04-24 22:33:54 -03:00
Mark Liversedge
adc9fc84cd DataFilter vectors - date arithmetic
.. week() & weekdate() - week converts a date to weeks since 1900/01/01
   and weekdate() converts weeks since 1900/01/01 back to the date at
   the beginning of the week.

.. month() & monthdate() - week converts a date to weeks since
   1900/01/01 and weekdate() converts weeks since 1900/01/01 back to
   the date at the beginning of the month.

.. basically useful for grouping by week and month or other forms
   of date arithmetic.
2020-04-24 20:59:27 +01:00
Ale Martinez
df268b7e6f Add vlc version to versionHTML
To help identify issues with VLC version mismatch at runtime
2020-04-24 15:47:31 -03:00
Ale Martinez
95d0e330b0 Add Python version used a build time to versionHTML
Similar to R, useful to determine which Python version is required.
2020-04-23 12:54:56 -03:00
Ale Martinez
0398bcdea3 AppVeyor - Add Python 3.6 to Windows ci builds
Using sip 4.19.8
2020-04-23 12:53:52 -03:00
Ale Martinez
0ed1ad86a7 AppVeyor - Add R integration to Windows ci builds 2020-04-22 15:23:03 -03:00
Ale Martinez
521b507b18 Import Location and Equipment metadata from fitlog files
Fixed #3406
2020-04-22 11:34:10 -03:00
Ale Martinez
ecc8c9b593 AppVeyor - Upgrade to VS 2017 and Qt 5.12
Use jom to reduce build time
Add OpenSSL 1.1.1 libraries
2020-04-21 21:17:40 -03:00
Ale Martinez
613ddbda81 Trends Summary - Add Sport column to xtrain activities 2020-04-21 21:17:40 -03:00
Mark Liversedge
2735d8969a Fix Generic chart hover
.. for line charts when one curve is shorter than another the code for
   calculating the nearest point (along x-axis) didn't account for
   negative and positive results from a quick calculation.

.. just needed a little help from our friend std::fabs()
2020-04-21 20:58:35 +01:00
Mark Liversedge
7a0ed0792b Datafilter vectors - measures()
.. measure("group", "field|date") - get the measures or dates of the
   measures.

.. enables us to work with measurements independent of activies, but
   we probably need a way of controlling interpolation so we can
   get a vector that only contains measurement points.
2020-04-21 10:49:46 +01:00
Ale Martinez
1167cdd582 Add Edge 530 id to FitRideFile
Fixes #3404
2020-04-20 17:18:28 -03:00
Ale Martinez
d8f68a93f0 Add D2XX to AppVeyor Windows ci builds
Moved all libraries to the same folder
2020-04-20 16:22:46 -03:00
Mark Liversedge
368da6d075 DataFilter vectors - cumsum()
.. cumsum(v) returns a cumulative sum of the contenst of vector v.
2020-04-20 12:10:23 +01:00
Ale Martinez
0f2dae05bb AppVeyor - Copy dependencies and Upload build result to transfer.sh
Copied gc-ci-libs.zip to GoldenCheetah/WindowsSDK after removing
deprecated dependencies (kQOAuth and QwtPlot3D) and adding vlc dlls.
Used --version command line option for minimal testing.
2020-04-19 14:56:10 -03:00
Mark Liversedge
33d5c1fe2b Cosmetic Updates
.. sorry, but the power profile colors are hardcoded (which is fine)
   but they are too dark, so fixed that up.

.. also the overview (until it is configurable) doesn't show total work
   or variability index. Which I've added as they are quite useful esp.
   work as a proxy for load and calories.
2020-04-19 14:42:36 +01:00
Mark Liversedge
b97eca37ff PeakPowerIndex, UserChartData and Overview Fixups
.. working with user charts to plot configured CP versus the trend
   in power indexes led to some new code and a few fixups:

   * new metric PeakPowerIndex is the best PowerIndex value for the
     ride based upon power mean maximal data. It is not computed for
     intervals.

   * overview chart default config shows the PeakPowerIndex instead
     of Power Model which was blank and unimplemented.

   * the overview chart was not in the window registry, it must have
     been removed by accident in a cut and paste incident

   * the 'activity' function is userchartdata was not called, the code
     was not included (it iterates over samples, but not activities)
2020-04-19 10:06:27 +01:00
Ale Martinez
29fcc6aafe Add detailed version information to --version command line option
Similar to About > Version, used to provide more information after ci builds
Also --usage is added as synonimous for --help for completeness
2020-04-18 15:32:22 -03:00
Mark Liversedge
562cde58f4 Remove call to MainWindow::searchFocusOut on MacOS Build
.. it was deprecated.
2020-04-15 07:29:09 +01:00
Ale Martinez
7e77dd552a Include first record in exported CSV files with All Data
Fixes #3396
2020-04-13 13:29:19 -03:00
Mark Liversedge
e5b756b060 Align View menu with NewSideBar
.. need to keep in sync.
2020-04-13 13:26:02 +01:00
Mark Liversedge
8c4758cc7a ChartBar drag fixup for Qt5.10 regression
.. When the widget in QScrollArea resizes the position is set to origin,
   which is a regression introduced sometime after Qt5.9.

.. If the chart bar was scrolled then dragging a tab would cause the
   buttonbar to be resized temporarily as the item is removed from one
   index and placed at another.

.. To get around this we make the buttonbar fixedWidth, which means no
   resize events or processing occurs. But it means we need to adjust
   as widgets are added and removed.

.. Fortunately an existing function 'tidy()' is available to do this for
   us, but needed to be controlled (only resize when widgets are added
   or removed).

.. If the regression is fixed this commit can be reverted, but it should
   be harmless with/without any Qt fix.
2020-04-12 22:57:34 +01:00
Mark Liversedge
856de3e1e5 ChartBar drag fixup
.. turns out the stack in homewindow and the "buttons" on the chartbar
   all need to be re-ordered to align with the tab index.

.. some poor design in here, but letting it go for now as we will be
   replacing the 'HomeWindow' widget in this release cycle anyway.
2020-04-12 21:36:41 +01:00
Mark Liversedge
c31d5c703f More accidental debug
.. this is becoming a bad habit. sorry.
2020-04-12 20:38:42 +01:00
Mark Liversedge
4b3c36464e ChartBar scroll left/right fix and animate
.. scroll left and right jumped to front/back which assumes there isn't
   more than 2 page widths of charts -- this is not always the case.

.. we now scroll a third of a screen full at a time with animation to
   give some feedback to the user as we scroll.
2020-04-12 17:01:32 +01:00
Mark Liversedge
7eeb4f9179 Remove debug output
.. errant code from debugging during development.
2020-04-12 14:10:52 +01:00
Mark Liversedge
ccc6345606 Re-arrange Tabs by dragging on the ChartBar
.. allow the users to rearrange the tabs by dragging and dropping them.
.. does not autoscroll, but could be added later for finesse.

Fixes #3395
2020-04-12 13:01:41 +01:00
Mark Liversedge
b051f30a7a Remove GcScopeBar.h include in Overlay Widget
.. breaks builds as GcScopeBar is deprecated and the include isn't
   needed anyway.
2020-04-11 21:44:16 +01:00
Mark Liversedge
c7515e040b Reinstate head toolbar color
.. Theme colors for chrome were not being applied to the main toolbar
   after the last commit. A couple of temporary hacks got left into the
   commit.
2020-04-11 21:29:57 +01:00
Mark Liversedge
587c631b82 Deprecate ScopeBar code, cleaner ChartBar
.. the chart bar used some of the code from the old scopebar widget so
   decoupled that and made it a little more modern.

.. GcScopeBar now deprecated
2020-04-11 20:56:59 +01:00
Mark Liversedge
28b242815b New Sidebar and deprecate Scope Bar
.. remove the old scope bar in favour of a more modern sidebar as we
   transition the UI to a new design.

.. the newmainwindow approach is not practical, as making 2 UX coexist
   at the same time was impossible and would lead to major issues.

.. note a number of views are on the sidebar but disabled, they will
   be added over time.
2020-04-11 15:34:22 +01:00
Ale Martinez
feacfefbf4 Fix small error in DataFilter metrics(Symbol,...)
The 2nd parameter of RideItem::getForSymbol is a boolean for metric/imperial,
passing c selects imperial units when metrics(Symbol,...) is used in LTMPlot.
2020-04-06 21:54:31 -03:00
Ale Martinez
42fa49c50f Add sport field to RideItem/RideDB as primary field
Exiting isRun/isSwim are preserved and new isRide/isXtrain added.
Use them in DataFilter to provide isRide, isRun, isSwim and isXtrain
and in RideSummary for better filtering of activities in rides, runs
swims and xtrains.
Part 1 of #3280
2020-04-06 19:13:43 -03:00
Mark Liversedge
f0315ccca5 DataFilter vectors - metrics date range
.. metrics(symbol) now supports an optional start and stop date
   range.

.. metrics(symbol|date [, start [, stop]]) - where start and stop
   are numberically days since 1900/01/01 or can be date strings
   such as "2019/12/31" for 31st December 2019.

.. this is to provide an alternative way of working with metrics
   that was previously supported with the '[[' and ']]' operators.
2020-04-05 12:42:01 +01:00
Mark Liversedge
c082ec50e9 Datafilter vectors - Date vectors
.. be consistent with dates and always work with days since
   1900/01/01. That way date arithmetic is consistent in the
   data filter.

.. the GenericChart converts data to MS since Epoch if the axis
   is a date range, in the same way it does for Time axes.
2020-04-05 10:58:58 +01:00
Mark Liversedge
39660ecc37 NewMainWindow Prototype - MacOS Native
.. basics for Mac native toolbar without title and support
   for resize and full screen etc.

.. toolbar is empty and will need cocoa elements added but
   will fix up when MS Windows native support is to the
   same level.

.. suspect only Linux will use frameless and might move to
   accepting the toolbar is present on Linux.
2020-04-04 12:05:01 +01:00
riccioclista
685c176eca QwtPlotGappedCurve: Include the last point in the plot (#2678)
Also solves the same issue is present when plotting Measures in Trends.
2020-04-01 13:06:23 -03:00
Ale Martinez
77cf334f8a Add Device Wizard - Select Device screen capture for the wiki
[skip ci]
2020-04-01 11:23:32 -03:00
Mark Liversedge
18922e1316 NewMainWindow resizing
.. frameless window so we need to do it all ourselves.
   Works ok, so time to move onto titlebar with Mac.
2020-03-31 19:54:30 +01:00
Ale Martinez
b3f35597d3 Import Notes from TCX files
Fixes #3385
2020-03-29 22:41:48 -03:00
Ale Martinez
22c2cdd5d7 TcxParser - initialize for each activity to support multisession files
Fixes #3362
2020-03-29 22:30:01 -03:00
Ale Martinez
ecd6b13a26 Initialized WorkoutWindow to the currently selected workout
Fixes #3384
2020-03-29 20:12:45 -03:00
Mark Liversedge
f3e3209f32 NewMainWindow prototype - basic toolbar
.. simple start just to resolve functions typically performed
   by the window manager. Minimise/Maximise.

.. need to resolve resize by dragging sides/corners as well as
   drag from full screen.

.. Not 100% convinced this is the right strategy (frameless
   window and managing resize/drag within the mainwindow).
2020-03-29 21:40:42 +01:00
Mark Liversedge
c9bca752cc NewMainWindow prototype - close, minimize
.. very basic, no icons. Just to be able to close
   gracefully. Need to get same level of functionality
   on windows and macOS.
2020-03-29 13:46:24 +01:00
Mark Liversedge
102b5dff15 NewMainWindow Protoyping
.. prototyping a new qmainwindow layout, will only be shown
   if you pass --newgui on the command line.

.. there will be lots of commits as this develops across
   different platforms and building blocks are put into
   place.

.. this is likely to take 2 months or more before it becomes
   something usable.

.. the --newgui is for developers only, since there will not
   be any usable functionality for quite some time.
2020-03-29 12:25:53 +01:00
Ale Martinez
eaf54b692e Cloud Service Download - linked defaults and auto data processors
Fixes #3381
2020-03-28 11:49:47 -03:00
Alejandro Martinez
3c1adf90ef Update README.md
[skip ci]
2020-03-27 13:38:45 -03:00
Alejandro Martinez
43150e7c17 CloudDB sharing of Custom Metrics (#3370)
Upload/Download are similar to Export/Import in User Metrics config dialog.
Admin interfaces are similar to CloudDB charts for both user (edit/delete)
and curator (set curated/edit/delete).
Name and Description are initialized to the corresponding items for the metric
but both can be edited to provide different/more complete information for the
CloudDB interfase.
Fixes #3361
2020-03-26 15:03:44 -03:00
Mark Liversedge
4d1ef200bf UserChart & GenericLegend config nits
.. when you change colors in preferences the user chart didn't honor
   the new plot marker color and the generic legend did not update the
   background color.
2020-03-26 17:57:59 +00:00
Mark Liversedge
afa5d01a31 Datafilter vectors - lowerbound()
.. lowerbound(v, value) - returns the index into v for the first
   element that does not evaluate to < value.

   This is a binary search modelled after std::lower_bound (and
   uses it in the implementation too)
2020-03-26 10:00:52 +00:00
Mark Liversedge
52dc384447 Fix user chart program regression introduced in last commit
.. need to refresh the user program when it is edited by the user.
   the last commit fixed a memory leak in this code but broke it.

.. should think about changing this piece of code and allowing the
   userchartdata to accept a new program to process (instead of
   it being set in the constructor).
2020-03-25 21:44:40 +00:00
Mark Liversedge
bda728696f Datafilter vectors - curve()
.. curve(series, x|y|z|d|t) - retrieve the data from another curve so
   we don't have to recompute it when working with user charts.

   if the datafilter is not on a user chart it will return 0. User
   needs to ensure the series are ordered correctly for this to work.
2020-03-25 21:12:37 +00:00
Mark Liversedge
b24869e1a8 DataFilter vectors - vectorize + - / * ^ operations
.. you can now use algebraic operators with vectors. If a vector
   is shorter it is repeated to match, e.g.

   a<-c(1,2); b<-c(1,2,3,4,5); d<- a * b;

   is calculated as;

   d<- c(1,2,1,2,1) * c(1,2,3,4,5) and will yield: 1,4,3,8,5
2020-03-25 15:22:48 +00:00
Mark Liversedge
d32152f6dc Datafilter vectors - vectorize the trig functions
.. cos() et al now support vectors, so you can do e.g.
   a<-c(0,90,180,270); b<-cos(a);

.. need to also do the binary operations * / + - ^ next.
2020-03-25 14:33:20 +00:00
Mark Liversedge
8ee52edeee Datafilter vectors - stddev() and variance()
.. both take a single parameter (a vector) and compute the standard
   deviation and variance accordingly. sigma and sigma^2.
2020-03-24 20:01:17 +00:00
Mark Liversedge
74c8fddb1a Datafilter vectors - arguniq() and uniq()
.. arguniq(list) - returns an index into unique values in the list. the
   list does not need to be sorted, the returned list index always
   refers to the first item in a list (not the later duplicates).

.. uniq(list [,list n]) - will de-dupe the first list by removing
   duplicates. All remaining lists will have the same items removed
   by index, in the same way as sort/argsort.
2020-03-24 13:45:20 +00:00
Mark Liversedge
9282bd783e Fix windows compile error
.. bool function must return a value; Bindings::addAnnotation()
2020-03-22 18:56:29 +00:00
Mark Liversedge
ce89389451 Datafilter - meanmax(efforts)
.. meanmax(efforts) - runs the filtering scheme used on the cp plot to
   filter out submaximal data; a mixture of comparison to a LR, maximal
   from same date considered as an averaging tail and use of power
   index.

.. it returns a vector of indexes into the meanmax data for power;
   so meanmax(POWER)[meanmax(efforts)] can be used, but since the
   index starts at 0, need to add 1 to get seconds.
2020-03-22 09:40:41 +00:00
Mark Liversedge
d36b39d31e Generic Plot Cosmetic
.. show x-avg on select at the top of a line chart, stops it overwriting
   the min/max values. Especially relevant when using a time/date axis
   hence limiting to a line chart where this is most common.
2020-03-21 08:34:49 +00:00
Mark Liversedge
987e79024f Fix select linear regress paint for time x-axis
.. scaling and transformation of x-value was needed before painting the
   linear regression line when using a time axis.
2020-03-20 18:39:17 +00:00
Mark Liversedge
63ebd5fc7c V3.6 Development Build Numbers
.. not neccessary to get out a build just yet, but cycling on the
   build number and version string for any development builds
   users download from travis or build themselves.
2020-03-20 10:01:41 +00:00
Mark Liversedge
3fab386fb2 PythonChart Toggle Web/Qt
Fixes #3375
2020-03-20 08:42:13 +00:00
Mark Liversedge
fc02b8a38b GenericChart Data Labels
.. allow data labels for points on the chart, added to User, R and
   Python chart addCurve() etc.

.. NOTE: opengl painting ignores this setting so should be disabled
         for data series that want labels. We do not do this
         automatically, but might consider that later.
2020-03-20 08:06:56 +00:00
Mark Liversedge
71690f32a7 Generic Chart Python Label Annotation - Part 2b of 2
.. GC.annotate(type="label", series="Power", label="CP=222") added to
   the python chart to add a label to the legend for displaying things
   like parameter estimates.

.. it does feel like annotations will need to be thought thru and likely
   result in a GenericAnnotation class. But lets cross that bridge
   when we get there.

.. Label annotations are enough to get started and are now present in
   User, R and Python charts.
2020-03-20 07:16:52 +00:00
Mark Liversedge
d3ba4b0f1e Generic Chart R Label Annotation - Part 2a of 2
.. GC.annotate(type="label", series="Power", c("cp", cp))

   Provide call for adding label annotations from R to
   match the recent update for the user chart.
2020-03-19 21:48:28 +00:00
Mark Liversedge
2a08c4c2b2 Nits from last commit
.. windows builds bork as bool function doesn't return anything

.. left in a couple of debug messages.
2020-03-19 19:43:01 +00:00
Mark Liversedge
e2e9fe63cf Generic Chart Label Annotation - Part 1 of 2
.. add annotation labels from within  a datafilter, ultimately
   gets shown alongside the legend in generic plot.

.. this only works from a user chart, so need to add an equivalent
   API to call from Python and R.
2020-03-19 17:30:52 +00:00
Mark Liversedge
917bbab173 Datafilter - bool()
.. bool(expr) - returns 0 or 1 for the expression passed. This allows a
   logical expression to be used in a formula (which is useful when
   fitting models).

   e.g a*(x>1) is invalid, whilst a*bool(x>1) is not.
2020-03-19 11:31:20 +00:00
Mark Liversedge
a4727c8a46 DataFilter - better error feedback
.. when editing programs the syntax errors were not being
   shared with the user, just a wavy red line.

.. this commit adds the errors to the two main dialogs for
   editing user metrics and user charts.

.. in addition a completer was added to the user chart
   series editor to help (it already existed on the metric
   editor).
2020-03-19 10:45:00 +00:00
Mark Liversedge
323a97fb40 DataFilter - lm()
.. lm(formula, xlist, ylist) - fits a formula to the x,y data using
   the levenberg-marquardt OLS algorithm.

   the formula is expressed as any other expression and the starting
   values must be set beforehand- this is also reinforced by the fact
   the parameters must exist before the formula is declared.

   the fit returns a vector [ success, RMSE, CV).

.. an example, to fit the morton 3p model to meanmax would be:

   # fetch mmp data
   mmp <- meanmax(POWER);
   secs <- seq(1,length(mmp),1);

   # set starting values, then fit Morton 3p to first 20 min data
   cp <- 200; W<-11000; pmax <- 1000;
   fit <- lm((W / (x - (W/(cp-pmax)))) + cp,
             head(secs,1200),
             head(mmp,1200));

.. along the way I needed to refactor the way lmfit is managed and
   also corrected banister to avoid threading issues.

.. also snuck in a sqrt() function as needed for testing and was
   rather an egregious oversight.
2020-03-18 21:06:24 +00:00
Mark Liversedge
d7603b7fa6 GenericPlot fixup hover/hide with decorations
.. when adding symbols to lines or lines to a scatter we
   need to show/hide the decoration with the main series.

.. in addition if the decoration is the only thing visible
   e.g. symbols for line (with no line style) then still
   need to show the hover on the symbols.
2020-03-17 19:28:21 +00:00
Mark Liversedge
95eca909c1 Lines can have symbols, scatters can have lines
.. honour both the symbol and line style settigns for curves. This
   means you can have a series on a line chart that is dots and a
   series on a scatter that is a line.

.. need to think about best way to manage hover, but suspect it should
   only apply when a line chart has a series with no line but has
   symbols -- we should hover on them. Currently they are ignored.
2020-03-16 16:30:36 +00:00
Mark Liversedge
4912f3731d Fix [index] reduce/reduce warning for Datafilter.y
.. increasing the precedence for the [ ] symbols resolved the
   reduce/reduce issue introduced in commit 1231f59b1a

.. as a result the new rule added in that commit has been
   removed.

.. thanks to Ale Martinez for the correct fix.
2020-03-16 15:04:15 +00:00
Mark Liversedge
95365b647c Datafilter vectors - smooth() ewma
.. smooth(list, ewma, alpha) - smooth data using an exponentially
   weighted moving average. alpha must be between 0 and 1, if not
   0.3 is used as a fallback.
2020-03-15 21:23:59 +00:00
Mark Liversedge
0f5f44053f Datafilter vectors - smooth()
.. part of a few updates to add some smoothing algorithms to apply
   to vector data, this first one is just a simple moving average.

.. smooth(list, sma, centered|forward|backward, window) will apply
   smoothing to the list. Note that centered doesn't use multiple
   windows when the window size is even, so recommend always using
   an odd number for this parameter.

.. will add ewma and maybe some others over the next few commits.
2020-03-15 20:22:42 +00:00
Mark Liversedge
3f9774b2c2 Generic Chart Series - show on legend
.. you can now configure if a series is shown on the legend, this is
   for lines or curves that are there for illustration but do not
   need to be displayed in the legend / hovered.
2020-03-15 18:43:11 +00:00
Mark Liversedge
cc462f49a3 Datafilter - deprecate [[ ]] "vectors"
.. they are rather anachronistic. use of vectors across the datafilter
   and the metrics() function replaces them.

.. as a by-product nested indexing works without a syntax error (yes
   you could add a space, but most folks would be lost).

   e.g. a[b[1]] works as you would expect.
2020-03-15 16:56:39 +00:00
Mark Liversedge
207e20a369 User Chart Screen Shots for wiki
Wiki page for user chart needs some pics.
2020-03-15 16:10:15 +00:00
Mark Liversedge
1231f59b1a DataFilter Grammar for [index]
.. expressions like a+b*c[n] were being parsed as equivalent to
   (a+b*c)[n] instead of a+b+(c[n]).

.. to resolve this symbol[index] is declared first in the grammar
   and whilst it will introduce reduce/reduce warnings that is
   actually what we want (we declare it early to override the
   definition from expr below).

.. keener yacc wizards might have a more elegant solution for
   this one....
2020-03-15 14:16:44 +00:00
Mark Liversedge
7f81ac76a9 Datafilter vectors - lr()
.. lr(xdata,ydata) - perform a linear regression returning the results
   in a vector of 4 values [ slope, intercept, r2, see ].

.. as a by-product the slope on generic plots now show r2 and see as
   they are being calculated by GenericCalculator.
2020-03-15 11:38:30 +00:00
Mark Liversedge
48fbdbd542 Generic Plot Linear Regress with Time Axis
.. need to transform values from MS since Epoch back to seconds
   when doing the LR- since we convert when setting up the chart
   as Qt wants time based axes to use MS since Epoch (they do not
   offer any transformations for the axis).

.. this means that the slope/intercept are now calculated correctly
   on charts that use time based axes.
2020-03-15 09:08:59 +00:00
Mark Liversedge
7e0fcf32f9 Wiki screen grabs
.. some images to use on the wiki page for working with user charts.
2020-03-14 16:52:30 +00:00
Mark Liversedge
3559395c83 Fix [ expr ] when expr is a vector
.. whilst its possible to assign to a selection of elements in a
   vector e.g. v[c(3,5,7)] <- 99 to assign 99 to el 3,5 and 7
   I forgot to update the code to /return/ a vector e.g.;

   a <- v[c(3,5,7)]

   was not handled at all. This commit fixes that. It means we
   can select from a vector element-wise -or- via a logical
   expression.
2020-03-14 16:12:52 +00:00
Mark Liversedge
0125e2aadf DataFilter vectors - sapply(list, expr)
.. sapply(list, expr) - as in R sapply returns a vector of the results
   of expression applied to every element in list. Values for x and i
   are made available in the expression.
2020-03-14 15:34:30 +00:00
Mark Liversedge
cc0108d48f Datafilter vectors - selection with [ lexpr ]
.. v[ lexpr ] - returns a subset of vector v where logical expression
   lexpr returned non-zero.

   lexpr is evaluated for every element in the vector and has two
   variables to work with 'x' is the current element value and 'i'
   is the index into the vector (starting from 0).

.. additionally, positional vectors can be used in assign statements
   but we did not go so far as to allow selections to do the same in
   this commit. that might be fixed later.
2020-03-14 13:45:57 +00:00
Mark Liversedge
2b58c20cc9 DataFilter vectors - [] indexing
.. changed the indexing operators [ ] to work solely with vectors.
   so it is now possible to reference an element in a vector:

   a<-c(1,2,3,4);
   b<-a[1]

   will assign the value 2 to variable b.

.. additionally you can assign to an element of a vector, following
   on from above:

   a[0]<-99;

   will mean a how has 4 elements: [99, 2, 3, 4]

.. lastly you can use [] with an expression, so:

   c(1,2,3,4)[2]

   evaluates as value 3.
2020-03-13 19:47:27 +00:00
Mark Liversedge
ef97cc84a0 Data Filter vectors - banister()
.. banister(metric1, metric2, series) - get a vector of banister
   data where stress metric1 and performance metric2 are used and
   fetch the series which is one of nte,pte,perf,cp or date.

   E.g. to get the predicted CP curve using PowerIndex you would
   use: banister(BikeScore, Power_Index, cp)
2020-03-13 15:43:25 +00:00
Mark Liversedge
b1c9f7071b DataFilter vectors - pmc()
.. pmc(expr, series) work with PMC, generating it from an expression
   that is evaluated for every ride (as a stress metric). Returns a
   vector of the series specified e.g. pmc(BikeScore, lts)
2020-03-13 14:17:38 +00:00
Mark Liversedge
87d1af5b13 Generic Plot Time Axis support
.. support for axes that are time based, assuming the user has
   supplied in seconds starting from 0 (which is true for an
   activity).

.. since QT charts requires times to be in MS since Epoch
   and we don't know if we need to convert from seconds
   until the axis is configured the series data is updated
   just before charts are created in GenericChart.

   This means that anyone using generic plot directly will
   need to do this conversion. For this reason all integration
   across the GC codebase should be via GenericChart.

   R, Python and now User charts integrate via Generic Chart
   so this should not really be an issue.
2020-03-13 10:11:50 +00:00
Mark Liversedge
694be2d111 Generic Plot DateTime Axis support
.. when plotting on trends view the x-axis is a date based range.

.. still need to update for time based axis when looking at activities.
2020-03-12 19:26:51 +00:00
Mark Liversedge
c0869f5caf GenericPlot auto axis min/max
.. set the axis min max from the series data if not set explicitly
   by the user. Especially useful for date ranges.
2020-03-12 15:48:43 +00:00
Mark Liversedge
3461af38d5 User Chart Part 2 of 2
.. now works on trend view (in rangemode).

.. needed to add daterange to eval in datafilter to provide context
   for operations; e.g. meanmax return for activity or daterange.

.. fixed up a few bugs along the way. But now need to resolve the
   x-axis in generic plot when using dates and to auto set to some
   kind of sensible default.
2020-03-12 14:43:11 +00:00
Mark Liversedge
1e9f8ee174 UserChart user program (formula) re-design
.. the way data is prepared in a user chart has been redesigned, it now
   follows a similar pattern to the user metric program where a number
   of functions can be written and will be called at different points.

.. init { .. } can be called to initialise variables
   relevant { .. } can be called to shortcut computation
   sample { .. } is called for every ride sample
   activity { .. } is called for every activity
   finalise { .. } is called once iteration completes
   x { .. } is called to get the series x values vector
   y { .. } is called to get the series y values vector
   z { .. } is called to get the series z values vector
   d { .. } is called to get the series d values vector (dates)
   t { .. } is called to get the series t values vector (times)

.. at present z,d and t serve no real purpose but will be used to
   augment data points and be shown on the legend when hovering.
   This is a planned future development.
2020-03-12 09:49:15 +00:00
Mark Liversedge
1740fd488b Fix datafilter meanmax memory leak
.. use stack not heap for temporary ridefilecache object.
2020-03-12 06:22:33 +00:00
ericchristoffersen
5ec95681f2 Optimize splines and bikesim dvdt. (#3349)
* Optimize splines and bikesim dvdt.

* Trig identity

* Refactor to provide WattsForV.

* Optimize gps route smoothing, spline distance.
2020-03-11 22:15:20 +00:00
ericchristoffersen
0676ce1d89 Derived stats for sim bicycle config screen (#3332) 2020-03-11 22:14:55 +00:00
Erik Botö
ab2c1048d1 Fix issue with font being "white on white" in dark-mode on Mac (#3331) 2020-03-11 22:00:30 +00:00
Mark Liversedge
66d1d47b1d DataFilter vectors - meanmax()
.. meanmax(SERIES) - returns a meanmax array starting from 1s and
   length out to longest value available for the selected season.

   NOTE: the first point 0s has been removed from the array before
         being returned so you do not need to ignore it or remove
         it programmatically.
2020-03-11 20:30:03 +00:00
Mark Liversedge
96285c874c DataFilter vectors - argsort(), sort(), head(), tail()
.. for creating and syncing ordered lists.

.. argsort(ascend|descend, list) - will return a sort index in the same
   way as numpy.argsort(). It can be used to sort other lists and is in
   fact also used internally by sort.

.. sort(ascend|descend, list [,list .. listn]) - sort 1 or more vectors
   using the first vector as the set to sort, the remaining lists are
   re-ordered together with the first.

   this is useful where you may have timeseries data that is related but
   in separate vectors- you can sort them together.

.. head(list, n), tail(list, n) do as you'd expect, returning a vector
   of length n from the head or the tail. if n is greater than the size
   of the vector the maximal sized vector will be returned.
2020-03-11 16:31:18 +00:00
Mark Liversedge
85fb985d2f DataFilter vectors - metrics()
.. metrics(symbol|date) will return a vector of metrics for the current
   date range selected on trends view honoring all the filters etc.
2020-03-10 18:08:16 +00:00
Mark Liversedge
44eded59b7 DataFilter vectors - samples()
.. samples(SERIES) will return a vector of all datapoints for the
   specified series. e.g. samples(POWER) will return a vector of
   3600 elements for a 1hr ride with 1s sampling.

.. to make sure it doesn't go haywire and open all ridefiles if
   used in a datafilter or in a naive way by users, it will not
   open a ridefile, just return an empty vector.

.. this is safe to use in user metrics; e.g. for average power
   you could use value { mean(samples(POWER)); } and this would
   work well as the ride is opened before calculation starts.

.. there is an added bonus that this means a datafilter:
   length(samples(SECS)) will filter only those rides that are
   open. A useful debug tool for memory usage from download or
   ride import activity.
2020-03-10 16:56:42 +00:00
Mark Liversedge
4ab6bd9809 DataFilter vector - mid()
.. mid(v,pos,count) no equivalent in R but returns a subset of another
   vector v starting from pos for length count.
2020-03-10 14:52:00 +00:00
Mark Liversedge
c0893c052a DataFilter vectors - append() and remove()
.. append(a, b [, pos]) follows the R convention for append and
   will append b to symbol a, optionally inserting from pos. it
   returns the number of elements in a rather than a copy of the
   vector (it is supposed to be quick).

.. remove(a, pos, count) has no R equivalent but does what it says
   calling the underlying QVector function, so should be quick. It
   also bounds checks (does nothing if bound invalid). Just like
   append it will also return the number of elements in a after the
   operation is completed.
2020-03-10 14:22:58 +00:00
Mark Liversedge
98e224b10b DataFilter vectors - seq, rep, length functions
.. some more functions for creating vectors and working with them

.. seq(start,stop,step) - create range vector and negative
   values are allowed e.g. seq(1000,1,-1)

.. rep(value, n) - create a vector repeating the same value
   n times.

.. length(s) - return the length of the *vector*, so if the
   parameter is a single value then the length is zero. this
   might change, but for now it seems useful. An object that
   is created and updated as a vector will return 1 if it
   only contains one element.
2020-03-10 10:50:53 +00:00
Mark Liversedge
70bef43ccd DataFilter vectors - c() function
.. added the c() function, same syntax as the R function it simply
   creates a vector comprised of the parameters passed.

.. if one of the parameters evaluates to a string it will try and
   convert to a number. We only support vectors of doubles for
   simplicity and ease of implementation.
2020-03-10 09:34:20 +00:00
Mark Liversedge
495dff77ca Generic Chart Slope Paint
.. full for scatter, in selection rect for line. Seems a compromise
   between providing useful context on a scatter and avoiding lots of
   noise on a line chart.
2020-03-09 21:03:56 +00:00
Mark Liversedge
35a37ff846 Add QT Charts to R Chart
.. mostly complete, following the Python charts lead on the
   API and basic UX.

.. some nits left in there; pie/bar chart categories and labels
   and an open question on whether/how we let users set the axis
   color / leave it alone.
2020-03-09 19:40:17 +00:00
Mark Liversedge
9e7f843d43 Generic Plot log axes
.. add log axes support.
2020-03-09 11:06:54 +00:00
Mark Liversedge
b17c337979 Generic Plot Slope Fixups
.. paint for whole chart so can compare to data outside of the
   selection area (which is probably the most useful thing to
   do with the slop line).

.. fixup the paint co-ords which assumed x-axis started at 0.
2020-03-09 09:54:33 +00:00
Mark Liversedge
40983afa7b User Chart Opacity Setting
.. was missed in original commit.
2020-03-09 09:05:48 +00:00
Mark Liversedge
b8a6fd40e3 Fix generic plot missing top label on axis
.. when working out the hover area. this is because the first label
   is sometimes aligned above the plot area. so we look a little higher.
2020-03-09 08:35:11 +00:00
Mark Liversedge
67801f4ce7 Export Chart Dont Use Native Dialog
.. a regression from Qt5.12, native dialogs hang if threads are
   in use (!). Not doubt will be fixed, but for now lets avoid
   it -- need to revisit this before releasing since the Qt
   dialog is horrible. Will add to github issues.
2020-03-09 08:04:06 +00:00
Mark Liversedge
4fd07e7688 Fix User Chart Axis Hover bug
.. turns out the jsonunprotect function wasn't stripping the trailing
   spaces that jsonprotect was adding. This caused axis labels to have
   spaces at the end that the qt charts code stripped-- so when we went
   looking for axis label texts they didn't match.

.. this commit causes jsonunprotect to strip trailing spaces. This
   should not result in any regression as use of jsonunprotect is
   limited to HomeWindow properties.
2020-03-08 21:49:17 +00:00
Mark Liversedge
20b00ea33b User Chart Nits
.. x-axis label colors

.. y-axis alignment should not be managed upstream

.. still have issue finding hover area which is not
   present in the python chart.
2020-03-08 20:45:57 +00:00
Ale Martinez
a7debe567b Change Python and R season meanmax to honor left sidebar filters
Fixes #3369
2020-03-08 16:10:54 -03:00
Mark Liversedge
0f1224bb35 User Chart (Part 1 of 2)
.. basic user chart only on analysis view. Users can specify
   a data filter script to prepare data for the x and y axes.
   It uses the generic chart to visualise so one step closer
   to a UX where all charts have the same behaviour.

.. will need to update to place on trends view, including
   updating the way userdata works and possibly adding a
   few new functions to support working with models and mmp
   data amongst a few other things.

.. likely contains quite a few nits as most of the code
   is related to configuration and is a bit thorny.
2020-03-08 16:29:42 +00:00
Ale Martinez
d913e75402 REST API - use default metadata.xml when the file does not exist
Fixes #3368
2020-03-07 20:49:40 -03:00
Ale Martinez
95c1d822a7 Use thread-safe setUrlRequestInterceptor in WebPageWindow
When Qt version >= 5.13
Fixes #3365
2020-03-03 19:35:01 -03:00
Mark Liversedge
10ae17868d Fix jarring update GenericChart with multiple plots
.. setUpdatesEnabled() to stop output did not help at
   all with respect to the jarring effet of watching
   plots added when in stack mode.

.. for some reason adding this QApplication::processEvents()
   fixes that. Go figure.
2020-03-03 19:38:51 +00:00
Ale Martinez
c0b057a48d Strava - Upload Manual Activities
Use Create Activity in Strava API when there is no samples
Fixes #3363
Also map some known sports to the Strava API equivalents,
we should think about a generalization as part of #3280
2020-03-03 11:15:10 -03:00
Mark Liversedge
876ce83c96 Add QChart to Python Chart (4c of 5)
Fixup stack view a) minimum height for plots, b) added a
scroll area to manage more plots than fit on the screen
and will layout horizontally or vertically.
2020-03-02 20:11:56 +00:00
Mark Liversedge
85cbbc3840 Add QChart to Python Chart (4b of 5)
Stack charts now when set as an option, in which case all
data series are given their own plot.

Or alternatively, where data series have different x-axis
names, they get a plot for each x-axis.

Need to fixup a) minimum height as can get squashed and
b) scroll area needed as well as c) layout direction.
2020-03-02 18:59:07 +00:00
Mark Liversedge
ce955e01a5 Add QChart to Python Chart (4a of 5)
.. added GenericChart which manages a collection of plots, so
   you can plot multiple series stacked (like in AllPlot).

.. additionally added option to set layout vertical or
   horizontal, since its useful to layout scatter plots
   horizontally where time series will be largely vertical.

.. at this point the code is slightly refactored to add
   GenericChart between PythonChart and GenericPlots.

.. will shortly add code to support managing multiple plots
   in layouts and adapting if settings change (.e.g the
   python script is edited, settings are changed).
2020-03-02 10:39:58 +00:00
Mark Liversedge
e83c9e8bb3 GenericPlot legend placement and line styles
.. updated to support different linestyles and also legend can
   now be placed above, below, left or right of the chart and
   orientated to list series vertically or horizontally.

.. the vertical legend is a bit ugly as nothing lines up, will
   fix up separately.
2020-03-01 17:37:07 +00:00
Mark Liversedge
6ce905509f Add QChart to Python Chart (3i of 5)
Isolate curves by hovering on axis for scatter and line
charts. Also added horizontal guide line and click to
add horizontal annotations (but not added yet).

Annotations will come later, but added as was the right
part of the code.

Also tidied up a bit of the paint code in selection tool
since it was a bit messy.
2020-03-01 10:03:47 +00:00
Mark Liversedge
ec24536f65 Blank texts break axes login in GenericPlot
.. for some reason in earlier version of Qt Charts there are errant
   items in the same area as the axes that are blank, these break
   the code that derives the axes rectangles in Qt Charts <= 5.10
2020-02-29 16:47:50 +00:00
Mark Liversedge
c81576e311 Fix axis paint of cursor values in GenericPlot
.. now we have the axis rectangle (previous commit) we can paint
   the cursor values in the axis rather than on the canvas. Lots
   of work to fix a cosmetic issue, but damn, it was worth it.
2020-02-29 14:01:23 +00:00
Mark Liversedge
73be187b15 QAbstractAxis get rect
.. amongst a few other nits when a plot is resized or the chart is
   being finalised we get the scene rectangle for each of the axes.

   This is so we can trap when the mouse hovers over an axis and
   also so we can paint the current mouse coordinates on the y-axis
   in the scatter plot (they are painted on the canvas at present
   and paint over each other causing a nasty artefact).

   Will fixup y-value cursor tracking shortly.
2020-02-29 11:50:06 +00:00
Mark Liversedge
85bdb48ab7 GenericPlot selector hover highlight
.. to indicate the selection area can be grabbed and moved. Just
   a minor UX tweak to help signpost interactive elements.
2020-02-28 20:26:33 +00:00
Mark Liversedge
40195ab0ce Fixup GenericPlot legend hover for pie and bar charts
.. the legend is mostly static for pie and bar charts
   but should be shown nonetheless.
2020-02-28 18:56:21 +00:00
Mark Liversedge
0ecfa0e67e Add QChart to Python Chart (3h of 5)
Use legend to select which series are plotted by clicking to
show hide a series. Hover just shows a hover background and
does not temporarily isolate the series, this may be something
to consider for later.

Applies to scatter and line charts.
2020-02-28 14:31:50 +00:00
Mark Liversedge
21d1e071bf Ignore '.' folders in ChooseCyclistDialog
.. mostly because this is good practice but also to avoid showing
   the .pyfixes folder.
2020-02-28 09:14:34 +00:00
Mark Liversedge
f4d954c3ee Initialise Calc member variables
.. rather egregiously did not set any to zero etc and expected
   cummulative ops to just work. they didn't.
2020-02-28 09:13:31 +00:00
ericchristoffersen
426c28b961 Remove CRS_LOC. (#3352) 2020-02-27 15:58:37 +00:00
ericchristoffersen
da3e8212cf Allow TTS Files for VideoSync. (#3354)
Rewrite TTSReader Stream Merge

Add gpi reset.
2020-02-27 15:56:42 +00:00
Mark Liversedge
cee6f0329a GenericPlot refactor source files
.. created separate source files for the legend and selection tool
   classes and removed some of the interdependency.

.. partly because GenericPlot.h and GenericPlot.cpp were becoming
   unwieldy and partly to support using the generic legend in
   other charts (notably CP, LTM and AllPlot).
2020-02-24 20:20:57 +00:00
Mark Liversedge
37ebd06564 Generic Plot tidy up state transitions
.. fix a few nits when moving between states for the selection tool
   and updating the display.
2020-02-24 19:00:00 +00:00
Mark Liversedge
5ad1f1624d Fix GenericPlot performance when select active
The scene was being updated unneccessarily when it was active but
not changing (i.e. selection rectangle was stationary etc).

Added a state variable rectchanged to the selection tool to notify
the updateScene() method that nothing has changed since the last
event. So do nothing.
2020-02-24 17:48:57 +00:00
Mark Liversedge
bbc0a1f0ea Add QChart to Python Chart (3g of 5)
Added selection on line chart, uses a range selector and
works in pretty much the same way as the scatter rectangle
selector.

I've removed a lot of the calculated values from the plot
since it gets very busy very quickly.

I also noticed there is a significant performance problem
when selections are active- suspect there are a large
number of unneccessary scene updates. Will investigate.
2020-02-24 17:16:25 +00:00
Mark Liversedge
0da3142f6b Fix line chart legend when series missing
.. when no value present was miscalculating the nearest point to the
   cursor on the x-axis because distance was calculated as a large
   negative by using a series point value of 0 (when no value was
   available). Fixed by just ignoring zero values.
2020-02-24 11:49:46 +00:00
Mark Liversedge
16a5cb0c6f X-Axis in Generic Plot Legend
.. to show the current x-axis value, missed off when concentrating
   on showing y-axis values for the data series.
2020-02-24 11:08:09 +00:00
Mark Liversedge
ad3024ac7f Add QChart to Python Chart (3f of 5)
Added hover code to line chart, so get legend values on hover
and marker points as you mouse over the series and an x-axis
label at the bottom to show current x value.

Also added Utils::removeDP() to remove decimal places from a
number string e.g. 24.000 becomes 24, 987.3440500 becomes
987.34405. This is a hack to avoid handling decimal places
in the user settings, but will keep as reduces the amount
of "digital ink" regardless.
2020-02-24 09:22:48 +00:00
Ale Martinez
0035530f29 Add some validations to User Metrics creation and modification
Enable accept only when boty symbol and name are non empty
Warn on name and symbol collisions to avoid silently discarded
metrics or metrics not usable from formulas
Complements 635eccd001, related to #2279
2020-02-22 21:15:06 -03:00
Mark Liversedge
03acacbd7d Some minor Generic Plot fixups
.. recent fix to check for points on the boundary (checking with >=
   and <= instead of > and <) mean't that items on the boundary
   would be inserted into multiple quadrants. This wasn't much of
   and issue as only using quadtree for mouse hover, but it is a
   bug none the less and needed fixing.

.. compile time warning nits also tidied up for new code, to stop
   errors spewing on build and hiding real issues.
2020-02-22 06:16:48 +00:00
Ale Martinez
635eccd001 Add custom metrics export and import to .gmetric files
The .gmetric file it is the same xml format as usermetrics.xml
with just one metric, on import only the first is imported.
Import is similar to Add with the imported settings prefilled,
so the user can change it before to effectively add it or cancel.
Fixes #2279
TODO: we should check for duplicate symbols on Add/Edit/Import
2020-02-21 19:07:47 -03:00
Ale Martinez
6659262ae2 Fix Travis-ci build matrix configuration
There were errors and warnings in config due to format issues
and deprecated keywords.
2020-02-21 17:54:11 -03:00
Mark Liversedge
78e74ddaa9 Add QChart to Python Chart (3e of 5)
Added new legend which displays hover over value from the
prior commit. Also fixed up the quadtree issue with some
points being hard to hover.

Need to consider what to do with multiple x-axes; am tempted
to create a new chart for each x-axis since hover and general
interaction gets very messy with multiple x-axes.

Next commit will extend the current functionality onto line
charts before we move onto hover for pie and bar charts.
2020-02-21 20:00:43 +00:00
Ale Martinez
78b94c9d8f Upgrade travis-ci builds to Qt 5.14.1 2020-02-20 11:29:45 -03:00
flo
fae2b935e1 Support Multisport fit files
GoldenCheetah lacks support for splitting multisport fit files.
These files combine multiple sports recorded into a single
activity. Those sports are marked by session entries. These
session entries are parsed but ignored.

Fit files are parsed on-the-fly without caching data. This is
great in terms of memory useage but bad in terms of splitting
the activity into sessions because of the fit specification.
The specification allows session entries to appear either
grouped at the beginning of the file or at the end of the session
spread throughout the file.

We do cache the most relevant data entries along with the
session field entries. This hopefully adds as little overhead
as possible while parsing and in memory useage, but allows
us to determine if there are multiple session entries in one
file. If so, we can split the single file into multiple ones,
each representing a single sport (activity). Eg.: If a triathlon
is recorded using the multisport method it is split up into
the following activities:

 - Swim
 - Transition
 - Bike
 - Transition
 - Run

This corrects the metric calculation. Prior to this change
the parsed activity is tagged as a run activity and the whole
data - swim/bike HR, bike cadence, ... - was taken into account
for the run metrics calculation. Now only the relevant part of
the file is taken into account.

Laps as well as XData records are also split up to the files
created out of a single multisport file and are aligned in time.

It turned out that it is best to treat transitions as run.

Fixes: #3211
2020-02-19 17:45:53 -03:00
flo
5ecc2470aa Allow deep copies of XDataSeries
Doing shallow copies of Objects when explicitly declaring a copy c-tor
is very dangerous.
When the object is cloned, the second to be destroyed crashes w/ double
freeing memory or/and, even worse, dangling pointers are left around.
That in turn leads to unpredictable crashes.

There's only one thing left to say, use smart pointers wherever
possible. Or simply do not use arrays of pointers. The vector class
already get it right to alloc/free memory for objects stored in it.
2020-02-19 17:45:53 -03:00
Mark Liversedge
0495cb786d Add QChart to Python Chart (3d of 5)
Hover now wired into the SelectionTool with scatter points
being highlighted as you move the mouse. The code to select
nearest neighbours looks correct, but in practice it can
be hard to select some points (this needs further investigation).

Highlighting the selected point is done in the paint method
of the selection tool (its just one dot), but zorder issues
with opengl accelerated series means it appears underneath
we may need to create a curve with one point to avoid this
(this also needs further investigation).

Need to work next on a legend widget of our own to manage
the hover display and axis interaction (and better aesthetics
than the standard offerings).
2020-02-19 09:02:58 +00:00
Ramon van Belzen
706b79f8fc travis-ci: force cpp detection 2020-02-18 12:25:51 -03:00
Ale Martinez
022d403f97 Quadtree Compile nits
Even when it is passing ci they give problems on my local build
2020-02-18 12:22:00 -03:00
Mark Liversedge
fe05d635e6 Generic Plot Selection Tool and OpenGL
When curves are painted via openGL there are a number of limitations
regarding aesthetics, setColor() doesn't work once the series is
created, opacity is ignored etc.

So when we create a selection from an openGL enabled curve we cannot
set it gray etc. Instead, this commit will set the selection curve
to gray and use opengl rendering on the selection (on the assumption
that the user specified opengl rendering for performance and so we
should reflect that in the selection curve).

This has a dramatic improvement in performance on a scatter plot of
activity data where there are 1000s and 10000s of points in some
cases.

We should recommend that opengl is enabled for curves that have large
number of points, and indeed, the default is to enable it unless the
user specifically overrides (e.g. for better aesthetics).
2020-02-18 09:53:10 +00:00
Mark Liversedge
902c18078e Fix misleading comment 2020-02-18 09:12:00 +00:00
Mark Liversedge
6fb3baae95 Add QChart to Python Chart (3c of 5)
Added Quadtree for identifying points on the plot when
hovering with mouse, but should also be reused for the
rect selection tool (it currently iterates over all points
for a series).

This commit just adds basic algorithm will need to follow
up with a) refactor it into the selection tool and
b) display the hover value somewhere (legend?)
2020-02-18 07:59:15 +00:00
Ale Martinez
6d3811f981 Add default name and extension to Export Chart Image
Name defaults to chart Title, similar to Export Chart
Extension defaults to .png bug .svg is also supported for high definition
printing.
2020-02-17 16:24:06 -03:00
Ale Martinez
279919a747 Add default .erg extension to Workout Editor Save As
When a valid extension is not included by the user
Fixes #3342
2020-02-17 16:15:04 -03:00
Ale Martinez
2efe686c14 Changed QStringList to QSet<String> in FilterSet implementation
The hash near constant time vs linear search in pass method
speeds up considerably operations s.t. seasonMetrics in R and Python
APIs when there are lots of activities, since they were O(n^2) otherwise.
2020-02-17 12:55:47 -03:00
Mark Liversedge
4c9f237c20 Fix Generic Plot Flickering
.. the chart was being redrawn as series added because initialiseChart()
   was removing axes, be waiting until finaliseChart() to do this we
   avoid the flicker.
2020-02-17 11:21:39 +00:00
ericchristoffersen
d755a3a892 Trainmode must honor slope unless ergfile opts out. (#3346) 2020-02-17 08:22:17 +00:00
Mark Liversedge
226d704f1d Quieten down selection tool painting
.. My eyes! My eyes! Tuft would not be impressed with all the
   extraneous plotting and noise from the selection tool that
   detracted from the data.

   Have removed the guide lines, limited the slope line to the
   selection rectangle, and toned it down as well as making the
   selection rectangle more subtle when its not being manipulated.
2020-02-17 08:19:46 +00:00
Mark Liversedge
b60bb0e6db Settings.h missing compile error
.. needed for GenericPlot.
2020-02-16 22:45:45 +00:00
Mark Liversedge
0c3d748424 Add QChart to Python Chart (3b of 5)
SelectionTool now calculates a bunch of useful values
for the selected items (mean, min, max etc) and they
are plotted with guidelines on the scatter plot wehen
a selection is active.
2020-02-16 21:19:50 +00:00
Mark Liversedge
ab4601cc33 Add QChart to Python Chart (3a of 5)
Added a rectangle selection tool for scatter charts. Click on
the canvas and drag to highlight points of interest and click
on rectangle to drag around, resize with wheel events.

Additionally, improved some of the aesthetics on axes and labels
etc to make the chart look and feel similar to the rest of the
qwt based charts.

There are likely to be a large number of commits for part 3, to
cover auto calculation of mean/max/sum/regree for selected points
and extend to other types of selections and apply to other chart
types.
2020-02-16 13:49:23 +00:00
Mark Liversedge
70e31235ed Refactor QChart out of PythonChart into GenericPlot
.. the qchart code is now becoming more generic, with interactivity
   and generalised rendering so refactored out into its own class
   before adding too much more code.

.. this is also because we will be creating a generic chart for users
   to plot their own 'userdata' (currently in allplot/trends charts)
   using this generic plot and want to have a common widget for this
   to get a more consistent and less jarring user experience.
2020-02-15 09:32:34 +00:00
ericchristoffersen
127166a0e9 Support for TTS files. (#3333)
Support training with Tacx TTS files:

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

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

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

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

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

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

Issues and Future work:

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

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

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

Other changes:

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

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

RideFiles now record additional altitude accuracy.
2020-02-13 21:58:31 +00:00
Ale Martinez
48670ff566 Setup Duration, initial sample bracketing and metrics for erg2 files
Parsing is correct, but without this initialization they cannot be executed.
Fixes #3338
2020-02-11 20:56:34 -03:00
Mark Liversedge
1b3792d4a8 Add QChart to Python Chart (2b of 5)
Basics now in place to plot line, scatter, pie and bar
charts. This commit finishes off the final bit of part
2, adding axes control.

A new GC api, GC.setAxis(..) has been added allowing
fine grained control on the axes added automatically.

They reference axes by name, based upon the xaxis and yaxis
parameters passed to the GC.setCurve(..) function.

GC.setAxis(..) should be called /after/ the curves are
added since it will not create axes in advance.
2020-02-11 17:41:46 +00:00
Ale Martinez
3cae9815c4 Enable workout import via Drag and Drop only in Train View
Fixes a copy/pase problem preventing workout import via Drag and Drop
and allows to import GPX files as workouts or activities according to
active view.
Fixes #3337
2020-02-11 13:23:35 -03:00
Mark Liversedge
54dc089705 Add QChart to Python Chart (2a of 5)
Added Pie and Bar charts with some rudimentary axes
being created automatically.

Need to follow up with mechanism to work with axes from
within the python script, likely needs a new binding.
2020-02-10 19:19:28 +00:00
Joern
8f33ebdd3d Merge pull request #3339 from Joern-R/CDB-Picture-Size
CloudDB - Chart Upload
2020-02-10 17:33:14 +01:00
Joern
125ecbb4bb CloudDB - Chart Upload
... Limit picture size to not go beyond max. size for CloudDB datastore call
2020-02-10 16:39:55 +01:00
Mark Liversedge
d88a94fa7d Fix SEGV Python/QT change chart type
.. needs to be done via the right thread and the qmap
   should be cleared to avoid double free crash.
2020-02-10 12:44:16 +00:00
Mark Liversedge
b4eb1191fd Add QChart to Python Chart (1 of 5)
Updating the python chart to render via a Qt Chart in addition
to the existing web page rendering.

Five aspects are planned:
1. Add QT chart option, basic rendering of Line+Scatter (this commit)
2. Add legend and axes, support for Pie and Bar charts
3. Add interactivity / hover etc
4. Add options for annotations and markers
5. Add more advanced charts and chart objects

There is an example in the tests folder, but at this point the
chart is very basic, but the main plumbing is in place.
2020-02-10 11:57:42 +00:00
Erik Botö
d1e2f38e07 Add support for VO2 measurements and VO2Master VM Pro
Add support for a generic set of VO2 measurements:

* Respiratory Frequency
* Respiratory Minute Volume aka Ventilation
* Volume O2 consumed
* Volume CO2 produced
* Tidal Volume
* FeO2 (Fraction of O2 expired)
* Respiratory Exchange Rate (calculated as VCO2/VO2)

Make the new metrics usable in TrainView, and store VO2 data as XDATA
using the same pattern as for HRV data.

Add support for VM Pro by VO2Masters

The VM Pro is a BLE device, so support is added in the BT40Device class.
Since the device requires some configuration in order to be usable, such
as the size of the "User Piece" a special configuration widget is added
and shown in a separate window when the device is connected.

This window is also used to set a number of useful settings in the
device, and to show calibration progress. There's also a detailed log of
the status messages shown, and this can also be saved to file.

Allow notifications from RealtimeControllers and devices in the
notification area of Train View. In order for devices to display
information in the notification field in TrainBottom the signals need
to added and propagated from from device level via RealtimeController
to TrainSidebar and finally TrainBottom.

Fix an issue with multiple BT40Device per actual device

Currently on MacOS there will be multiple BT40Device per actual device,
since the QBluetoothDeviceDiscoveryAgent::deviceDiscovered() signal is
emitted multiple times with e.g. updated RSSI values. Avoid this by
checking the previously created devices first.

MacOS doesn't disclose the address, so QBluetoothDeviceInfo::address()
can't be used there, instead deviceUuid() is used which is instead only
valid on MacOS.
2020-02-03 12:00:08 +00:00
ericchristoffersen
67384872d0 Implement kinetic energy simulation
Implement kinetic energy simulation
BikeSim values into athlete data with ui.
Add ui for sim constants, also tooltips

Fixes #3261
2020-02-02 08:27:30 +00:00
ericchristoffersen
9018ad7a28 Use tangent vector to compute interpolated grade.
Use tangent vector to compute interpolated grade.
Implement correct bracket mapping for cubic spline
Case sensitive include file name.

#Fixes #3283
2020-02-02 08:26:21 +00:00
Mark Liversedge
46514538b5 Train view layout
.. was out of date.
2020-02-01 21:48:52 +00:00
ericchristoffersen
cf5d0d1f29 Issue 3320: FixGPS: Route Smoothing and Multipass Outlier Removal (#3321)
* FixGPS: add outlier removal

* Parameterized multipass route smoothing.

* Better defaults. Fix avgSlope calcs.

* Cleanup.
2020-02-01 17:16:24 +00:00
Mark Liversedge
8ea4524630 DPI Scale errors
.. overview window constraints on size

.. workout editor hide toolbar when small
2020-02-01 17:10:51 +00:00
Ale Martinez
2ef1f407b5 Workout Chart - Reset cadence during multiple training sessions
Copy/Paste error
Fixes #2251
2020-02-01 09:46:03 -03:00
mayerflash
a0ed8d020f Add support for Ergofit Bike (#3324) 2020-01-31 14:24:05 +00:00
Mark Liversedge
071cb35d15 Add Device Wizard Scroll Devices
.. add a scroll area when listing device types to add since there
   are so many of them these days (!)
2020-01-31 14:08:59 +00:00
Erik Botö
2c0eb835d4 Fix import of HRV from Fit files where single records occur (#3323)
* FitRideFile: handle single values in decodeHRV()
Currently only records of type ListValue are handled, but single
RR-intervals can also come as type SingleValue. Before such records
were silently ignored.
* FitRideFile: Unify indentation of decodeHRV()
The indentation before was a mix of tabs and spaces, which made the code
quite a challenge to read. This unifies to use 4 spaces at least
throughout the function.
* Added test file
Fixes #3297
2020-01-28 20:19:53 -03:00
ericchristoffersen
6e5fb42171 Add BSpline altitude smoothing to FixGPS. (#3310)
Fixes #3302
2020-01-27 10:57:39 -03:00
Poncho
40d03c4402 Add New Device IDs for FIT files (#3315)
add Garmin Edge 830
add Stages Cycling
Add test file for Garmin Edge 830 with Stages Cycling power meter
2020-01-26 18:52:13 -03:00
Alejandro Martinez
e64b6fb557 Allow Estimate Distance to run automatically without crash (#3313)
Fixes #3311
2020-01-25 19:48:58 -03:00
thebaron06
8a94666e91 Add the identification of Garmin HRM-Tri and Vector 3
Fixes #3306
2020-01-25 09:12:45 -03:00
Kamen Naydenov
1bf8f43f0a Add Garmin Instinct device ID (#3300)
Device information:
https://buy.garmin.com/en-US/US/p/621802/pn/010-02064-00#specs
2020-01-23 09:06:19 -03:00
Mark Liversedge
835f7cff92 Add Sync from Cloud for new athlete
.. when a new athlete is created and opened the blankstate page
   currently provides options to get data by importing files or
   downloading from a device.

.. this update adds the ability to configure a cloud service and
   start a sync straight away

.. this UX is introduced since cloud services are now much
   more ubiquitous and v3.5 introduced broad support for a wide
   range of services.
2020-01-20 18:50:42 +00:00
Ale Martinez
8c775e5d2f Disable Qt5 video for macOS travis-ci builds
It buils but makes Train mode to chash
2020-01-20 10:23:10 -03:00
Mark Liversedge
16fc7a192b GPL2 in about box
.. was pointing to GPL3 which we downgraded from last year.
2020-01-18 20:22:08 +00:00
Ale Martinez
432926f4b9 Revert "Travis-ci build Linux AppImage with version string for v3.5 re-issue"
[skip ci]
This reverts commit 5c47bdb633.
2020-01-17 19:21:06 -03:00
Ale Martinez
5c47bdb633 Travis-ci build Linux AppImage with version string for v3.5 re-issue
To avoid creation of a new tag
2020-01-17 18:00:44 -03:00
Mark Liversedge
e90ba2e567 3.5 BUILD INCREMENT
.. re-issue of 3.5 binaries with Strava API guideline compliance, as
   part of the 'rate limit' requirements.
2020-01-17 20:15:28 +00:00
Mark Liversedge
fca5d9eb20 Connect with Strava
.. the authorise button on the add cloud wizard now
   shows a 'Connect with Strava' icon

.. all other services continue to have a button that
   is labelled 'Authorise'

.. this is needed to comply with the Strava API application
   guidelines.
2020-01-17 16:04:27 +00:00
Mark Liversedge
2914f16e89 Compatible with Strava
.. logo added to the about box, only tested on hi-dpi display
   (may need scaling applied for lower resolution displays).
2020-01-17 14:49:16 +00:00
Mark Liversedge
878b281ffc View on Strava
.. when data is downloaded from strava we now set the metadata
   tag "StravaID" to the id of the activity on Strava.

.. On RideSummary a link is added at the bottom to view the activity
   on Strava if the "StravaID" is set.

.. if the user clicks on the link the summary is replaced with the
   strava page for the ride:
      e.g. https://www.strava.com/activities/962515512

.. this is part of a couple of updates to comply with the Strava
   guidelines for consumption of the Strava v3 API, see:
      https://developers.strava.com/guidelines/
2020-01-17 12:30:29 +00:00
rb83421
a92833f919 Python Embedding - Add flush function to class CatchOutErr
It does nothing for now
Fixes #3293
2020-01-16 15:59:53 -03:00
Alejandro Martinez
ba2213bb73 Remove ampersand from menu and button text before compare (#3298)
To avoid issues with kde injecting them, it is not pretty
but simple and safe.
Fixes #1852
Fixes #2930
2020-01-16 15:53:07 -03:00
Alejandro Martinez
2c20561caa Update ISSUE_TEMPLATE.md 2020-01-15 20:58:30 -03:00
Ale Martinez
17541b373d Revert "travis-ci - build linux AppImage with version string for v3.5 release"
This reverts commit c6691bf2d7.
[skip ci]
2020-01-13 21:24:08 -03:00
Ale Martinez
c6691bf2d7 travis-ci - build linux AppImage with version string for v3.5 release
This is a temporary hack to avoid creating a new tag
2020-01-13 17:51:39 -03:00
Mark Liversedge
151c98d8cc SEGV on Overview Chart
.. when no rides available on new user.

Fixes #3295
2020-01-13 20:21:31 +00:00
Mark Liversedge
21bf52c786 Version 3.5 release presentation
Slides used during the 'What's new in v3.5' video
2020-01-13 15:34:09 +00:00
Ale Martinez
c42f06f727 Add screen captures for the wiki - Web Chart 2020-01-13 12:20:10 -03:00
Ale Martinez
46107635c2 Add screen captures for the wiki - Cloud Accounts and sync
[skip ci]
2020-01-11 18:31:31 -03:00
Mark Liversedge
435e8e9bd5 VERSION 3.5 RELEASE
.. version and build number.
2020-01-10 16:51:47 +00:00
Mark Liversedge
9df093cff6 Overview to defaul layout 2020-01-10 16:38:42 +00:00
Ale Martinez
a35e09fd0a Withings download - disable debug
In preparation for v3.5 release
2020-01-09 20:31:43 -03:00
Ale Martinez
cd9f130b4b Add Body Measures Download screen capture for the wiki
[skip ci]
2020-01-09 20:30:58 -03:00
Alejandro Martinez
a5b9409789 Merge pull request #2837 from peterbrant14/Fix_RLV_Sync
Improve RLV Syncronization
2020-01-08 16:10:02 -03:00
peterbrant14
7cce47526f Allow for RLV files with no final speed indicator
Some older (Tacx) RLVs do not have a sync point at the end of the course.
This work-around calculates the total distance of the course and sets a final sync point
if one does not already exist.
2020-01-07 17:48:57 +00:00
peterbrant14
49bc592a56 Improve RLV video syncronization.
Revised code in VideoSyncFile::parseTacx to build syncpoint list with correct distances
	when speed varies between two points

	Revised code in VideoWindow::telemetryUpdate to interpolate position between 2 sync points.
	Also do not update video if paused or not running.

	Revised code in VideoWindow::startPlayback to set a minimal rate to start if video is
	controlled by syncfile.	This avoids the initial "rush" that otherwise happened and
	makes for a smoother start.
	Also reset distance to 0 on start.

	As the rlv length now more accurately matches the workout length, we also need a check in
	TrainSidebar::guiUpdate that will terminate the workout if the end of the video is reached.
2020-01-07 17:48:57 +00:00
peterbrant14
3f177cae9e Fix truncation of Workouts with respect to pgmf file and corresponding rlv
Add a final point to the ErgFilePoint list to terminate the last section of the ride
2020-01-07 17:48:56 +00:00
peterbrant14
721cd2646b Fix error in RLV distance calculation when using ffwd or rwd
In guiUpdate, don't add manualOffset from VideoSyncFile.cpp when updating displayWorkoutDistance
as its already been included in the km value.
2020-01-07 17:48:56 +00:00
Ale Martinez
24fad147d0 Workout Wizard - Save distance in km since header indicates METRIC
Conversion is required when imperial units are used
Also fixed cumulative distance in Gradient case
Fixes #3288
2020-01-07 13:46:12 -03:00
Joern
db2de2be1f Merge pull request #3287 from Joern-R/tp
Today'sPlan Integration
2020-01-06 14:44:29 +01:00
Ale Martinez
744f6c79d4 Fix LTMPlot behaviour when there is only one group in date range
Fixes #3281
2020-01-06 10:14:12 -03:00
Joern
3728615c09 Today'sPlan Integration
... also synchronize Swim and Run activities
2020-01-06 13:45:44 +01:00
Ale Martinez
9e16d1dbf0 Map newlines to html <br> tags on CloudDB chart descriptions
When displayed on tableWidget, newlines are already preserved
across cloudDB interactions.
Fixes #3286
2020-01-05 13:41:33 -03:00
Ale Martinez
f385831d5e Enable Qt5 video for macOS travis-ci builds
Experimental build until #2242 is implemented
2020-01-05 12:22:55 -03:00
Ale Martinez
0887acdc89 travis-ci don't remove qt5 since it is required by other software
This error prevented to upload the generated dmg
2020-01-02 19:34:55 -03:00
Ale Martinez
8d6ea4fa72 Strava Download - Map VirtualRun and VirtualRide to Run and Ride
Use SubSport to preserve the original type when Sport is mapped.
Fixes #3278
2020-01-01 15:07:40 -03:00
Ale Martinez
4b53b24669 Fix previous commit
load instead of target
2019-12-31 13:14:52 -03:00
Alejandro Martinez
9524d56966 Video Overlays - Move HRM units from code to config file
To give more flexibility to users willing to use circular meters for HRM
2019-12-31 09:36:26 -03:00
Ale Martinez
29d28c93f4 Veloclinic Chart - Refresh when CP changes in Trends View
Fixes #3277
2019-12-30 15:01:25 -03:00
Jan Dvořák
edb2340b35 Czech translation (#3276)
Translate to Czech - Part 2
2019-12-30 08:18:01 -03:00
Ale Martinez
5ee004f355 Added Python Fixes Screen Captures for the wiki
[skip ci]
2019-12-29 10:14:55 -03:00
Ale Martinez
6eea504796 Fix travis-ci macOS builds 2019-12-28 14:31:19 -03:00
ericchristoffersen
4eae552846 Fix Issue 3273: Busy Hang in FixDeriveDistance (#3275)
Fix #3273: Busy Hang in FixDeriveDistance
Init goodii to 0 so tolerate no valid points.
2019-12-28 05:17:07 -03:00
Ale Martinez
26723b2755 Add missing QMap include to PowerProfile.h
Some toolchains report an error
Fixes #3270
2019-12-23 23:46:53 -03:00
Ale Martinez
b0d3e08ef9 Update default charts to remove remaining TSS and IF references
Replaced by BikeStress and BikeIntensity
2019-12-23 10:25:18 -03:00
Ale Martinez
f0482bf00c Revert "Plot R-R from Xdata"
This code has problems when distance is used on x-axis (#2842)
and it is redundant since there is a general mechanism to plot
any XData series as User Data in Activitiy chart.
This reverts commit f095416c5c.
2019-12-20 18:00:30 -03:00
riccioclista
9f1187390f Python data processors (#2951)
* Initial implementation of Python data processors
* Add RideEditor to PyFIx script editor
* Enable write-access to activity data for python fixes
* Add GC.deleteActivitySample method
* Add GC.deleteSeries method
* Check for python fix for changes before close
* Build python fixes menu dynamically
* Make python fixes first class data processors
* Add GC.postProcess method
* Check GC_WANT_PYTHON and "Enable Python" setting for python fixes
* Add GC.createXDataSeries method
* Clean up ScriptContext ctor mess
* Support editing xdata series
* PDP: Implement xdata append/remove methods
2019-12-19 22:05:51 -03:00
Ale Martinez
a3e6ab8e09 Video Overlays - Load is target power or Slope according to mode
Similar to DialWindow
Added to sample video-layout.xml and adjust positions
2019-12-15 17:20:06 -03:00
Ale Martinez
e06c93ca0e CPPlot - Show as percentage only applies to ride curve
Fixes #3260
2019-12-15 10:26:04 -03:00
Alejandro Martinez
edb53806d8 Video Overlays - Add Distance as source
honoring metric/imperial setting.
Fixes error on Speed when imperial units are used.
Adds Distance to video-layout.xml and adjusts widget positions.
2019-12-15 00:08:49 -03:00
Ale Martinez
145d5ccae6 Fix travis-ci Linux builds
Fix libpulse-dev install and change python3.6 source
2019-12-14 23:05:57 -03:00
Ale Martinez
a2a94b3b41 Video Overlays - Speed widget honors metric/imperial setting 2019-12-14 21:13:45 -03:00
Ale Martinez
5fa59d1cf8 get Strava description
Save to Notes if Notes is not already used for name.
Complements d1e0e13ce1
2019-12-14 21:11:25 -03:00
Ale Martinez
c0889179da Remove deprecated CFBundleGetInfoString from info.plist
Fixes #2938
2019-12-11 14:34:52 -03:00
Ale Martinez
bc6ca7fee1 Added CFBundleVersion and CFBundleShortVersionString to Info.plist
Also updated values for the comming v3.5 release.
Fixes #2938
2019-12-11 12:49:04 -03:00
Quentin Heath
96b36aef0d fix am/pm time for HRV 2019-12-09 17:56:19 -03:00
ericchristoffersen
03e8da2c92 Issue 3241: Fix variance control in FixPowerSpikes (#3253)
Fixes #3241
2019-12-09 17:12:03 -03:00
Stranger
5420d92cc1 Update Russian translation (#3252) 2019-12-09 16:47:01 -03:00
Quentin Heath
d1e0e13ce1 add Strava description
direct copy from `Notes` (with UTF8 charset, as for the Strava title),
except if `Notes` was already used for the title
2019-12-09 16:15:46 -03:00
Quentin Heath
c978d6eb80 fix Strava title encoding
the website appears to expect UTF8 by default, so let's send a UTF8
title (plus an explicit header)

tokens and boundaries are supposed to be ASCII, so they can keep their
latin1 encoding
2019-12-09 16:15:46 -03:00
Jan Dvořák
5df46eebc7 Translate to Czech, part 1, 2725/5426 2019-12-08 21:17:57 -03:00
Ale Martinez
2cb9bc113e Export Chart Image as SVG
Add .svg as an alternative format for high resolution printing.
Fixes #3246
2019-12-08 20:07:06 -03:00
Ale Martinez
0009c280a8 Fix Export Chart Image in Tiled mode
Use rect instead of geometry to grab the complete widget.
Tested on Windows and Linux
Fixes #3055
2019-12-08 20:07:06 -03:00
Ale Martinez
715dc15133 Enable travis-ci tagged builds
To have binaries with version string set automatically and remove
the temporary hacks.
[skip ci]
2019-12-08 11:59:52 -03:00
Ale Martinez
657bb70d23 Define version string for travis-ci builds
To restore lupdate for OSX and to force new build with version strings
since tag builds are rejected. This will be fixed in next commit.
2019-12-08 10:16:50 -03:00
Mark Liversedge
feac0e86db VERSION 3.5 RELEASE CANDIDATE 2X
.. fix save ridecache
.. regenerate on first run to fix
2019-12-08 08:40:34 +00:00
Alejandro Martinez
c39b01279a Fix Travis-ci Linux builds
The ppa for vlc 2.2.8 is no longer available, fallback to vlc 2.2.2
2019-12-07 23:38:17 -03:00
Ale Martinez
9fec594d41 RideCach::save uses item instead of intervals to access interval metrics
This error was introduced in fa9a59d60c
Fixes #3244
2019-12-07 19:44:25 -03:00
Ale Martinez
14ee925645 travis-ci - define GC version string only for tagged builds
Commplements previous commit used to get binaries with version strings
once the tag was already set.
2019-12-06 12:10:54 -03:00
Ale Martinez
c2f3f2b8e2 Define GC version string for travis-ci builds
Next commit will do this only for tagged builds
2019-12-06 10:31:58 -03:00
Mark Liversedge
b818486aac VERSION 3.5 RELEASE CANDIDATE 2 2019-12-05 20:19:55 +00:00
Stranger
afdc860676 Add Garmin GPSMap 66 device (#3240)
GPSMap 66 can use ANT+ sensors, store in FIT format, synchronization with Garmin Connect and relevant to use with long-term activities (walk/hiking/ski).
2019-12-05 10:21:24 -03:00
Stranger
1e2ef61b89 Update Russian translation (#3238) 2019-12-05 08:21:55 -03:00
Stranger
0aa24acd3d Fix non translatable strings in code (#3239) 2019-12-05 08:21:26 -03:00
Ale Martinez
43ab7d4afc Recognize Eric Christoffersen
Very useful contributions for v3.5 release
https://github.com/GoldenCheetah/GoldenCheetah/commits?author=ericchristoffersen
2019-12-04 17:49:16 -03:00
Ale Martinez
5bd4404279 Avoid endless loop on FIT files unknown type and negative size
Includes a test file to reproduce the issue.
Fixes #3229
2019-12-03 14:45:47 -03:00
Ale Martinez
4ed6927626 Merge branch 'ericchristoffersen-StartupSpeedup'
Closes #3235
2019-12-02 19:58:11 -03:00
Eric Christoffersen
fa9a59d60c Speedup critical string handling in RideCache Save 2019-12-02 19:54:48 -03:00
Eric Christoffersen
c13b24251e Speedup RideCache Load Time
Implement regex/hash based string substitution object to perform multiple
substitutions in 2 passes. Speeds up athlete data load by 2x.
Use QStringRef to avoid copy
Fixes #3234
2019-12-02 19:54:30 -03:00
Alejandro Martinez
b3a4b4a84e Update INSTALL-LINUX
Based on recent forum questions updated Qt version for v3.5, lupdate path and libz requirements.
2019-11-29 14:26:17 -03:00
Alejandro Martinez
cc633a7802 Add support for Device symbol on filters but disable set/unset/isset (#3233)
Currently Device does not work on filters and set/unset/isset fail silently,
with this change Device can be used in filters as standard metadata and
the attempt to use in set/unset/isset reports an appropriate error.
We could enable these operations in the future but they require special casing.
2019-11-29 14:14:29 -03:00
ericchristoffersen
2b291f28b7 Issue 3230: Train mode compute altitude from slope (#3231)
Implements #3230
2019-11-27 21:49:13 -03:00
ericchristoffersen
2017d9162f 3227: Further optimize trends tracker table display (#3228)
Further speedups for trends tracking
Fixes #3227
2019-11-26 18:37:16 -03:00
Ale Martinez
6210d0a28d Fix QtWebEngineProcess deploy for travis-ci MacOS builds
This is a workaround for a bug in the homebrew version of macdeployqt
not present in Qt official binary distributions
2019-11-25 11:40:15 -03:00
Ale Martinez
fa7684a88d Fix Python deploy in MacOS travis-ci builds
Copy python framework and change path in binary
2019-11-24 17:31:33 -03:00
Ale Martinez
675cbcbe58 Add Tacx Neo Bike Trainer to ANT IDs
Contributed by Pavel Vasilyev
Fixes #3221
2019-11-24 09:21:38 -03:00
Ale Martinez
54b756b0ec Fix travis-ci MacOS builds 2019-11-24 09:21:38 -03:00
Joern
01490a64d1 Merge pull request #3226 from Joern-R/tp
Today's Plan Download
2019-11-23 20:16:16 +01:00
Joern
5db9440adb Today's Plan Download
... distance to be shown in sync. list is "double"
2019-11-23 19:28:32 +01:00
ericchristoffersen
6ca8e49a52 Fix 3222: Row append more efficient. (#3224) 2019-11-23 09:30:13 -03:00
Ale Martinez
7606697512 Added Note about qmake reporting missing translation files on first build
Similar to the one existing on INSTALL-WIN32
Fixes #3220
2019-11-22 11:54:11 -03:00
Ale Martinez
5da74f1136 Tag Multisport activities from FIT files correctly
Also remove unused Workout Code Tag
Partially fix #3211
2019-11-22 11:47:49 -03:00
Ale Martinez
45e73f7d34 Added Navicoach O-Synce sample FIT files
These uses non-interleaved mode for session records, we need to do
regression tests on these files for solutions to #3211
2019-11-21 13:05:05 -03:00
Ale Martinez
5383430b19 FitRideFile - Handle resync when HRM is unbucled
Fixes #3059
2019-11-21 09:41:34 -03:00
Ale Martinez
5cb0ed5b35 Added sample fit file for #3059 2019-11-21 09:37:13 -03:00
Henrik
43cabb2567 Swedish translation update (#3218) 2019-11-20 20:32:28 -03:00
Joern
5a4411f359 Merge pull request #3217 from Joern-R/DE
Update Translation DE
2019-11-20 15:30:25 +01:00
Joern
b4e82bb323 Update Translation DE 2019-11-20 14:43:24 +01:00
Ale Martinez
9536ed343b Enable Python for MacOS travis-ci builds
Using the Python version installed by Hombrew, currently 3.7.5
2019-11-18 20:55:32 -03:00
Ale Martinez
575a2b1c0b Fix path error on upload in previous commit 2019-11-18 13:04:24 -03:00
Ale Martinez
893f2a9b28 Upload travis-ci MacOS build results to transfer.sh
To allow user testing, similar to linux builds.
Includes some minor fixes:
-Avoid compiler warnings for deprecated declarations to reduce the log size
-Patch GoldenCheetah.dmg to include missing libicudata.64.dylib
-fix command line error in mackdeployqt -fs option
2019-11-17 23:09:29 -03:00
Ale Martinez
94eef9b6e0 Added secrets.h to Strava.cpp
Missing in bef37ea49c
The reason AppVeyor builds are failing
2019-11-16 09:06:34 -03:00
Ale Martinez
f5bcea85f0 Spanish Translation Update 2019-11-15 21:18:55 -03:00
Ale Martinez
bef37ea49c Strava OAuth Update - Handle Refresh Token
Complements ab18468a98
Fixes #3199
2019-11-15 18:27:09 -03:00
Ale Martinez
32ae63a2b5 Added Video Overlays Initialization on Windows builds with VLC
If video config file is not present copy a default one to be used as a model
by the user. An empty video-layout.xml file disables video overlays
Fixes #2525
2019-11-15 10:27:30 -03:00
Alejandro Martinez
921765f9ef Add new sources for video-layout.xml meters (#3215)
Load, Time, LapTime, LapTimeRemaining and ErgTimeRemaining
Fixes #3213
2019-11-15 09:23:24 -03:00
grauser
8e46c5d2b6 lupdated 2019-11-14 13:56:13 +01:00
grauser
91d0ac1639 FitFile : QuickFix FloatValue can be Multi-Value
I probably have to refactor this code...

fix #3059
2019-11-14 13:54:05 +01:00
Alejandro Martinez
03516fb0cd Fix double fd close on RawRideFile (#3214)
Most of the time it is harmless, until it is not.
Fixes #2325
2019-11-13 20:40:51 -03:00
Michal
bf9b42d517 Add Garmin Edge 830 screenshot for extending the HRV Wiki page (#3206) 2019-11-12 08:38:02 -03:00
Alejandro Martinez
64ad946a1c Fixed BTLE Pair page in AddDeviceWizard to avoid ANT+ dependence (#3209)
AddPairBTLE depends on the presence of an ANT+ dongle and sensors
to support ANT+ for detection, it looks like a copy paste of AddPair.
This works for Dual (ANT+/BTLE) sensors with an ANT+ dongle since
the sensors are detected, although is misleading since it seems to
imply you can pair them selectively, which is not true for current
BT40 GC implementation.
When an ANT+ dongle is not present (see #2771) or the sensors only
support BTLE (see #2983), the wizzard informs no sensor is dectected.
This is misleading since BT40device will dectect and use automatically
any Hr/Power/CSC sensor present at device startup.
This change replaces AddPairBTLE code with a simpler version matching
current BT40 support: it just informs the user the sensor types supported
indicating they will be autodetected on device startup.
Fixes #2771
Fixes #2983
2019-11-12 08:37:34 -03:00
Ale Martinez
df4e1f2fd7 Fix typo in Dutch translation
Fixes #3208
2019-11-09 11:38:49 -03:00
Ale Martinez
cc1ebdd827 Avoid duplicate time records in Train Mode
Fixes #3205
2019-11-05 21:26:45 -03:00
Ale Martinez
ab18468a98 Strava OAuth Update
According to https://developers.strava.com/docs/oauth-updates
Fixes #3199
2019-11-04 11:47:24 -03:00
Ale Martinez
5c4f72da6c Added virtual power support for Tacx Magnetic T1820
Fixes #1521
2019-10-29 22:55:59 -03:00
Ale Martinez
5cf76dd95c Added virtual power support for Elite Crono Mag Elastogel
Fixes #1538
2019-10-29 21:32:29 -03:00
Ale Martinez
a6875c583a Added virtual power support for CycleOps JetFluid Pro
Fixes #1809
2019-10-29 20:28:31 -03:00
Ale Martinez
a68cc8d179 Added virtual power support for Elite Turbo Muin 2015
Fixes #1575
2019-10-29 20:28:00 -03:00
Ale Martinez
26b5218ff3 Added virtual power support for Elite Crono Fluid Elastogel
Fixes #2720
2019-10-29 14:15:46 -03:00
Ale Martinez
a3dc4bca2d set AutoDefault to false on Curve Settings Push Buttons
To enable filter syntax checking on Enter
Partially reverts 43ed80d547
Fixes #3202
2019-10-29 11:50:55 -03:00
Ale Martinez
b236c76976 Filter bogus estimates when there is not enough data to fit the model
Just added a reasonable upper limit for CP
Fixes #3180
2019-10-28 16:32:50 -03:00
jgpallero
5a93a2c62f Update LeftRightBalance.cpp (#3189)
Add parenthesis in order to evaluate correctly the L/R balance computation
2019-10-28 14:01:09 -03:00
Ale Martinez
43ed80d547 Set Default buttons on LTM and Interval dialogs
Color is not a good option
Fixes #3202
2019-10-27 23:01:09 -03:00
Ale Martinez
5bdad6199e Fix FSF address
Fixes #2689
2019-10-26 21:55:53 -03:00
Ale Martinez
77547bfe55 Fix German translation to avoid metric name duplicates
Fixes #3187
2019-10-24 09:51:33 -03:00
Ale Martinez
beac898601 Fix units of work in tooltips for AllPlot and CPPlot
Also change wrong label in PMC (Coggan)
Fixes #3194
2019-10-21 21:56:05 -03:00
Ale Martinez
f9694775d3 MergeActivityWizard - preserve XDATA series order on join
and add the remaining ones to the end
Fixes #3183
2019-10-16 10:21:24 -03:00
Mark Liversedge
d01fdf55a7 VERSION 3.5 RC1
.. marking up for release candidate.
2019-10-14 09:53:51 +01:00
Ale Martinez
a065d480cd Make isSwim true when there are lap swim specific XData series
Similar to isRun when there are run specific standard series only when
Sport is not explicitly set.
2019-10-11 11:40:42 -03:00
Alejandro Martinez
0b0f99889e Enable import of XDATA series from CSV files (#3179)
* Enable import of XDATA series from CSV files
Since XDATA series are preserved across merges this allows to add
arbitrary XDATA series to any activity.
Sample WEATHER file is included for testing.
Sample swim file is also included, once imported set Sport=Swim and use
Fix Lap Swim with pool length=25 to rebuild standard series and laps
Fixes #2010 item 4.

* FixLapSwim - Alternative way to store pauses in XData
Some devices s.t. Moov Now generates a CSV with REST field
after each length. FixLapSwim now can use this alternative
way to express pauses and to mark end of laps.
This is intended to be used together with XDATA csv import.
A Moov Now csv file modified to comply with our format is
added as an example to test folder.
2019-10-10 23:16:22 -03:00
Ale Martinez
8b8ddccb5b Session RPE should not depend on HR Zones
Copy&Paste error, fixes #3171
2019-10-05 10:30:08 -03:00
Henrik
322a2c5265 Updated Swedish Translation (#3174) 2019-10-02 18:08:15 -03:00
Ale Martinez
eff123e0e2 Enable libusb 1.0 for travis-ci builds 2019-09-29 20:11:01 -03:00
riccioclista
c284885f8b Add libusb 1.0 support (#2919)
To fix freezes in Ubuntu and to support USB-C to USB-A dongles on MacOS
2019-09-29 20:09:09 -03:00
Ale Martinez
bb6d2552c0 Enable More menu in Overview to allow remove
Also blocke upload to cloud
These are temporary hacks until we have a proper config for Overview
2019-09-25 16:53:12 -03:00
Ale Martinez
1f4d6d1648 Fix OSX travis-ci build
libusb-compat depends on a newer libusb version that the one previously
installed giving an error.
Removing explicit libusb install fixes the issue.
2019-09-23 17:46:11 -03:00
Ale Martinez
be43cde4e1 Set min-height for Scrollbar handle in RideNavigator
When there are lots of activities the handle becomes too small to be useful,
so min-height is set to the same value as width to avoid this.
Fixes #2756
2019-09-23 14:35:43 -03:00
Ale Martinez
29db9ebde2 Add Direct navigation to year/month on Diary Calendar
Fixes #2756
2019-09-21 18:02:16 -03:00
Ale Martinez
6f50bc74e3 Garmin Fenix 5/6 new firmware uses enhanced speed and altitud fields
This maps them to correspoding standard fields
Fixes #3161 and #3168
2019-09-20 17:16:55 -03:00
Ale Martinez
b47ddd13d5 Change np to isopower in LTMTool formula helper 2019-09-20 17:16:55 -03:00
sanfordhk
411e85843c lupdated and fixed zh-tw translation of 'match' (#3167) 2019-09-20 09:02:50 -03:00
sanfordhk
1dfdf952dd 100% zh-tw translation (#3153)
* Completed zh-tw translation
2019-08-28 09:06:33 -03:00
sanfordhk
7330e4326e partial translation zh-tw update (#3148) 2019-08-26 17:41:36 -03:00
Ale Martinez
a9bbe5dc5a Use double division to compute dpi factors
Fixes #2628
2019-08-25 14:21:18 -03:00
Ale Martinez
3e99394d39 Fixed order of operations in CoreTemp calculation to match MatLab code
Fixes #2885
2019-08-24 20:52:37 -03:00
Ale Martinez
a3d1c624e4 Fixed Estimate Power not including Bike Mass on Power required to accelerate
Reported by user Steve Short at the forum
2019-08-24 20:46:08 -03:00
Marcel Breij
f6559cd181 Updated Dutch Translation 2019-08-23 10:36:59 -03:00
Ale Martinez
223cd82cdc Spanish translation - minor updates and spell checking 2019-08-22 14:52:30 -03:00
Alejandro Martinez
600a9cfb43 Add Import Chart menu to Main Window and Chart Bar (#3146)
It allows to import .gchart files from menus as an alternative
to drag&drop, for completeness and to reduce end user questions.
2019-08-22 09:52:52 -03:00
sanfordhk
1a5978ac36 partial translation zh-tw update (#3147) 2019-08-22 09:51:45 -03:00
grauser
1d6d66f960 Translation : French update (1/3) 2019-08-21 11:46:51 +02:00
grauser
937b70e596 FitRideFile : Add Powertap/Powercal and Favero 2019-08-21 11:46:31 +02:00
Alejandro Martinez
39b01c2649 Preserve UTF-8 encoding when reading namedsearches.xml config file (#3145)
Fixes #3143
2019-08-20 13:23:00 -03:00
UgoBor
e68afa6aea Edit Italian Translation GC v3.5 2019-08-20 16:14:10 +02:00
sanfordhk
ff0a75bbc6 partial translation zh-tw update (#3142)
focused on translation of main functions and main UI clean-up. default zone names translated and will work only with UTF-8 reading fix for issue #2978
2019-08-19 12:26:59 -03:00
Ale Martinez
895d0d1cb6 Updated Spanish Translation 2019-08-17 21:07:19 -03:00
sanfordhk
ea8f11ac86 partial update of zh-tw translation (#3140) 2019-08-16 07:54:28 -03:00
Ale Martinez
85f471bd68 Partial Update of Spanish Translation 2019-08-13 21:52:52 -03:00
Ale Martinez
4b8f9cc8f0 Enable translation of "Peak X" interval names from Find Intervals 2019-08-13 19:38:12 -03:00
Joern
fc20b9c4d8 Merge pull request #3137 from Joern-R/DE
Update Translation DE
2019-08-09 18:59:22 +02:00
Joern
84fbfc464c Update Translation DE 2019-08-09 15:33:46 +02:00
Alejandro Martinez
3987833102 Allow Banister to use other performance metric besides Power Index (#3136)
* Allow Banister to use other performance metric besides Power Index
Performance metric can be selected from any Peak metric in LTM Charts
Datafilter now is banister(load_metric, perf_metric, ...)

* Travis-ci - R3.6 install update key
According to https://cloud.r-project.org/bin/linux/ubuntu/README
2019-08-04 18:01:09 -03:00
Sping Zhao
2babb9f9de zh-cn translation updated to date. (#3135) 2019-08-04 18:00:47 -03:00
gcoco
ee1d2b0ea6 Run make silently (#3133)
And force it to run again if it crashes so we can see what went wrong.
2019-07-24 16:49:46 -03:00
Ale Martinez
e1ddeffd7f Banister - fixed score accumulation for multiple activities per day
It was notable when a second activy has score=0, s.t. a transition
run, provoked the score for the day to go to zero.
2019-07-19 10:33:12 -03:00
Ale Martinez
f83a367796 CloudDB chart upload - allow digits and hyphen but not underscore in domains
Issue reported at the forum
2019-07-19 10:32:28 -03:00
Ale Martinez
dd755386d3 CloudDB chart upload - allow subdomains in email address 2019-07-18 10:36:15 -03:00
Ale Martinez
b66a668669 Fix Lap Swim from Length Data - Preserve HR data
It was discarded when present
2019-07-14 13:48:40 -03:00
Ale Martinez
e8a41b1228 Fix Speed from Distance - Raised moving average limit
To account for bad data in Open Water files
2019-07-07 19:22:19 -03:00
Mark Liversedge
7b659e69d8 Add CV alongside RMSE on CP Chart
.. seems silly to not do it, and its relatively useful when comparing
   the different model fits.
2019-07-07 13:33:17 +01:00
Ale Martinez
236f782e66 Fixed Remote Calendar authorization
We need to save the calendar type for older CalDAV code to work,
additionally Google calendar needs the calendar ID (tipically the same
as the email address), used the optional Key setting field for this.
2019-07-04 19:33:04 -03:00
Joern
a6b7993fa5 Merge pull request #3127 from qheath/translations
Translations
2019-07-03 17:00:41 +02:00
Joern
457a92a067 Merge pull request #3129 from mtbkeith/Lezyne_SuperGPS
Add Lezyne Super GPS
2019-07-03 16:27:14 +02:00
Keith Reynolds
1e1dceef73 Add Lezyne Super GPS 2019-07-02 15:53:47 -06:00
Quentin Heath
3a57fdb8a8 french translation
use proper French instead of mimicking English
2019-07-01 09:53:14 +09:00
Quentin Heath
35db3a6f03 fix translations
replace some mistaken "Today's Plan" by the appropriate "Polar Flow"
2019-07-01 09:42:29 +09:00
Ale Martinez
494422399f Change heading for direction in Power estimators
Missing part from 9f0c70391b
2019-06-11 18:06:04 -03:00
Frank Zschockelt
1dbe3c9be8 FitRideFile: Unify handling of invalid product id 2019-06-07 20:06:09 +02:00
Benedikt Stegmaier
f334097f30 FIT : Add Hammerhead as manufacturer 2019-06-07 19:52:30 +02:00
grauser
27e044f763 Fit : Power phases - limit to 360
fix #3030
2019-06-02 22:11:34 +02:00
grauser
330b5cbe71 Translation : lupdate and french update (1/2) 2019-06-01 12:20:29 +02:00
Ale Martinez
385d5234de LTM Table - Format Pace and Best times minutes in Sexagesimal format
Same logic as LTM Plot in commit b7ced302ad
2019-05-31 23:00:23 -03:00
ericchristoffersen
6e175dfb91 Raise slope limit to +-40. (#3092) 2019-05-28 08:06:43 +01:00
Hennadiy (Gena) Verkh
70f465f914 Fix estimator not running for runs, if there are no bike rides (#3110) 2019-05-26 22:16:16 -03:00
grauser
a8ca30ccd7 FIT : Add Respiration Rate 2019-05-23 22:36:43 +02:00
grauser
44026a1838 Fit : Add some Garmin models 2019-05-23 22:22:00 +02:00
grauser
8820817d0f CSV : iBike remove debug line 2019-05-23 21:54:01 +02:00
Oleksiy Mishchenko
08a704ec1b No reason to skip a datapoint if DFPM is null 2019-05-23 21:51:59 +02:00
Oleksiy Mishchenko
fbb6f68f81 iBike CSV: If Timestamp stream is present, take the first one as the
activity start time.

It is out of sync when merged with external GPS data.
2019-05-23 21:51:59 +02:00
oleksiy
eec18940ae CSV : ibike, import recorded Air Density as Rho XDATA series
Signed-off-by: oleksiy <oleksiy@oleksiy-macbookpro3.lan>
Signed-off-by: oleksiy <amishchenko@gmail.com>
2019-05-23 21:51:59 +02:00
Ale Martinez
d2c2085741 Fixes R GC.activity when the data frames list don't match the activities list
The names attribute length must be equal to the vector size
Fixes #2542
2019-05-21 20:36:17 -03:00
Ale Martinez
9c9d1e52e9 Cosmetic change in the name of found intervals
- When there is no power don't add (0w)
- Move the rounding to the format method to avoid Pace issues (Fixes #3106)
- Pending: make the rounding dependent on the series.
2019-05-21 13:15:32 -03:00
Ale Martinez
23049b4277 Changed Time in Zone counts to fix percentages aggregation
This solves the issue when activities not having all the data
channels available are aggregated.
Forces a metric recomputation to account for these changes.
2019-05-20 17:14:56 -03:00
Ale Martinez
794e097f8f Changed RideDB to save metrics with aggregateZero even when value is zero
Since counts are relevant for averaging them between different rides.
Required to fix the issues when aggregating Time in Zones Percentages.
The previous solution worked until you exit GC since when the RideDB
was reloaded the counts with zero values were lost.
2019-05-20 17:14:56 -03:00
Alejandro Martinez
c02714ecc8 Merge pull request #3104 from jgpallero/patch-3
Update AvgLTE, AvgRTE, AvgLPS, and AvgRPS in BasicRideMetrics.cpp to fix #3102
2019-05-20 17:11:28 -03:00
Ale Martinez
9a0f291057 Added AggregateZero to Time in Zone Percentage metrics
So it aggregate properly in Metric Trends Charts, currently
when one of the rides to be aggregated has 0 percent in one of
the zones the aggregate is distorted and it can be higher than 100%
which is particularly notable when the bars are stacked.
This has been reported several times at the forum.
2019-05-16 22:59:43 -03:00
jgpallero
91c9d2d770 Update AvgLTE, AvgRTE, AvgLPS, and AvgRPS in BasicRideMetrics.cpp
As for the L/R balance (see https://github.com/GoldenCheetah/GoldenCheetah/pull/3098) there are issues in the Torque Effectiveness and Pedal Smoothness computation when using Favero Assioma DUO pedals. In some cases, values for LTE, RTE, LPS, and/or RPS are stored in the file while the power and/or cadence data shows that the correspondent stroke was either void or no power generating (see the attached image in https://github.com/GoldenCheetah/GoldenCheetah/issues/3102). This was not taken into account in the code, as the only check was the existence of LTE, RTE, LPS, and RPS data greater than zero. I've made the necessary changes in order to check if the stroke was a power generator by verifying if the cadence, power and lrbalance values are valid (it is SUPPOSED that all files that contain LTE, RTE, LPS, and /or RPS contain also power, cadence, and lrbalance data, as they are necessary for the LTE, RTE, LPS, and RPS values computation)
2019-05-16 16:59:41 +02:00
Alejandro Martinez
3421523768 Merge pull request #3101 from amtriathlon/master
Added Time Recording and use it for Time in Zone Percentages
2019-05-15 17:42:57 -03:00
Alejandro Martinez
f7e318e959 Merge pull request #3098 from jgpallero/patch-1
Update LeftRightBalance.cpp fixes #2955
2019-05-15 17:41:15 -03:00
Ale Martinez
75146af6fe Added Time Recording and use it for Time in Zone Percentages
Fixes #2745 which requests this metric plus it allows to fix the issue with
Time in Zone Percentages which don't add to 100% nor aggregate properly
when there are gaps in recording, tipically due to pauses.
When there are no gaps Time Recording equals Duration and Time in Zone
Percentages don't change.
2019-05-14 20:50:19 -03:00
grauser
3f4b7a64e3 CSV : ibike note can have ","
fix #868
2019-05-14 22:31:51 +02:00
grauser
7cb72490a8 CVS : ibike convert temperature for english
temperature in english (imperial) ibike file is in degF
2019-05-14 22:01:13 +02:00
grauser
09acc4700e CSV : ibike change metric/imperial determination
Use info on first line
2019-05-14 21:51:19 +02:00
jgpallero
439a7f6e12 Update LeftRightBalance.cpp
Add additional checks in order to differentiate between cycling and running
2019-05-14 12:17:10 +02:00
Ale Martinez
3316f41502 Fix Lap Swim from Length - Ignore Garmin Smart Recording disabled
The user is requesting explicitly the length expansion so, to avoid
confusion, we should ignore this setting, which was badly handled
to make things worse.
Fixes #2892
2019-05-13 21:41:53 -03:00
grauser
c45bd52edd CSV : Convert total weight to metric (if needed) 2019-05-13 22:06:11 +02:00
grauser
20d6d80ded CSV : ibike keep original weight, CdA and Crr for aerolab 2019-05-13 22:01:55 +02:00
grauser
523be2bc0a FIT : Add Lezyne Micro-GPS
Thank you Claus Assmann
2019-05-13 18:12:56 +02:00
grauser
d27b4a639b Strava : Correct commit for indoor lap.
Keep last lap seconds
2019-05-13 18:10:17 +02:00
Frank Zschockelt
73e5d0bd4d FitRideFile: Add Lezyne MegaXL 2019-05-13 08:25:35 +02:00
jgpallero
04d4403844 Update LeftRightBalance.cpp
Change in order to manage correctly the Left/Right balance due to the issues detected with the Favero Assioma DUO pedals, as it was explained here: https://github.com/GoldenCheetah/GoldenCheetah/issues/2955

But after I detected the issue, this file was modified in order to accomplish the proportion of Ground Contact Time from each leg for runs, and a new check was added to the code (point->cad || point->rcad), while in the original code only the point->cad was tested. I'm not sure if the addition of my new checks, specially the (point->watts > 0.0f) one, are safe for the running part of the function
2019-05-12 20:27:06 +02:00
Ale Martinez
9796d9044f RR from txt files - filter and record HR for each second
Fixes #3095
2019-05-11 21:01:29 -03:00
Ale Martinez
8c995a5339 HRV import from text file - fix discard of last line
Fixes #3094
2019-05-11 11:32:04 -03:00
Alejandro Martinez
4ca3cbcffe Merge pull request #3087 from amtriathlon/BanisterRun
Add Banister and Performance for Running Power
2019-05-04 13:41:13 -03:00
ericchristoffersen
bff9cfe1d0 Issue 3057:VirtualCalc incomplete, produces NaN (#3064) 2019-05-04 07:51:20 +01:00
grauser
72ac997a84 Interval : Add a message box "Are you sure you want to delete selected interval?" 2019-05-02 23:06:24 +02:00
grauser
7409c719b3 Strava : Correct last commit for indoor trainer ride 2019-05-02 21:52:58 +02:00
grauser
fa9d32dbf0 WorkoutWizard : Change max slope to 20%
Many new trainers can simulate slope >14% and
KICKR CLIMB max incline is 13%

fix #3082
2019-05-02 21:18:42 +02:00
grauser
c5d57af45f Strava : It seems in some case (indoor file?) we don't have start_index for laps
fix #3010
2019-05-02 17:13:10 +02:00
grauser
0e08a7b8bc ErgDB : download from ergdb.org 2019-04-30 22:05:33 +02:00
Alejandro Martinez
2987e110a2 Merge pull request #2914 from cyberfuzzie/fix-gpx-decimal
Change GPX decimal separator to dot
2019-04-27 18:29:26 -03:00
Joern
d698dbd942 Merge pull request #3090 from Joern-R/GchartImport
Chart Import Dialog
2019-04-27 19:24:26 +02:00
Joern
b743440246 Chart Import Dialog
... allow column header to get translated
2019-04-27 18:13:19 +02:00
Ale Martinez
b30497692a Fix Elevation - Add explanation to Network Error 4
Closes #3089
Closes #3068
2019-04-27 12:48:44 -03:00
Ale Martinez
27c15f9d20 Fix crash on distribution chart
close #3085
2019-04-27 12:22:31 -03:00
Ale Martinez
00aea878bd Rename Segment uses RenameIntervalDialog instead of EditIntervalDialog
Fixes #3061
2019-04-27 11:28:13 -03:00
Ale Martinez
c00efb94e5 Set sync on startup and import to false when a cloud account is deleted
Fixes #2936
2019-04-25 17:30:04 -03:00
Ale Martinez
93ec3246cf Travis-ci - change from trusty to xenial for Linux builds
Trusty reaches end of life on april 2019
2019-04-25 14:35:59 -03:00
Ale Martinez
8facce909a Add Banister and Performance for Running Power
- Performances are computed independently for Rides and Runs in Estimator
- Running Performances are shown in LTM Charts When all selected activities
  are runs for a Performance curve
- Banister models uses Performances from activities were score > 0
  and for the same date with matching sport, so a Banister model based
  on BikeScore/BikeStress will include only rides while one based on
  GOVSS will include only runs
- Banister (Run) chart based on GOVSS metric added for testing
2019-04-23 18:22:36 -03:00
Ale Martinez
44d17a606b Added PowerInWatts extension to GPX Parser
Fixes #3084
2019-04-23 12:13:30 -03:00
Alejandro Martinez
15e70f9e9d Change remaining TSS to BikeStress
Reported at the forum
2019-04-19 17:23:48 -03:00
Alejandro Martinez
009d77aa22 Merge pull request #3080 from amtriathlon/RunEstimates
Add CP Model Estimates for Running Power
2019-04-16 12:34:57 -03:00
Ale Martinez
ff0b32989f Add CP Models for Running Power
- PDEstimate now has a run flag, Estimator has 2 passes: rides and runs
  MultiModel and WSModel are disabled for the same reason they were disabled
  in CP chart, and to lower the performance impact.
- Show CP Models Estimates for Running in RideSummary when the involved
  activities are all runs.
- DataFilter estimate function uses Bike or Run models based on activity type
- Metrics Trends charts Estimate allow Bike vs Run selection
2019-04-15 15:26:35 -03:00
Mark Liversedge
fc9fb7ba24 Import Workouts from WebPageWindow
.. so we can open ergdb as a chart window and browse and
   select workouts to import.
2019-04-15 08:31:22 +01:00
riccioclista
4083be3744 xdata: Fix min/max of spinbox in xdata editor (#2995) 2019-04-15 07:46:59 +01:00
Chris Cleeland
b8c2bd35b7 Fix issue #3007 by specifying HFS+ for fs type (#3015) 2019-04-15 07:46:00 +01:00
ericchristoffersen
d20291031a Fix divide by zero in slerp, also center spline length arc points (#3072) 2019-04-15 07:44:17 +01:00
ericchristoffersen
a1f3a98f79 Issue 3065: Uncombine the printing of lat and long telemetry. (#3066) 2019-04-15 07:43:06 +01:00
ericchristoffersen
72bc73ceac Issue 3058: Buffer overrun by 1. (#3063) 2019-04-15 07:38:58 +01:00
Alejandro Martinez
41ac0dc1cd Create ISSUE_TEMPLATE.md
Another attempt to minimize the use of issue tracker as a help desk.
Additionally we could use the new templates feature for bugs and features, but I don't have permissions to change repository settings.
2019-04-14 20:45:10 -03:00
Ale Martinez
e1949c59f1 Activity Manual Entry - Metadata entry fields mimic RideMetadata behavior
Changed Notes format to preserve columns and
Sport/Workout Code completers to honor retrieve previous values on "*"
2019-04-11 20:18:35 -03:00
Ale Martinez
f817692659 Pad missing altitude in FIT file records with previous value
Previous behavior is to pad with zeroes which inflates Elevation Gain
Fixes #3070
Fixes #3067
Includes test file
2019-04-05 20:48:13 -03:00
Ale Martinez
cefb1b3f12 Added Mac Preferences image for the wiki 2019-04-05 11:35:41 -03:00
Ale Martinez
f77cf6d934 Read Zones files using UTF-8 Codec
Fixes #2978 for Windows builds
2019-04-05 10:52:52 -03:00
Alejandro Martinez
7e788aa50c Added Windows High DPI Settings Image for the Wiki 2019-04-04 21:09:45 -03:00
Ale Martinez
cce26607ea FitRideFile - Rename record field 90 as PERFORMANCECONDITION
It is not docummented but it seems to match the observed values in GC
2019-03-29 19:33:52 -03:00
Alejandro Martinez
74349879b7 Merge pull request #3060 from amtriathlon/master
Additional Running Dynamics support
2019-03-29 18:17:48 -03:00
Ale Martinez
81bf4a0b48 Additional Running Dynamics support
-Extra data fields renamed and scaled according to spec: stance_time_percent,
activity_type, vertical_ratio and step_length
-Average metrics for the new fields: Average Stance Time Percent,
Average Vertical Ratio and Average Step Length
-Tested using Garmin 935 with Running Dynamics Pod
2019-03-29 17:21:32 -03:00
Alejandro Martinez
cea2c09ea6 Merge pull request #3056 from amtriathlon/master
Double-click on LTMPopup ride list selects Activity and Activities view
2019-03-25 11:51:42 -03:00
Ale Martinez
5b6c1f5a5b Travis-ci upgrade to xcode10.1 for osx builds
Fix issues building libsamplerate
2019-03-25 09:59:07 -03:00
Ale Martinez
f8d530db4c Double-click on LTMPopup ride list selects Activity and Activities view
Fixes #922
2019-03-24 19:51:16 -03:00
ericchristoffersen
8e0c303759 Teach fixgps to use cubic splines instead of linear interpolation (#3044) 2019-03-19 09:30:26 +00:00
ericchristoffersen
c299a7237e Issue 3048: Teach fix distance to use length on spline path (#3049)
* Issue 3048: Teach fix distance to use length on spline path

* Remove debug pragma
2019-03-19 09:29:50 +00:00
Mark Liversedge
681f87a432 Curve fill colored zones (AllPlot) 2/2
.. UserData series now have a zone string that
   can be used to define upper values and associated
   colors for shading a curve.

.. the format is: lim,colorname;lim,colorname;

   where lim is an upper value and colorname is
   either a #rgb string or any color name such
   as red,green, blue etc from the list of SVG
   color keyword names provided by the World Wide
   Web Consortium.

   e.g:  200,green;300,yellow;9999,red
   which will shade points <200 green, <300 will be
   yellow and then <9999 will be red.

   The zones must be listed in ascending order.
2019-03-12 22:06:45 +00:00
Mark Liversedge
d2a8951c93 Downgrade to GPL-V2 License
.. there are too many incompatibilities between the
   V3 license and other codebases we wish to work with
   that are based upon the GPL-V2 license.

.. this downgrade is to ensure we are compatible and
   can align with contributions from other parties in
   the future.

.. a notification will be sent to the mailing list to
   inform all users.
2019-03-12 19:16:22 +00:00
Mark Liversedge
95901aa1e2 Curve fill colored zones (QWT) 1/2
.. updated the QwtPlotCurve to fill using zones.

.. next commit to update user data curves in AllPlot
   to let the user set zones and colors.

.. added as part of updates for Humon collaboration.
2019-03-12 18:20:32 +00:00
Ale Martinez
cae7e0b6b6 Fix vlc playback in travis-ci generated AppImage 2019-03-10 13:10:41 -03:00
Ale Martinez
9fb21af373 Enable OPENDATA for Travis-ci builds
Change OPENDATA_DISABLE and fix GC_CLOUD_OPENDATA_SECRET default
Escaping special chars with travis secure is tricky...
2019-03-08 21:25:04 -03:00
Ale Martinez
e2ff21e244 Fix Travis-ci Linux builds
Add qt59translations and use linuxdeployqt release 6
2019-03-08 18:43:31 -03:00
Ale Martinez
1c762c1d00 Add Whithings/Nokia, OpenData and SportTracks secrets for Travis-ci builds
Also removed lmfit since it is in the repo from f5055aa0e3
2019-03-08 14:42:10 -03:00
Joern
5b28c67fdf Merge pull request #3037 from Joern-R/VC2017
VC2017/Qt 5.12.1 - Fix 64Bit Build Problem
2019-03-06 14:25:42 +01:00
Joern
c9600248c6 Proper Fix for the VS2017 / Qt 5.12.x Problem
... provided by Eric
2019-03-06 12:03:15 +01:00
Joern
629a5d9446 VC2017/Qt 5.12.1 - Fix 64Bit Build Problem
... with windows / VC2017 / 64Bit the code does not build / cannot resolve a overwritten function when using QT 5.12.1
... adding the newly introduced function similar to the other function resolves the compile problem
2019-03-03 11:46:09 +01:00
Mark Liversedge
d93404fe77 Fixup script on Mac use backwards copatible dmg format
.. creates a JHFS+ UDBZ format DMG
2019-02-25 13:41:52 +00:00
Sascha Riemer
9588c9c00b Change GPX decimal separator to dot 2018-08-27 19:19:05 +02:00
948 changed files with 331892 additions and 166726 deletions

5
.gitignore vendored
View File

@@ -36,6 +36,11 @@ plugins/
resources/
src/debug/
src/release/
doc/doxygen/latex
doc/doxygen/html
# qt creator builds
build-src*
qwt/src/debug/
qwt/src/release/

View File

@@ -1,10 +1,21 @@
if: commit_message =~ /\[publish binaries\]/
branches:
- master
language:
- c++
os:
- osx
- linux
only:
- master
- /^[vV]\d+\.\d+(\.\d+)?(-\S*)?$/
language: cpp
cache:
directories:
- $HOME/Library/Caches/Homebrew
- qwt
- D2XX
- site-packages
- VLC
- src/GoldenCheetah.app
env:
global:
- BRANCH=master
@@ -22,34 +33,36 @@ env:
- secure: QXyyyutxesRVae/WFi75dxlNw2qTyWc6WQ3vmRER9BFhlrNtt8lmE+M6ghMDOhxigzSXWxHcG9r66BLOw4DML7AXg4f3NIAIYuYQrpfsWQ1TKGC/vVvIPDlNBKL62zSOoNowjup1HfZpB575wl4JkmHjoMPDfQ4yM/JVR+MKmIM=
- secure: lefpL3SB8yN0Vn1R2e0hAFpJgFnu4rJ/vn7DucSKQvJ61K7t3LrUHFXElDQGFZMbytx4OJDeYsJtrccrIHjcsSAEIyW8TTcwn5/JopnyeQ3ukV5AYpEoQusym09XKru9E7awqvnZrXz6mdoIum5JP7+H116mPN4vsvz5nkNWxeg=
- secure: RAGPq/thN9x6STNueDbeJWGUN75OLNcUVUkLHI/eZwPrkMaiQPfxIaJ+8eO2PszDcBojw3eYVhzbRvLnLiXmHL3buwD6oXMTyYnxGzCZ61DeDQ2cQa8ynKmRim5JL3viKMqtdyasXVoGf/u0GqMsgaLcqN6e/vXuXMGu6kkUPEQ=
matrix:
include:
- os: osx
compiler: clang
- os: linux
dist: trusty
sudo: required
compiler: gcc
- secure: Lydms45scczE9gZvkWze2fXVbEInKW48DOCIRJWziEzxKkvXUE7WPy74fLvfvL+0JW0LH/ZLZ9EbgHcJAYYs8CBrfAeOOtnyo2DZ0ouEO13RmomSZneEKSpJxRtErcPIu+B0LzcEGyAgf7bxPVevEte50CK0pZJ7z7bHMhU23pY=
- secure: cc0pAJjkmFNw2bO3zVACmtyHTwINAHALrtUxi+nRD+FhOO9KxuxuuwvcKCZKfp9EUOjz5PrYWKV1ZH/zt/jMix8A4Gyue2mWX8WYih7aTmJBcJWsFNTCybnClreKBCh18kHdWWhkmhk8EMINDvlqxzJZGpcNO04gxhL9wuLLrNQ=
- secure: em0xXIm69rMHsHXYQiizeJB7dEFBkX33PsWDHwBNrX6lFBued23eL96KJC4RVbk6A+AHFtXFATrreZ14D5JH/E/37CXhe3X2R93WqiPUSH0s7NI4fFA1BroKUNAlqO4bMqDBidtNmwMPaLTXjaOnOZyvbAG7z+QV3TKC8tOeZDU=
- secure: VFaSERlgsjzjiDQhKw8XFvQrjdvFzHHL7V3NQg+RfELHoT6I1pAGFdl/+lRBIVOiVkbQ6XnpBA28nlf0QydPHElRZdqmh0azQV/bkUXD4ffPE8q0iSqeqhAZ+5L05K5K+Gby/y8TZE4FX6e/7trFL7oq+h9x0gq5RQO8rAcTV84=
- secure: eTSJmS38EsTkI22yvDJLUrBxSyLDwd3pDRsyLQfZ3ThN0UJ9cQN2uB7aLy3OzNYadpi+Axlr46MgG0G5qGV1hHXkf+C4orGkURQWxHA7L5R/oE98TuYMO1bisZu9dJEVbmEM4cehCjbB7DExzxK4m6+oTJsWhVbIwlNh5Poq/v4=
- secure: gUDTEErUOhzkSVofEvdw1jqHHsE/K+/SOqRBKDToaFPhi6XK+Tvu1LqPMjfPdjYLaCSiwc/R79fJrAEuK+7KSwdiLEnDv3RMpRS5g1UWyJ/ZYd5xNR+WiBqUvnY/S/CJokuNw7gBbGq7JCO4pmIGV5YB9FA4Na6MG/eHzTSOIig=
- secure: Qk+gzBLwjrB8abUYzxap10dYSpIeKpB1gqhdoMbqS23G0r1lejnsjutIfReuJGK/efCmhisKN1xIX/InvJWD8z6GsLJFmf3F0oRj7aDJ/X5UIn9Upflje9xgHQafP1FJuzZBWtzandNfPE8EmEOgAQsJZ3c7xBE1SY/6xcJaQTc=
- secure: m4+k3/QcYvqmMoRO8uq3ef2jAO1FWeRVDG/XtlbjBlgmB5OR/zW5c7c1Ywm6IM5yzsi1rRks8GFffZ6gYqXhML10EfGKVbnyBcZZ7HVylNtvxDF68W1BLacChzDs4mGYQSV8kJRGI3EaVNdyFJ5yln/HUZ6qBbQ473MtxprO6BI=
- secure: GEyUuLuIc7D3F4noKhtTCbWbQAlm61Y7Vh2mOKBEgmyfoV1johwlEL0RaeRyr9MnU2MN+4jeFthvDjxm3LGP19zrpB46GTGHU6/H9BZBodDCJsFTqj32T+5QTcAF2RQ66ZgYpSyTf063/RLlfy7YjCb8KLiJ2asCaoYtQIjx3hA=
jobs:
include:
- os: osx
osx_image: xcode11.3
compiler: clang
- os: linux
dist: bionic
compiler: gcc
before_install:
- travis/$TRAVIS_OS_NAME/before_install.sh
before_script:
- travis/$TRAVIS_OS_NAME/before_script.sh
script:
- travis/$TRAVIS_OS_NAME/script.sh
after_success:
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then
export FINAL_NAME=dev-prerelease-branch-master-build-${TRAVIS_BUILD_NUMBER}.dmg;
else
export FINAL_NAME=dev-prerelease-branch-master-build-${TRAVIS_BUILD_NUMBER}.AppImage;
fi
- travis/$TRAVIS_OS_NAME/after_success.sh
deploy:
provider: releases
api_key:
secure: KlfkRM8oGP02y5LhbdxetnhqUG3YzVylvyhT8BTYjdoJtkJr7YXYpdhj9byZ9aiy1gSWI/g7A1X6/P8/McqRtgt4dEYr4Zg8QO7Y7QdTpgNQEwu8ZrkyyG/7b/rSkfFHDjrOAHslLVXuBNwWgi8YW1aTn0rY2AqDbOri7u6tt9Q=
file: src/$FINAL_NAME
skip_cleanup: true
on:
tags: true
repo: GoldenCheetah/GoldenCheetah
before_cache:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cleanup; fi
after_success:
- travis/$TRAVIS_OS_NAME/after_success.sh

873
COPYING
View File

@@ -1,622 +1,281 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Version 2, June 1991
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
13. Use with the GNU Affero General Public License.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
14. Revised Versions of this License.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
NO WARRANTY
15. Disclaimer of Warranty.
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
@@ -628,15 +287,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -644,32 +303,38 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -4,98 +4,79 @@
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.7.0 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
You will now have a release3 binary but with none of the release3 dependencies compiled in.
Get latest GOLDEN CHEETAH source files
--------------------------------------
$ mkdir -p ~/Projects/Live
$ cd ~/Projects/Live
$ mkdir -p ~/Projects
$ cd ~/Projects
$ git clone git://github.com/GoldenCheetah/GoldenCheetah.git
$ cd GoldenCheetah
@@ -107,11 +88,32 @@ $ cd ../src
$ cp gcconfig.pri.in gcconfig.pri
$ vi gcconfig.pri
Comment out the D2XX_INCLUDE and SRMIO_INSTALL lines for now (put # in first character of the line
to comment out), we will install that in a moment, if we need to.
Uncomment below and configure the location of the GNU scientific library, this is a mandatory dependency.
If you are building for your local host you may find that you get better performance if
compiling with gcc -O3 (tree vectorization can have a significat impact) [or -Ofast]
#GSL_INCLUDES = /usr/include
#GSL_LIBS = -lgsl -lgslcblas -lm
Uncomment the following lines to use flex and bison:
#QMAKE_LEX = flex
#QMAKE_YACC = bison
and if you are using bison 3.7 or higher, make sure to also uncomment:
#QMAKE_MOVE = cp
To compile translation you need the QT tool lrelease
If it is not found using the defaults in src/src.pro then set the full path and
filename in gcconfig.pri, s.t.
QMAKE_LRELEASE = /usr/bin/lrelease
If your QT build doesn't include its own local compress libs then you should uncomment the lines below,
and add the library path to LIBZ_INCLUDE =, you will need to have the compress libraries installed separately.
#LIBZ_INCLUDE =
#LIBZ_LIBS = -lz
compiling with gcc -O3 (tree vectorization can have a significat impact)
[or -Ofast]
If so you might like to uncomment:
@@ -122,32 +124,43 @@ Save and exit
$ cd ..
BUILD WITH BASIC CONFIGURATION
------------------------------
$ qmake -recursive
$ make
Congratulations you have now build a basic GoldenCheetah and can run this safely. See below for
optional dependencies you can install to support other features.
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
ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 2
====================================================
Congratulations you have now build a basic GoldenCheetah and can run this
safely from src folder.
See below for optional dependencies you can install to support other features.
2. ADDING OPTIONAL DEPENDENCIES
===============================
D2XX - For Powertap downloads via USB
-------------------------------------
Download the FTDI drivers from http://www.ftdichip.com/Drivers/D2XX.htm (e.g. I used Linux
64-bit drivers from http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx1.0.4.tar.gz)
Download the FTDI drivers from http://www.ftdichip.com/Drivers/D2XX.htm and
extract:
Extract into your home directory (I put mine into ~/Projects/ with archive manager which
created a sub-directory ~/Projects/libftd2xx1.0.4
$ cd ~/Projects
$ wget http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.3.6.tgz
$ tar xf libftd2xx-x86_64-1.3.6.tgz
$ cd src
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
Uncomment the D2XX_INCLUDE entry and make it match (my home is /home/markl)
D2XX_INCLUDE = /home/markl/libftd2xx1.0.4
D2XX_INCLUDE = /home/markl/Projects/libftd2xx-x86_64-1.3.6
Make clean is needed if you have previouslt built, since source files examine #defines before
including this feature. You can skip it if you know why ;)
Make clean is needed if you have previouslt built, since source files examine
#defines before including this feature. You can skip it if you know why ;)
$ make clean
$ qmake
$ make
@@ -172,20 +185,20 @@ $ make
$ sudo make install
Lets go config GC and build with SRMIO
$ cd ~/Projects/Live/GoldenCheetah/src
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
Uncomment the SRMIO_INSTALL and replace with the target used from srmio install:
SRMIO_INSTALL = /usr/local/
At the bottom of gcconfig.pri you will see the include directory should reference from
the base install location (/usr/local) make sure it says:
At the bottom of gcconfig.pri you will see the include directory should
reference from the base install location (/usr/local) make sure it says:
SRMIO_INCLUDE = $${SRMIO_INSTALL}/include
SRMIO_LIB = $${SRMIO_INSTALL}/lib/libsrmio.a
Make clean is needed if you have previouslt built, since source files examine #defines before
including this feature. You can skip it if you know why ;)
Make clean is needed if you have previouslt built, since source files examine
#defines before including this feature. You can skip it if you know why ;)
$ make clean
$ qmake
$ make
@@ -195,9 +208,7 @@ You now have SRM support built in.
LIBKML - For export to Google Earth
-----------------------------------
You will need Google Earth 5.2 or later and therefore libkml that supports this. Unfortunately at the time of writing
the officially packaged libkml is too old, so you will need to install from source, which means you will need to have
subversion installed and expat. You may be able to use the currently packaged libkml with
You will need Google Earth 5.2 or later and therefore libkml that supports this.
$ sudo apt-get install libkml-dev
@@ -206,7 +217,8 @@ if this does not work you will need to build from source:
$ sudo apt-get install subversion
$ sudo apt-get install expat libexpat1 libexpat1-dev
Once svn is installed you can grab the libkml source and configure build etc:
Once svn is installed you can grab the libkml source, configure, build and
install:
$ cd ~/Projects
$ svn checkout http://libkml.googlecode.com/svn/trunk/ libkml
$ cd libkml
@@ -223,55 +235,32 @@ if this does not work you will need to build from source:
- examples/{engine,gpx,gx,hellonet,helloworld,regionator,xsd}/Makefile
- and look for the flag -pedantic and remove it. I got this on Linux 64bit builds ymmv.
Once libkml is installed and built:
Once libkml is installed:
$ cd ~/Projects/Live/GoldenCheetah/src
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
Ensure KML_INSTALL=/usr/local
Make clean is needed if you have previously built, since source files examine #defines before
including this feature. You can skip it if you know why ;)
Make clean is needed if you have previously built, since source files examine
#defines before including this feature. You can skip it if you know why ;)
$ make clean
$ qmake
$ make
You can now export rides to Google Earth kml format.
ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 3
====================================================
NOTE: When you run version 3 it will refresh ride metrics and CP files -- this only occurs the
first time it runs (and will refresh only rides that change after that). I find it is best
to import ride files once your build where you want it. i.e. don't import until you have
got all your dependencies sorted.
NOTE: To reduce the dependencies on 'dormant' code there are a number of new pieces of source
that are included in the release3 tree. Notably; qtsoap from qt-solutions, since they
work but are likely to be archived and deprecated. If and when that happens we may well
adopt whatever classes Trolltech introduce.
LIBICAL - Diary integration with Google or MobileMe calendars
-------------------------------------------------------------
$ cd ~/Projects/Live/GoldenCheetah/src
$ sudo apt-get install libical-dev
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
ICAL_INSTALL=/usr/include
ICAL_LIBS=-lical
Since the src.pro wants ICAL installed in a different place we need to hack it, *** this will
be fixed shortly ***
$ vi src.pro
Comment out the ICAL_LIBS entry:
#ICAL_LIBS = $${ICAL_INSTALL}/lib/libical.a
ICAL_INSTALL = /usr
ICAL_INCLUDE = /usr/include
ICAL_LIBS = -lical
$ make clean
$ qmake
@@ -279,21 +268,89 @@ $ make
You should now have diary functions.
NOTE: That upload to MobileMe and Google requires a functioning https lib in QT. Depending
upon the version installed this might not be the case and will need to be built and
configured -- this is beyond the scope of this walkthough. Sorry.
LIBVLC - Video playback in Realtime
-----------------------------------
LIBVLC - Video playback in Realtime (Experimental)
--------------------------------------------------
You will need libvlc 3.0.8 or higher for better performance:
You will need libvlc 1.1.9 or higher (1.1.8 is ok but will segv on exit)
$ sudo apt-get install libvlc-dev
sudo add-apt-repository ppa:jonathonf/vlc-3
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt-get update
sudo apt-get install vlc libvlc-dev libvlccore-dev
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
Comment out VLC_INSTALL and it should read:
VLC_INSTALL = /usr/include/vlc/
VLC_INSTALL = /usr
$ make clean
$ qmake
$ make
LIBUSB - for using USB2 sticks in Train View on Linux or Windows
----------------------------------------------------------------
$ sudo apt-get install libusb-1.0-0-dev libudev-dev
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
Uncomment or add the following lines:
LIBUSB_USE_V_1 = true # don't use on Windows
LIBUSB_INSTALL = /usr/local
$ make clean
$ qmake
$ make
R Embedding
-----------
Install R 4.0
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/"
sudo apt-get update
sudo apt-get install r-base-dev
R --version
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
Uncomment or add the following line:
DEFINES += GC_WANT_R
$ make clean
$ qmake
$ make
Python Embedding
----------------
Install Python 3.7
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.7-dev
python3.7 --version
Install SIP 4.19.8:
cd ~/Projects
wget https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz
tar xf sip-4.19.8.tar.gz
cd sip-4.19.8
python3.7 configure.py
make
sudo make install
$ cd ~/Projects/GoldenCheetah/src
$ vi gcconfig.pri
Uncomment or add the following lines:
DEFINES += GC_WANT_PYTHON
PYTHONINCLUDES = -I/usr/include/python3.7/
PYTHONLIBS = -L/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu -lpython3.7m
$ make clean
$ qmake

View File

@@ -1,3 +1,13 @@
Update Note: to build GoldenCheetah v3.6 we are using the Homebrew Package
Manager to install dependencies, including Qt and GSL, on Travis-ci
macOS Mojave build environment.
You can check the travis/osx 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 and
minimum bison version is 2.7, both can be installed using Homebrew.
Ale Martinez - Oct, 2022
+++++++++++++++++++++++
MAC OSX BUILD WALKTHROUGH
+++++++++++++++++++++++
@@ -208,6 +218,11 @@ $ cd .. #this should put you in the top level dir containing this file
$ qmake -recursive
$ make
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 make fails to find a Makefile then qmake is configured, by default, to create
an xcode project file. You will need to change the qmake command above to tell it
to create a makefile with the following:

View File

@@ -1,4 +1,11 @@
Update Note: to build GoldenCheetah v3.6 we are using Microsoft Visual C++ 2019,
included in Microsoft Visual Studio 2019 AppVeyor image, with Qt5.15.2 and GSL 2.7
insalled with vcpkg, on AppVeyor continuous integration platform.
You can check the appveyor.yml for the complete and updated build script,
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 - Jul, 2022
+++++++++++++++++++++++
WIN32 BUILD WALKTHROUGH
+++++++++++++++++++++++
@@ -7,6 +14,7 @@
February 2017
This instruction will guide you through a standard build of GoldenCheetah (without external
dependencies or API based services included).
@@ -199,9 +207,3 @@ to contribute is to provide a pull-request.
Cheers.
Joern

10
ISSUE_TEMPLATE.md Normal file
View File

@@ -0,0 +1,10 @@
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:
* FAQs - https://github.com/GoldenCheetah/GoldenCheetah/wiki/FAQ
* User's Guide - https://github.com/GoldenCheetah/GoldenCheetah/wiki/UG_Main-Page_Users-Guide
* Developer's Guide - https://github.com/GoldenCheetah/GoldenCheetah/wiki/Developers-guide
If you need help or technical support please use the forums:
* Users - https://groups.google.com/forum/#!forum/golden-cheetah-users
* Developers - https://groups.google.com/forum/#!forum/golden-cheetah-developers

View File

@@ -1,21 +1,30 @@
<img src="src/Resources/images/gc.png" height="25%" width="25%">
# GoldenCheetah
<img src="https://raw.githubusercontent.com/GoldenCheetah/GoldenCheetah/067696aafdad21c702672b2c9c41da03c076451c/doc/wiki/GoldenCheetah-Screenshot.png" width="100%">
## About
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
OSX: [![Build Status](https://travis-ci.org/GoldenCheetah/GoldenCheetah.svg?branch=master)](https://travis-ci.org/GoldenCheetah/GoldenCheetah)
macOS and Linux: [![Build Status](https://app.travis-ci.com/GoldenCheetah/GoldenCheetah.svg?branch=master)](https://app.travis-ci.com/GoldenCheetah/GoldenCheetah)
Windows: [![Build status](https://ci.appveyor.com/api/projects/status/i6dwn4m8oyu52ihi?svg=true)](https://ci.appveyor.com/project/Joern-R/goldencheetah-knhd8)
[![Coverity Status](https://scan.coverity.com/projects/7503/badge.svg)](https://scan.coverity.com/projects/goldencheetah-goldencheetah)
Alternatively, official builds are available from http://www.goldencheetah.org
Official release builds, snapshots and development builds are all available from http://www.goldencheetah.org
## NOTIO Fork
If you are looking for the NOTIO fork of GoldenCheetah it can be found here: https://github.com/notio-technologies/GCNotio
whilst the latest developer builds are available from https://github.com/GoldenCheetah/GoldenCheetah/releases

View File

@@ -1,32 +1,233 @@
version: ci.{build}
image: Visual Studio 2015
image: Visual Studio 2019
clone_depth: 1
environment:
GC_GOOGLE_CALENDAR_CLIENT_SECRET:
secure: hwjHTrSAMEbKd9PA+5x/zI4x5Uk4KQm1hdfZzkwiu8k=
GC_GOOGLE_DRIVE_CLIENT_ID:
secure: mNqG+pqpMl21ZFVvAMKvhm2rfOdv42fFpnLwfrvX5QqpWVcHEeBuUFeJeUAZfTR0GQGfWfPOEmhb9CG0W1ZJ05TIyb+kTLrWF7iijCiVR6s=
GC_GOOGLE_DRIVE_CLIENT_SECRET:
secure: T+BaB/L7x4dPPf592e0kfw4sTlAslUXl10irJqiUjpY=
GC_GOOGLE_DRIVE_API_KEY:
secure: oxTAhK/kiLUsXdYvITAgzSqeB5FRcL+XANFuAYpoW5P/xBb7XaLbNnL2gyrmzQeG
GC_CLOUD_OPENDATA_SECRET:
secure: 6fPhBiHKvJeOMqXdHGqpkPS+NpUDMczEXjedx8GcjbHr82ISX+gwSuXfOUDLq/S9
GC_WITHINGS_CONSUMER_SECRET:
secure: 86xAkdoQB8mLXq964/lGCp3ElTSF4k3a27R3UUXt3618guWLyBfsEK5Q0+XSOI3Q38w80CTpmNdwejoISv8Ilg==
GC_NOKIA_CLIENT_SECRET:
secure: pvPWraDplrKeRNamt5MKga8fzDmI2+zgFx+y3lsQE6gmBadZU2xkTIc/xCaP7UPv2erNCmKivfMOh2NIcRmqvIHynDoifNVy2P61KyG5v3E=
GC_DROPBOX_CLIENT_SECRET:
secure: 7pCVnVEKKmSU4SZN6IFqUw==
GC_STRAVA_CLIENT_SECRET:
secure: n3cMS1yy709xhSnTeWABMsoAIkJzy5euh3Pw4ehv0BzszJKoWkypF0cyW8RXSm3M
GC_TODAYSPLAN_CLIENT_SECRET:
secure: 7PnFB8cfahFT6LyP64eB7N1vkbwVaULpB2ORmEkn+J75zNB1xxGClFNXSHZ7kXhB
GC_CYCLINGANALYTICS_CLIENT_SECRET:
secure: UY+m3YypNNLUzKyGdrLw8xdCvxuQWRZi9EHS3j1ubLC4qyRL7iEVW6ubumfdh6gT
GC_CLOUD_DB_BASIC_AUTH:
secure: OEBetrOnXjsY7wN8hYqmMj6482oDORmAmCq8PI7mfnfiWE6Z4jB676JvgdNlP98q
GC_CLOUD_DB_APP_NAME:
secure: bpkyuw/BsJw0OrpuBqQwZ46CHbhkbmcjcMttVtfJoZU=
GC_POLARFLOW_CLIENT_SECRET:
secure: h2JdlC1i4QOmwpkz+Xxbrw==
GC_SPORTTRACKS_CLIENT_SECRET:
secure: n6a8nJgqMyg+VsVeoIIR8TFzxyDFVi2w/ggetQk5agY=
GC_RWGPS_API_KEY:
secure: uUtCyF5ByZ1VYJOztUngIA==
GC_NOLIO_CLIENT_ID:
secure: /OFVjEBwU7o3SItIQVf/YlJ8XErxneXIT2N0JyPMSXR1tCbdZVWixMHpqKNWoNk4
GC_NOLIO_SECRET:
secure: mmMksvVnfBiXufBDn2gAhQY53n0J9BokSCtDY51uU918QJ/LL4XOojtJp5tMFn8T7ugyDhNASpqZXiK55vxSD53vm+tjufpfzppKEeh93Babvc/VrndLB1X/RZCRUQTR6rka05fYl4e0eBzP1H091A==
GC_XERT_CLIENT_SECRET:
secure: /1rVLT8LyJCZ4xNJ5W+NtAcZ1rtKaUjW9SYm/T3gHoc=
GC_AZUM_CLIENT_SECRET:
secure: 2ZpXsA3TQv1zftYVyZSF6f83ftCzza+K22ZX1doj7Yc/5dmGl1bnsSeVChJgJ8lQ2fRPYpdmun9cjqwcrtG/zXTTsYuTvYWegHz/4Y0u6Mg=
init:
# Setup QT 5.9 - 64Bit
- set QTDIR=C:\Qt\5.9\msvc2015_64
# Setup QT 5.15 - 64Bit
- set QTDIR=C:\Qt\5.15\msvc2019_64
- set PATH=%QTDIR%\bin;%PATH%
- qmake --version
# Setup MSVC - VS 2015
# Setup MSVC - VS 2019
- call c:\"Program Files (x86)"\"Microsoft Visual Studio"\2019\Community\VC\Auxiliary\Build\vcvarsall.bat amd64
- CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
# Setup NSIS
- set PATH=%PATH%;C:\"Program Files (x86)"\NSIS
# Get the libraries
- ps: Start-FileDownload 'https://github.com/Joern-R/gc-ci-libs/releases/download/0.0.2/gc-ci-libs.zip' -Filename 'c:/gc-ci-libs.zip'
- 7z x c:/gc-ci-libs.zip -oC:\libs
cache:
- gc-ci-libs.zip -> appveyor.yml
- jom_1_1_3.zip
- sip-4.19.8.zip
- C:\R
- C:\Python -> src\Python\requirements.txt
- c:\tools\vcpkg\installed\
- qwt
install:
# choco install winflexbison
# Get the libraries
- if not exist gc-ci-libs.zip appveyor DownloadFile "https://github.com/GoldenCheetah/WindowsSDK/releases/download/v0.1.1/gc-ci-libs.zip"
- 7z x -y gc-ci-libs.zip -oC:\libs
# GSL
- vcpkg install gsl:x64-windows
# Get config
- copy qwt\qwtconfig.pri.in qwt\qwtconfig.pri
- copy c:\libs\gcconfig64-Release.appveyor.pri src\gcconfig.pri
# Get jom
- if not exist jom_1_1_3.zip appveyor DownloadFile "https://download.qt.io/official_releases/jom/jom_1_1_3.zip"
- 7z x -y jom_1_1_3.zip -oc:\jom\
- set PATH=%PATH%;c:\jom\;
# Get R and add to config
- ps: >-
if (-not (Test-Path 'C:\R')) {
# Lets use 4.1 until 4.2 issues are fixed
#$rurl = $(ConvertFrom-JSON $(Invoke-WebRequest https://rversions.r-pkg.org/r-release-win).Content).URL
$rurl = "https://cran.r-project.org/bin/windows/base/old/4.1.3/R-4.1.3-win.exe"
Start-FileDownload $rurl "R-win.exe"
Start-Process -FilePath .\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
}
- set PATH=%PATH%;c:\R\bin\;
- R --version
- echo DEFINES+=GC_WANT_R >> src\gcconfig.pri
# Get Python embeddable and install packages
- ps: >-
if (-not (Test-Path 'C:\Python')) {
Start-FileDownload "https://www.python.org/ftp/python/3.7.9/python-3.7.9-embed-amd64.zip" Python.zip
7z x Python.zip -oC:\Python\
echo python37.zip . '' 'import site' | Out-File C:\Python\python37._pth -Encoding ascii
mkdir C:\Python\lib\site-packages
c:\python37-x64\python -m pip install --upgrade pip
c:\python37-x64\python -m pip install -r src\Python\requirements.txt -t C:\Python\lib\site-packages
}
# Get SIP and and install on Python
- c:\python37-x64\python --version
- if not exist sip-4.19.8.zip appveyor DownloadFile "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.zip"
- 7z x sip-4.19.8.zip
- cd sip-4.19.8
- c:\python37-x64\python configure.py
- jom -j4
- nmake install
- cd ..
# Add Python (avoiding colision between GC Context.h and Python context.h)
- echo DEFINES+=GC_WANT_PYTHON >> src\gcconfig.pri
- echo PYTHONINCLUDES=-ICore -I\"c:\python37-x64\include\" >> src\gcconfig.pri
- echo PYTHONLIBS=-L\"c:\python37-x64\libs\" -lpython37 >> src\gcconfig.pri
# GSL
- echo GSL_INCLUDES=c:\tools\vcpkg\installed\x64-windows\include >> src\gcconfig.pri
- echo GSL_LIBS=-Lc:\tools\vcpkg\installed\x64-windows\lib -lgsl -lgslcblas >> src\gcconfig.pri
before_build:
# Define GC version string, only for tagged builds
- if %APPVEYOR_REPO_TAG%==true echo DEFINES+=GC_VERSION=VERSION_STRING >> src\gcconfig.pri
# Enable CloudDB
- echo CloudDB=active >> src\gcconfig.pri
# Add Train Robot
- echo DEFINES+=GC_WANT_ROBOT >> src\gcconfig.pri
# Avoid macro redefinition warnings
- echo DEFINES+=_MATH_DEFINES_DEFINED >> src\gcconfig.pri
# Add debug console
#- echo CONFIG+=console >> src\gcconfig.pri
# Patch Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_CALENDAR_CLIENT_SECRET__', $env:GC_GOOGLE_CALENDAR_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_ID__', $env:GC_GOOGLE_DRIVE_CLIENT_ID | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_SECRET__', $env:GC_GOOGLE_DRIVE_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_API_KEY__', $env:GC_GOOGLE_DRIVE_API_KEY | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace 'OPENDATA_DISABLE', 'OPENDATA_ENABLE' | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CLOUD_OPENDATA_SECRET__', $env:GC_CLOUD_OPENDATA_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_WITHINGS_CONSUMER_SECRET__', $env:GC_WITHINGS_CONSUMER_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_NOKIA_CLIENT_SECRET__', $env:GC_NOKIA_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_DROPBOX_CLIENT_SECRET__', $env:GC_DROPBOX_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_STRAVA_CLIENT_SECRET__', $env:GC_STRAVA_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_TODAYSPLAN_CLIENT_SECRET__', $env:GC_TODAYSPLAN_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CYCLINGANALYTICS_CLIENT_SECRET__', $env:GC_CYCLINGANALYTICS_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CLOUD_DB_BASIC_AUTH__', $env:GC_CLOUD_DB_BASIC_AUTH | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_CLOUD_DB_APP_NAME__', $env:GC_CLOUD_DB_APP_NAME | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_POLARFLOW_CLIENT_SECRET__', $env:GC_POLARFLOW_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_SPORTTRACKS_CLIENT_SECRET__', $env:GC_SPORTTRACKS_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_RWGPS_API_KEY__', $env:GC_RWGPS_API_KEY | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_NOLIO_CLIENT_ID__', $env:GC_NOLIO_CLIENT_ID | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_NOLIO_SECRET__', $env:GC_NOLIO_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_XERT_CLIENT_SECRET__', $env:GC_XERT_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_AZUM_CLIENT_SECRET__', $env:GC_AZUM_CLIENT_SECRET | Set-Content src\Core\Secrets.h
build_script:
- qmake.exe build.pro -r -spec win32-msvc
- nmake
- cd qwt\
- jom -j1
- cd ..
- jom -j4
#notifications:
#- provider: GitHubPullRequest
# on_build_success: true
# on_build_failure: true
# on_build_status_changed: true
after_build:
- cd src\release
# copy dependencies
- windeployqt --release GoldenCheetah.exe
- copy c:\libs\10_Precompiled_DLL\usbexpress_3.5.1\USBXpress\USBXpress_API\Host\x64\SiUSBXp.dll
- copy c:\libs\10_Precompiled_DLL\libsamplerate64\lib\libsamplerate-0.dll
- copy c:\libs\10_Precompiled_DLL\VLC\win64\lib\libvlc*.dll
- xcopy /s /i /e /q c:\libs\10_Precompiled_DLL\VLC\win64\plugins plugins
- copy c:\OpenSSL-v111-Win64\bin\lib*.dll
- copy c:\OpenSSL-v111-Win64\license.txt "OpenSSL License.txt"
- xcopy /s /i /e /q C:\Python .
- copy C:\Python\LICENSE.txt "PYTHON LICENSE.txt"
- copy c:\tools\vcpkg\installed\x64-windows\bin\gsl*.dll
# ReadMe, license and icon files
- copy ..\Resources\win32\ReadMe.txt
- echo GoldenCheetah is licensed under the GNU General Public License v2 > license.txt
- echo. >> license.txt
- type ..\..\COPYING >> license.txt
- copy ..\Resources\win32\gc.ico
# Installer script
- copy ..\Resources\win32\GC3.6-Dev-Master-W64-QT5.nsi
# Build the installer
- makensis GC3.6-Dev-Master-W64-QT5.nsi
- move GoldenCheetah_v3.6-DEV_64bit_Windows.exe ..\..\GoldenCheetah_v3.6-DEV_x64.exe
- cd ..\..
- ps: Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value false
- ps: if ($env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -Match "\[publish binaries\]") { Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value true }
test_script:
# minimum test
- src\release\GoldenCheetah --version 2>GCversionWindows.txt
- git log -1 >> GCversionWindows.txt
- ps: CertUtil -hashfile GoldenCheetah_v3.6-DEV_x64.exe sha256 | Select-Object -First 2 | Add-Content GCversionWindows.txt
- type GCversionWindows.txt
artifacts:
- path: GoldenCheetah_v3.6-DEV_x64.exe
name: GCinstaller
- path: GCversionWindows.txt
name: GCversionWindows
deploy:
# deploy continuous builds to s3
- provider: S3
access_key_id:
secure: RoEkfKfOnF7JHOiLZX5qfZM08X+bu4oaDzzSKgdooNM=
secret_access_key:
secure: GPAArawatirYwgpHJBthdrbvyFU5bBzPOdK7VYYPiG2YHYi/DNJZ5Q5qGK1A440p
bucket: goldencheetah-binaries
region: us-east-1
remove_files: true
set_public: true
folder: Windows
artifact: GCinstaller, GCversionWindows
on:
PUBLISH_BINARIES: true
APPVEYOR_REPO_NAME: "GoldenCheetah/GoldenCheetah"

File diff suppressed because it is too large Load Diff

19
contrib/kmeans/INFO Normal file
View File

@@ -0,0 +1,19 @@
NOTE
The sources in this sub-directory including the LICENSE and README files
are imported with permission granted by the author (Greg Hamerly).
The original sources are available from Github here:
https://github.com/ghamerly/fast-kmeans
Whilst the original source implements multiple algorithms we only kept
the hamerly variant.
The source files have not been adapted to use Qt containers or to refactor
any of the class inheritance. So updating to newer versions should be
very straightforward (although the base functionality and performance is
good enough).
Usage in Qt applications will likely use the Kmeans wrapper class
28/09/2021

22
contrib/kmeans/LICENSE Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014 Greg Hamerly
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,15 @@
# doesn't work now since the source has been placed in a subdir
# left for info and fairly trivial to fixup if you want to work
# directly with the original sources
OBJECTS=kmeans_dataset.o \
general_functions.o \
hamerly_kmeans.o \
kmeans.o \
original_space_kmeans.o \
triangle_inequality_base_kmeans.o \
driver-standalone.o
driver-standalone: $(OBJECTS)
gcc -o $@ $(OBJECTS) -lstdc++ -lm
./driver-standalone hamerly smallDataset.txt 4 centers

106
contrib/kmeans/README Normal file
View File

@@ -0,0 +1,106 @@
===============================
Fast K-means Clustering Toolkit
===============================
----------------------
Version 0.1 (Sat May 17 17:41:11 CDT 2014)
- Initial release.
----------------------
WHAT:
This software is a testbed for comparing variants of Lloyd's k-means clustering
algorithm. It includes implementations of several algorithms that accelerate
the algorithm by avoiding unnecessary distance calculations.
----------------------
WHO:
Greg Hamerly (hamerly@cs.baylor.edu, primary contact) and Jonathan Drake
(drakej@hp.com).
----------------------
HOW TO BUILD THE SOFTWARE:
type "make" (and hope for the best)
----------------------
HOW TO RUN THE SOFTWARE:
The driver is designed to take commands from standard input, usually a file
that's been redirected as input:
./kmeans < commands.txt
You can read the source to find all the possible commands, but here is a
summary:
- threads T -- use T threads for clustering
- maxiterations I -- use at most I iterations; default (or negative)
indicates an unlimited number
- dataset D -- use the given path name to a file as the dataset for
clustering. The dataset should have a first line with the number of points
n and dimension d. The next (nd) tokens are taken as the n vectors
to cluster.
- initialize k {kpp|random} -- use the given method (k-means++ or a random
sample of the points) to initialize k centers
- lloyd, hamerly, annulus, elkan, compare, sort, heap, adaptive -- perform
k-means clustering with the given algorithm (requires first having
initialized the centers). The adaptive algorithm is Drake's algorithm with
a heuristic for choosing an initial B
- drake B -- use Drake's algorithm with B lower bounds
- kernel [gaussian T | linear | polynomial P] -- use kernelized k-means with
the given kernel
- elkan_kernel [gaussian T | linear | polynomial P] -- use kernelized
k-means with the given kernel, and Elkan's accelerations
- center -- give the previously-loaded dataset a mean of 0.
- quit -- quit the program
Note that when a set of centers is initialized, that same set of centers is used
from then on (until a new initialization occurs). So running a clustering
algorithm multiple times will use the same initialization each time.
Here is an example of a simple set of commands:
dataset smallDataset.txt
initialize 10 kpp
annulus
hamerly
adaptive
heap
elkan
sort
compare
----------------------
CAVEATS:
- This software has been developed and tested on Linux. Other platforms may not
work. Please let us know if you have difficulties, and if possible fixes for
the code.
- This software uses a non-standard pthreads function called
pthread_barrier_wait(), which is implemented on Linux but not on OSX.
Therefore, multithreading doesn't currently work on OSX. To turn it off,
comment out the lines in the Makefile that say:
CPPFLAGS += -DUSE_THREADS
LDFLAGS += -lpthread
----------------------
REFERENCES:
Phillips, Steven J. "Acceleration of k-means and related clustering algorithms."
In Algorithm Engineering and Experiments, pp. 166-177. Springer Berlin
Heidelberg, 2002.
Elkan, Charles. "Using the triangle inequality to accelerate k-means." In ICML,
vol. 3, pp. 147-153. 2003.
Hamerly, Greg. "Making k-means Even Faster." In SDM, pp. 130-140. 2010.
Drake, Jonathan, and Greg Hamerly. "Accelerated k-means with adaptive distance
bounds." In 5th NIPS Workshop on Optimization for Machine Learning. 2012.
Drake, Jonathan. "Faster k-means clustering." MS thesis, 2013.
Hamerly, Greg, and Jonathan Drake. "Accelerating Lloyd's algorithm for k-means
clustering." To appear in Partitional Clustering Algorithms, Springer, 2014.

View File

@@ -0,0 +1,70 @@
#include <iostream>
#include <fstream>
#include <string>
#include <cassert>
#include "kmeans/general_functions.h"
#include "kmeans/kmeans.h"
#include "dataset.h"
#include "hamerly_kmeans.h"
Dataset *load_dataset(std::string const &filename) {
std::ifstream input(filename.c_str());
int n, d;
input >> n >> d;
Dataset *x = new Dataset(n, d);
for (int i = 0; i < n * d; ++i) input >> x->data[i];
return x;
}
Kmeans *get_algorithm(std::string const &name) {
if (name == "hamerly") return new HamerlyKmeans();
return NULL;
}
int main(int argc, char **argv) {
if (argc != 5) {
std::cout << "usage: " << argv[0] << " algorithm dataset k [centers|assignment]\n";
return 1;
}
std::string algorithm_name(argv[1]);
std::string filename(argv[2]);
int k = std::stoi(argv[3]);
std::string output(argv[4]);
Dataset *x = load_dataset(filename);
Kmeans *algorithm = get_algorithm(algorithm_name);
Dataset *initialCenters = init_centers_kmeanspp_v2(*x, k);
unsigned short *assignment = new unsigned short[x->n];
assign(*x, *initialCenters, assignment);
algorithm->initialize(x, k, assignment, 1);
algorithm->run(10000);
Dataset const *finalCenters = algorithm->getCenters();
if (output == "centers") {
finalCenters->print();
} else {
assign(*x, *finalCenters, assignment);
for (int i = 0; i < x->n; ++i) {
std::cout << assignment[i] << "\n";
}
}
delete x;
delete algorithm;
delete initialCenters;
delete [] assignment;
return 0;
}

View File

@@ -0,0 +1,179 @@
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*/
#include "hamerly_kmeans.h"
#include "kmeans_general_functions.h"
#include <cmath>
#include <algorithm>
/* Hamerly's algorithm that is a 'simplification' of Elkan's, in that it keeps
* the following bounds:
* - One upper bound per clustered record on the distance between the record
* and its closest center. It is always greater than or equal to the true
* distance between the record and its closest center. This is the same as in
* Elkan's algorithm.
* - *One* lower bound per clustered record on the distance between the record
* and its *second*-closest center. It is always less than or equal to the
* true distance between the record and its second closest center. This is
* different information than Elkan's algorithm -- his algorithm keeps k
* lower bounds for each record, for a total of (n*k) lower bounds.
*
* The basic ideas are:
* - when lower(x) <= upper(x), we need to recalculate the closest centers for
* the record x, and reset lower(x) and upper(x) to their boundary values
* - whenever a center moves
* - calculate the distance it moves 'd'
* - for each record x assigned to that center, update its upper bound
* - upper(x) = upper(x) + d
* - after each iteration
* - find the center that has moved the most (with distance 'd')
* - update the lower bound for all (?) records:
* - lower(x) = lower(x) - d
*
* Parameters:
* - threadId: the index of the thread that is running
* - maxIterations: a bound on the number of iterations to perform
*
* Return value: the number of iterations performed (always at least 1)
*/
// this version only updates center locations when necessary
int HamerlyKmeans::runThread(int threadId, int maxIterations) {
int iterations = 0;
int startNdx = start(threadId);
int endNdx = end(threadId);
while ((iterations < maxIterations) && ! converged) {
++iterations;
// compute the inter-center distances, keeping only the closest distances
update_s(threadId);
synchronizeAllThreads();
// loop over all records
for (int i = startNdx; i < endNdx; ++i) {
unsigned short closest = assignment[i];
// if upper[i] is less than the greater of these two, then we can
// ignore record i
double upper_comparison_bound = std::max(s[closest], lower[i]);
// first check: if u(x) <= s(c(x)) or u(x) <= lower(x), then ignore
// x, because its closest center must still be closest
if (upper[i] <= upper_comparison_bound) {
continue;
}
// otherwise, compute the real distance between this record and its
// closest center, and update upper
double u2 = pointCenterDist2(i, closest);
upper[i] = sqrt(u2);
// if (u(x) <= s(c(x))) or (u(x) <= lower(x)), then ignore x
if (upper[i] <= upper_comparison_bound) {
continue;
}
// now update the lower bound by looking at all other centers
double l2 = std::numeric_limits<double>::max(); // the squared lower bound
for (int j = 0; j < k; ++j) {
if (j == closest) { continue; }
double dist2 = pointCenterDist2(i, j);
if (dist2 < u2) {
// another center is closer than the current assignment
// change the lower bound to be the current upper bound
// (since the current upper bound is the distance to the
// now-second-closest known center)
l2 = u2;
// adjust the upper bound and the current assignment
u2 = dist2;
closest = j;
} else if (dist2 < l2) {
// we must reduce the lower bound on the distance to the
// *second* closest center to x[i]
l2 = dist2;
}
}
// we have been dealing in squared distances; need to convert
lower[i] = sqrt(l2);
// if the assignment for i has changed, then adjust the counts and
// locations of each center's accumulated mass
if (assignment[i] != closest) {
upper[i] = sqrt(u2);
changeAssignment(i, closest, threadId);
}
}
verifyAssignment(iterations, startNdx, endNdx);
// ELKAN 4, 5, AND 6
// calculate the new center locations
synchronizeAllThreads();
if (threadId == 0) {
int furthestMovingCenter = move_centers();
converged = (0.0 == centerMovement[furthestMovingCenter]);
}
synchronizeAllThreads();
if (! converged) {
update_bounds(startNdx, endNdx);
}
synchronizeAllThreads();
}
return iterations;
}
/* This method does the following:
* - finds the furthest-moving center
* - finds the distances moved by the two furthest-moving centers
* - updates the upper/lower bounds for each record
*
* Parameters:
* - startNdx: the first index of the dataset this thread is responsible for
* - endNdx: one past the last index of the dataset this thread is responsible for
*/
void HamerlyKmeans::update_bounds(int startNdx, int endNdx) {
double longest = centerMovement[0], secondLongest = (1 < k) ? centerMovement[1] : centerMovement[0];
int furthestMovingCenter = 0;
if (longest < secondLongest) {
furthestMovingCenter = 1;
std::swap(longest, secondLongest);
}
for (int j = 2; j < k; ++j) {
if (longest < centerMovement[j]) {
secondLongest = longest;
longest = centerMovement[j];
furthestMovingCenter = j;
} else if (secondLongest < centerMovement[j]) {
secondLongest = centerMovement[j];
}
}
// update upper/lower bounds
for (int i = startNdx; i < endNdx; ++i) {
// the upper bound increases by the amount that its center moved
upper[i] += centerMovement[assignment[i]];
// The lower bound decreases by the maximum amount that any center
// moved, unless the furthest-moving center is the one it's assigned
// to. In the latter case, the lower bound decreases by the amount
// of the second-furthest-moving center.
lower[i] -= (assignment[i] == furthestMovingCenter) ? secondLongest : longest;
}
}

View File

@@ -0,0 +1,29 @@
#ifndef HAMERLY_KMEANS_H
#define HAMERLY_KMEANS_H
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*
* HamerlyKmeans implements Hamerly's k-means algorithm that uses one lower
* bound per point.
*/
#include "triangle_inequality_base_kmeans.h"
class HamerlyKmeans : public TriangleInequalityBaseKmeans {
public:
HamerlyKmeans() { numLowerBounds = 1; }
virtual ~HamerlyKmeans() { free(); }
virtual std::string getName() const { return "hamerly"; }
protected:
// Update the upper and lower bounds for the given range of points.
void update_bounds(int startNdx, int endNdx);
virtual int runThread(int threadId, int maxIterations);
};
#endif

165
contrib/kmeans/kmeans.cpp Normal file
View File

@@ -0,0 +1,165 @@
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*/
#include "kmeans.h"
#include "kmeans_general_functions.h"
#include <cassert>
#include <cmath>
Kmeans::Kmeans() : x(NULL), n(0), k(0), d(0), numThreads(0), converged(false),
clusterSize(NULL), centerMovement(NULL), assignment(NULL) {
#ifdef COUNT_DISTANCES
numDistances = 0;
#endif
}
void Kmeans::free() {
delete [] centerMovement;
for (int t = 0; t < numThreads; ++t) {
delete [] clusterSize[t];
}
delete [] clusterSize;
centerMovement = NULL;
clusterSize = NULL;
assignment = NULL;
n = k = d = numThreads = 0;
}
void Kmeans::initialize(Dataset const *aX, unsigned short aK, unsigned short *initialAssignment, int aNumThreads) {
free();
converged = false;
x = aX;
n = x->n;
d = x->d;
k = aK;
#ifdef USE_THREADS
numThreads = aNumThreads;
pthread_barrier_init(&barrier, NULL, numThreads);
#else
numThreads = 1;
#endif
assignment = initialAssignment;
centerMovement = new double[k];
clusterSize = new int *[numThreads];
for (int t = 0; t < numThreads; ++t) {
clusterSize[t] = new int[k];
std::fill(clusterSize[t], clusterSize[t] + k, 0);
for (int i = start(t); i < end(t); ++i) {
assert(assignment[i] < k);
++clusterSize[t][assignment[i]];
}
}
#ifdef COUNT_DISTANCES
numDistances = 0;
#endif
}
void Kmeans::changeAssignment(int xIndex, int closestCluster, int threadId) {
--clusterSize[threadId][assignment[xIndex]];
++clusterSize[threadId][closestCluster];
assignment[xIndex] = closestCluster;
}
#ifdef USE_THREADS
struct ThreadInfo {
public:
ThreadInfo() : km(NULL), threadId(0), pthread_id(0) {}
Kmeans *km;
int threadId;
pthread_t pthread_id;
int numIterations;
int maxIterations;
};
#endif
void *Kmeans::runner(void *args) {
#ifdef USE_THREADS
ThreadInfo *ti = (ThreadInfo *)args;
ti->numIterations = ti->km->runThread(ti->threadId, ti->maxIterations);
#endif
return NULL;
}
int Kmeans::run(int maxIterations) {
int iterations = 0;
#ifdef USE_THREADS
{
ThreadInfo *info = new ThreadInfo[numThreads];
for (int t = 0; t < numThreads; ++t) {
info[t].km = this;
info[t].threadId = t;
info[t].maxIterations = maxIterations;
pthread_create(&info[t].pthread_id, NULL, Kmeans::runner, &info[t]);
}
// wait for everything to finish...
for (int t = 0; t < numThreads; ++t) {
pthread_join(info[t].pthread_id, NULL);
}
iterations = info[0].numIterations;
delete [] info;
}
#else
{
iterations = runThread(0, maxIterations);
}
#endif
return iterations;
}
double Kmeans::getSSE() const {
double sse = 0.0;
for (int i = 0; i < n; ++i) {
sse += pointCenterDist2(i, assignment[i]);
}
return sse;
}
void Kmeans::verifyAssignment(int iteration, int startNdx, int endNdx) const {
#ifdef VERIFY_ASSIGNMENTS
for (int i = startNdx; i < endNdx; ++i) {
// keep track of the squared distance and identity of the closest-seen
// cluster (so far)
int closest = assignment[i];
double closest_dist2 = pointCenterDist2(i, closest);
double original_closest_dist2 = closest_dist2;
// look at all centers
for (int j = 0; j < k; ++j) {
if (j == closest) {
continue;
}
double d2 = pointCenterDist2(i, j);
// determine if we found a closer center
if (d2 < closest_dist2) {
closest = j;
closest_dist2 = d2;
}
}
// if we have found a discrepancy, then print out information and crash
// the program
if (closest != assignment[i]) {
std::cerr << "assignment error:" << std::endl;
std::cerr << "iteration = " << iteration << std::endl;
std::cerr << "point index = " << i << std::endl;
std::cerr << "closest center = " << closest << std::endl;
std::cerr << "closest center dist2 = " << closest_dist2 << std::endl;
std::cerr << "assigned center = " << assignment[i] << std::endl;
std::cerr << "assigned center dist2 = " << original_closest_dist2 << std::endl;
assert(false);
}
}
#endif
}

147
contrib/kmeans/kmeans.h Normal file
View File

@@ -0,0 +1,147 @@
#ifndef KMEANS_H
#define KMEANS_H
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*
* Kmeans is an abstract base class for algorithms which implement Lloyd's
* k-means algorithm. Subclasses provide functionality in the "runThread()"
* method.
*/
#include "kmeans_dataset.h"
#include <limits>
#include <string>
#ifdef USE_THREADS
#include <pthread.h>
#endif
class Kmeans {
public:
// Construct a K-means object to operate on the given dataset
Kmeans();
virtual ~Kmeans() { free(); }
// This method kicks off the threads that do the clustering and run
// until convergence (or until reaching maxIterations). It returns the
// number of iterations performed.
int run(int aMaxIterations = std::numeric_limits<int>::max());
// Get the cluster assignment for the given point index.
int getAssignment(int xIndex) const { return assignment[xIndex]; }
// Initialize the algorithm at the beginning of the run(), with the
// given data and initial assignment. The parameter initialAssignment
// will be modified by this algorithm and will at the end contain the
// final assignment of clusters.
virtual void initialize(Dataset const *aX, unsigned short aK, unsigned short *initialAssignment, int aNumThreads);
// Free all memory being used by the object.
virtual void free();
// This method verifies that the current assignment is correct, by
// checking every point-center distance. For debugging.
virtual void verifyAssignment(int iteration, int startNdx, int endNdx) const;
// Compute the sum of squared errors for the data on the centers (not
// designed to be fast).
virtual double getSSE() const;
// Get the name of this clustering algorithm (to be overridden by
// subclasses).
virtual std::string getName() const = 0;
// Virtual methods for computing inner products (depending on the kernel
// being used, e.g.). For vanilla k-means these will be the standard dot
// product; for more exotic applications these will be other kernel
// functions.
virtual double pointPointInnerProduct(int x1, int x2) const = 0;
virtual double pointCenterInnerProduct(int xndx, unsigned short cndx) const = 0;
virtual double centerCenterInnerProduct(unsigned short c1, unsigned short c2) const = 0;
// Use the inner products to compute squared distances between a point
// and center.
virtual double pointCenterDist2(int x1, unsigned short cndx) const {
#ifdef COUNT_DISTANCES
++numDistances;
#endif
return pointPointInnerProduct(x1, x1) - 2 * pointCenterInnerProduct(x1, cndx) + centerCenterInnerProduct(cndx, cndx);
}
// Use the inner products to compute squared distances between two
// centers.
virtual double centerCenterDist2(unsigned short c1, unsigned short c2) const {
#ifdef COUNT_DISTANCES
++numDistances;
#endif
return centerCenterInnerProduct(c1, c1) - 2 * centerCenterInnerProduct(c1, c2) + centerCenterInnerProduct(c2, c2);
}
#ifdef COUNT_DISTANCES
#ifdef USE_THREADS
// Note: numDistances is NOT thread-safe, but it is not meant to be
// enabled in performant code.
#error Counting distances and using multiple threads is not supported.
#endif
mutable long long numDistances;
#endif
virtual Dataset const *getCenters() const { return NULL; }
protected:
// The dataset to cluster.
const Dataset *x;
// Local copies for convenience.
int n, k, d;
// Pthread primitives for multithreading.
int numThreads;
#ifdef USE_THREADS
pthread_barrier_t barrier;
#endif
// To communicate (to all threads) that we have converged.
bool converged;
// Keep track of how many points are in each cluster, divided over each
// thread.
int **clusterSize;
// centerMovement is computed in move_centers() and used to detect
// convergence (if max(centerMovement) == 0.0) and update point-center
// distance bounds (in subclasses that use them).
double *centerMovement;
// For each point in x, keep which cluster it is assigned to. By using a
// short, we assume a limited number of clusters (fewer than 2^16).
unsigned short *assignment;
// This is where each thread does its work.
virtual int runThread(int threadId, int maxIterations) = 0;
// Static entry method for pthread_create().
static void *runner(void *args);
// Assign point at xIndex to cluster newCluster, working within thread threadId.
virtual void changeAssignment(int xIndex, int newCluster, int threadId);
// Over what range in [0, n) does this thread have ownership of the
// points? end() returns one past the last owned point.
int start(int threadId) const { return n * threadId / numThreads; }
int end(int threadId) const { return start(threadId + 1); }
int whichThread(int index) const { return index * numThreads / n; }
// Convenience method for causing all threads to synchronize.
void synchronizeAllThreads() {
#ifdef USE_THREADS
pthread_barrier_wait(&barrier);
#endif
}
};
#endif

View File

@@ -0,0 +1,95 @@
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*/
#include "kmeans_dataset.h"
// #include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
// print the dataset to standard output (cout), using formatting to keep the
// data in matrix format
void Dataset::print(std::ostream &out) const {
//std::ostream &out = std::cout;
out.precision(6);
int ndx = 0;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < d; ++j) {
out << std::setw(13) << data[ndx++] << " ";
}
out << std::endl;
}
}
// returns a (modifiable) reference to the value in dimension "dim" from record
// "ndx"
double &Dataset::operator()(int ndx, int dim) {
# ifdef DEBUG
assert(ndx < n);
assert(dim < d);
# endif
return data[ndx * d + dim];
}
// returns a (const) reference to the value in dimension "dim" from record "ndx"
const double &Dataset::operator()(int ndx, int dim) const {
# ifdef DEBUG
assert(ndx < n);
assert(dim < d);
# endif
return data[ndx * d + dim];
}
// fill the entire dataset with value. Does NOT update sumDataSquared.
void Dataset::fill(double value) {
for (int i = 0; i < nd; ++i) {
data[i] = value;
}
}
// copy constructor -- makes a deep copy of everything in x
Dataset::Dataset(Dataset const &x) {
n = d = nd = 0;
data = sumDataSquared = NULL;
*this = x;
}
// operator= is the standard deep-copy assignment operator, which
// returns a const reference to *this.
Dataset const &Dataset::operator=(Dataset const &x) {
if (this != &x) {
// reallocate sumDataSquared and data as necessary
if (n != x.n) {
delete [] sumDataSquared;
sumDataSquared = x.sumDataSquared ? new double[x.n] : NULL;
}
if (nd != x.nd) {
delete [] data;
data = x.data ? new double[x.nd] : NULL;
}
// reflect the new sizes
n = x.n;
d = x.d;
nd = x.nd;
// copy data as appropriate
if (x.sumDataSquared) {
memcpy(sumDataSquared, x.sumDataSquared, x.n * sizeof(double));
}
if (x.data) {
memcpy(data, x.data, x.nd * sizeof(double));
}
}
// return a reference for chaining assignments
return *this;
}

View File

@@ -0,0 +1,85 @@
#ifndef DATASET_H
#define DATASET_H
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*
* A Dataset class represents a collection of multidimensional records, as is
* typical in metric machine learning. Every record has the same number of
* dimensions (values), and every value must be numeric. Undefined values are
* not allowed.
*
* This particular implementation keeps all the data in a 1-dimensional array,
* and also optionally keeps extra storage for the sum of the squared values of
* each record. However, the Dataset class does NOT automatically populate or
* update the sumDataSquared values.
*/
#include <cstddef>
#include <iostream>
class Dataset {
public:
// default constructor -- constructs a completely empty dataset with no
// records
Dataset() : n(0), d(0), nd(0), data(NULL), sumDataSquared(NULL) {}
// construct a dataset of a particular size, and determine whether to
// keep the sumDataSquared
Dataset(int aN, int aD, bool keepSDS = false) : n(aN), d(aD), nd(n * d),
data(new double[nd]),
sumDataSquared(keepSDS ? new double[n] : NULL) {}
// copy constructor -- makes a deep copy of everything in x
Dataset(Dataset const &x);
// destroys the dataset safely
~Dataset() {
n = d = nd = 0;
double *dp = data, *sdsp = sumDataSquared;
data = sumDataSquared = NULL;
delete [] dp;
delete [] sdsp;
}
// operator= is the standard deep-copy assignment operator, which
// returns a const reference to *this.
Dataset const &operator=(Dataset const &x);
// allows modification of the record ndx and dimension dim
double &operator()(int ndx, int dim);
// allows const access to record ndx and dimension dim
const double &operator()(int ndx, int dim) const;
// fill the entire dataset with value. Does NOT update sumDataSquared.
void fill(double value);
// print the dataset to standard output (cout), using formatting to keep the
// data in matrix format
void print(std::ostream &out = std::cout) const;
// n represents the number of records
// d represents the dimension
// nd is a shortcut for the value n * d
int n, d, nd;
// data is an array of length n*d that stores all of the records in
// record-major (row-major) order. Thus data[0]...data[d-1] are the
// values associated with the first record.
double *data;
// sumDataSquared is an (optional) sum of squared values for every
// record. Thus,
// sumDataSquared[0] = data[0]^2 + data[1]^2 + ... + data[d-1]^2
// sumDataSquared[1] = data[d]^2 + data[d+1]^2 + ... + data[2*d-1]^2
// and so on. Note that this is the *intended* use of the sumDataSquared
// field, but that the Dataset class does NOT automatically populate or
// update the values in sumDataSquared.
double *sumDataSquared;
};
#endif

View File

@@ -0,0 +1,256 @@
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*/
#include "kmeans_dataset.h"
#include "kmeans.h"
#include "kmeans_general_functions.h"
#include <cassert>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <cstring>
#include <cstdio>
void addVectors(double *a, double const *b, int d) {
double const *end = a + d;
while (a < end) {
*(a++) += *(b++);
}
}
void subVectors(double *a, double const *b, int d) {
double const *end = a + d;
while (a < end) {
*(a++) -= *(b++);
}
}
double distance2silent(double const *a, double const *b, int d) {
double d2 = 0.0, diff;
double const *end = a + d; // one past the last valid entry in a
while (a < end) {
diff = *(a++) - *(b++);
d2 += diff * diff;
}
return d2;
}
void centerDataset(Dataset *x) {
double *xCentroid = new double[x->d];
for (int d = 0; d < x->d; ++d) {
xCentroid[d] = 0.0;
}
for (int i = 0; i < x->n; ++i) {
addVectors(xCentroid, x->data + i * x->d, x->d);
}
// compute average (divide by n)
for (int d = 0; d < x->d; ++d) {
xCentroid[d] /= x->n;
}
// re-center the dataset
const double *xEnd = x->data + x->n * x->d;
for (double *xp = x->data; xp != xEnd; xp += x->d) {
subVectors(xp, xCentroid, x->d);
}
delete [] xCentroid;
}
Dataset *init_centers(Dataset const &x, unsigned short k) {
int *chosen_pts = new int[k];
Dataset *c = new Dataset(k, x.d);
for (int i = 0; i < k; ++i) {
bool acceptable = true;
do {
acceptable = true;
chosen_pts[i] = rand() % x.n;
for (int j = 0; j < i; ++j) {
if (chosen_pts[i] == chosen_pts[j]) {
acceptable = false;
break;
}
}
} while (! acceptable);
double *cdp = c->data + i * x.d;
memcpy(cdp, x.data + chosen_pts[i] * x.d, sizeof(double) * x.d);
if (c->sumDataSquared) {
c->sumDataSquared[i] = std::inner_product(cdp, cdp + x.d, cdp, 0.0);
}
}
delete [] chosen_pts;
return c;
}
Dataset *init_centers_kmeanspp(Dataset const &x, unsigned short k) {
int *chosen_pts = new int[k];
std::pair<double, int> *dist2 = new std::pair<double, int>[x.n];
double *distribution = new double[x.n];
// initialize dist2
for (int i = 0; i < x.n; ++i) {
dist2[i].first = std::numeric_limits<double>::max();
dist2[i].second = i;
}
// choose the first point randomly
int ndx = 1;
chosen_pts[ndx - 1] = rand() % x.n;
while (ndx < k) {
double sum_distribution = 0.0;
// look for the point that is furthest from any center
for (int i = 0; i < x.n; ++i) {
int example = dist2[i].second;
double d2 = 0.0, diff;
for (int j = 0; j < x.d; ++j) {
diff = x(example,j) - x(chosen_pts[ndx - 1],j);
d2 += diff * diff;
}
if (d2 < dist2[i].first) {
dist2[i].first = d2;
}
sum_distribution += dist2[i].first;
}
// sort the examples by their distance from centers
sort(dist2, dist2 + x.n);
// turn distribution into a CDF
distribution[0] = dist2[0].first / sum_distribution;
for (int i = 1; i < x.n; ++i) {
distribution[i] = distribution[i - 1] + dist2[i].first / sum_distribution;
}
// choose a random interval according to the new distribution
double r = (double)rand() / (double)RAND_MAX;
double *new_center_ptr = std::lower_bound(distribution, distribution + x.n, r);
int distribution_ndx = (int)(new_center_ptr - distribution);
chosen_pts[ndx] = dist2[distribution_ndx].second;
/*
cout << "chose " << distribution_ndx << " which is actually "
<< chosen_pts[ndx] << " with distance "
<< dist2[distribution_ndx].first << std::endl;
*/
++ndx;
}
Dataset *c = new Dataset(k, x.d);
for (int i = 0; i < k; ++i) {
double *cdp = c->data + i * x.d;
memcpy(cdp, x.data + chosen_pts[i] * x.d, sizeof(double) * x.d);
if (c->sumDataSquared) {
c->sumDataSquared[i] = std::inner_product(cdp, cdp + x.d, cdp, 0.0);
}
}
delete [] chosen_pts;
delete [] dist2;
delete [] distribution;
return c;
}
Dataset *init_centers_kmeanspp_v2(Dataset const &x, unsigned short k) {
int *chosen_pts = new int[k];
std::pair<double, int> *dist2 = new std::pair<double, int>[x.n];
// initialize dist2
for (int i = 0; i < x.n; ++i) {
dist2[i].first = std::numeric_limits<double>::max();
dist2[i].second = i;
}
// choose the first point randomly
int ndx = 1;
chosen_pts[ndx - 1] = rand() % x.n;
while (ndx < k) {
double sum_distribution = 0.0;
// look for the point that is furthest from any center
double max_dist = 0.0;
for (int i = 0; i < x.n; ++i) {
int example = dist2[i].second;
double d2 = 0.0, diff;
for (int j = 0; j < x.d; ++j) {
diff = x(example,j) - x(chosen_pts[ndx - 1],j);
d2 += diff * diff;
}
if (d2 < dist2[i].first) {
dist2[i].first = d2;
}
if (dist2[i].first > max_dist) {
max_dist = dist2[i].first;
}
sum_distribution += dist2[i].first;
}
bool unique = true;
do {
// choose a random interval according to the new distribution
double r = sum_distribution * (double)rand() / (double)RAND_MAX;
double sum_cdf = dist2[0].first;
int cdf_ndx = 0;
while (sum_cdf < r) {
sum_cdf += dist2[++cdf_ndx].first;
}
chosen_pts[ndx] = cdf_ndx;
for (int i = 0; i < ndx; ++i) {
unique = unique && (chosen_pts[ndx] != chosen_pts[i]);
}
} while (! unique);
++ndx;
}
Dataset *c = new Dataset(k, x.d);
for (int i = 0; i < c->n; ++i) {
double *cdp = c->data + i * x.d;
memcpy(cdp, x.data + chosen_pts[i] * x.d, sizeof(double) * x.d);
if (c->sumDataSquared) {
c->sumDataSquared[i] = std::inner_product(cdp, cdp + x.d, cdp, 0.0);
}
}
delete [] chosen_pts;
delete [] dist2;
return c;
}
void kmeans_assign(Dataset const &x, Dataset const &c, unsigned short *assignment) {
for (int i = 0; i < x.n; ++i) {
double shortestDist2 = std::numeric_limits<double>::max();
int closest = 0;
for (int j = 0; j < c.n; ++j) {
double d2 = 0.0, *a = x.data + i * x.d, *b = c.data + j * x.d;
for (; a != x.data + (i + 1) * x.d; ++a, ++b) {
d2 += (*a - *b) * (*a - *b);
}
if (d2 < shortestDist2) {
shortestDist2 = d2;
closest = j;
}
}
assignment[i] = closest;
}
}

View File

@@ -0,0 +1,83 @@
#ifndef GENERAL_KMEANS_FUNCTIONS_H
#define GENERAL_KMEANS_FUNCTIONS_H
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*
* Generally useful functions.
*/
#include <iostream>
#include <string>
#include "kmeans_dataset.h"
/* Add together two vectors, and put the result in the first argument.
* Calculates a = a + b
*
* Parameters:
* a -- vector to add, and the result of the operation
* b -- vector to add to a
* d -- the dimension
* Return value: none
*/
void addVectors(double *a, double const *b, int d);
/* Subtract two vectors, and put the result in the first argument. Calculates
* a = a - b
*
* Parameters:
* a -- vector to subtract from, and the result of the operation
* b -- vector to subtract
* d -- the dimension
* Return value: none
*/
void subVectors(double *a, double const *b, int d);
/* Initialize the centers randomly. Choose random records from x as the initial
* values for the centers. Assumes that c uses the sumDataSquared field.
*
* Parameters:
* x -- records that are being clustered (n * d)
* c -- centers to be initialized. Should be pre-allocated with the number of
* centers desired, and dimension.
* Return value: none
*/
Dataset *init_centers(Dataset const &x, unsigned short k);
/* Initialize the centers randomly using K-means++.
*
* Parameters:
* x -- records that are being clustered (n * d)
* c -- centers to be initialized. Should be pre-allocated with the number of
* centers desired, and dimension.
* Return value: none
*/
Dataset *init_centers_kmeanspp(Dataset const &x, unsigned short k);
Dataset *init_centers_kmeanspp_v2(Dataset const &x, unsigned short k);
/* Print an array (templated). Convenience function.
*
* Parameters:
* arr -- the array to print
* length -- the length of the array
* separator -- the string to put between each pair of printed elements
* Return value: none
*/
template <class T>
void printArray(T const *arr, int length, std::string separator) {
for (int i = 0; i < length; ++i) {
if (i > 0) {
std::cout << separator;
}
std::cout << arr[i];
}
}
void centerDataset(Dataset *x);
void kmeans_assign(Dataset const &x, Dataset const &c, unsigned short *assignment);
#endif

View File

@@ -0,0 +1,106 @@
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*/
#include "original_space_kmeans.h"
#include "kmeans_general_functions.h"
#include <cmath>
#include <cassert>
#include <numeric>
OriginalSpaceKmeans::OriginalSpaceKmeans() : centers(NULL), sumNewCenters(NULL) { }
void OriginalSpaceKmeans::free() {
for (int t = 0; t < numThreads; ++t) {
delete sumNewCenters[t];
}
Kmeans::free();
delete centers;
delete [] sumNewCenters;
centers = NULL;
sumNewCenters = NULL;
}
/* This method moves the newCenters to their new locations, based on the
* sufficient statistics in sumNewCenters. It also computes the centerMovement
* and the center that moved the furthest.
*
* Parameters: none
*
* Return value: index of the furthest-moving centers
*/
int OriginalSpaceKmeans::move_centers() {
int furthestMovingCenter = 0;
for (int j = 0; j < k; ++j) {
centerMovement[j] = 0.0;
int totalClusterSize = 0;
for (int t = 0; t < numThreads; ++t) {
totalClusterSize += clusterSize[t][j];
}
if (totalClusterSize > 0) {
for (int dim = 0; dim < d; ++dim) {
double z = 0.0;
for (int t = 0; t < numThreads; ++t) {
z += (*sumNewCenters[t])(j,dim);
}
z /= totalClusterSize;
centerMovement[j] += (z - (*centers)(j, dim)) * (z - (*centers)(j, dim));
(*centers)(j, dim) = z;
}
}
centerMovement[j] = sqrt(centerMovement[j]);
if (centerMovement[furthestMovingCenter] < centerMovement[j]) {
furthestMovingCenter = j;
}
}
#ifdef COUNT_DISTANCES
numDistances += k;
#endif
return furthestMovingCenter;
}
void OriginalSpaceKmeans::initialize(Dataset const *aX, unsigned short aK, unsigned short *initialAssignment, int aNumThreads) {
Kmeans::initialize(aX, aK, initialAssignment, aNumThreads);
centers = new Dataset(k, d);
sumNewCenters = new Dataset *[numThreads];
centers->fill(0.0);
for (int t = 0; t < numThreads; ++t) {
sumNewCenters[t] = new Dataset(k, d, false);
sumNewCenters[t]->fill(0.0);
for (int i = start(t); i < end(t); ++i) {
addVectors(sumNewCenters[t]->data + assignment[i] * d, x->data + i * d, d);
}
}
// put the centers at their initial locations, based on clusterSize and
// sumNewCenters
move_centers();
}
void OriginalSpaceKmeans::changeAssignment(int xIndex, int closestCluster, int threadId) {
unsigned short oldAssignment = assignment[xIndex];
Kmeans::changeAssignment(xIndex, closestCluster, threadId);
double *xp = x->data + xIndex * d;
subVectors(sumNewCenters[threadId]->data + oldAssignment * d, xp, d);
addVectors(sumNewCenters[threadId]->data + closestCluster * d, xp, d);
}
double OriginalSpaceKmeans::pointPointInnerProduct(int x1, int x2) const {
return std::inner_product(x->data + x1 * d, x->data + (x1 + 1) * d, x->data + x2 * d, 0.0);
}
double OriginalSpaceKmeans::pointCenterInnerProduct(int xndx, unsigned short cndx) const {
return std::inner_product(x->data + xndx * d, x->data + (xndx + 1) * d, centers->data + cndx * d, 0.0);
}
double OriginalSpaceKmeans::centerCenterInnerProduct(unsigned short c1, unsigned short c2) const {
return std::inner_product(centers->data + c1 * d, centers->data + (c1 + 1) * d, centers->data + c2 * d, 0.0);
}

View File

@@ -0,0 +1,54 @@
#ifndef ORIGINAL_SPACE_KMEANS_H
#define ORIGINAL_SPACE_KMEANS_H
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*
* OriginalSpaceKmeans is a base class for other algorithms that operate in the
* same space as the data being clustered (as opposed to kernelized k-means
* algorithms, which operate in kernel space).
*/
#include "kmeans.h"
/* Cluster with the cluster centers living in the original space (with the
* data). This is as opposed to a kernelized version of k-means, where the
* center points might not be explicitly represented. This is also an abstract
* class.
*/
class OriginalSpaceKmeans : public Kmeans {
public:
OriginalSpaceKmeans();
virtual ~OriginalSpaceKmeans() { free(); }
virtual void free();
virtual void initialize(Dataset const *aX, unsigned short aK, unsigned short *initialAssignment, int aNumThreads);
virtual double pointPointInnerProduct(int x1ndx, int x2ndx) const;
virtual double pointCenterInnerProduct(int xndx, unsigned short cndx) const;
virtual double centerCenterInnerProduct(unsigned short c1ndx, unsigned short c2ndx) const;
virtual Dataset const *getCenters() const { return centers; }
protected:
// Move the centers to the average of their current assigned points,
// compute the distance moved by each center, and return the index of
// the furthest-moving center.
int move_centers();
virtual void changeAssignment(int xIndex, int closestCluster, int threadId);
// The set of centers we are operating on.
Dataset *centers;
// sumNewCenters and centerCount provide sufficient statistics to
// quickly calculate the changing locations of the centers. Whenever a
// point changes cluster membership, we subtract (add) it from (to) the
// row in sumNewCenters associated with its old (new) cluster. We also
// decrement (increment) centerCount for the old (new) cluster.
Dataset **sumNewCenters;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,79 @@
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*/
#include "triangle_inequality_base_kmeans.h"
#include "kmeans_general_functions.h"
#include <cassert>
#include <limits>
#include <cmath>
void TriangleInequalityBaseKmeans::free() {
OriginalSpaceKmeans::free();
delete [] s;
delete [] upper;
delete [] lower;
s = NULL;
upper = NULL;
lower = NULL;
}
/* This function computes the inter-center distances, keeping only the closest
* distances, and updates "s". After this, s[j] will contain the distance
* between center j and its closest other center, divided by two. The division
* here saves repeated work later, since we always will need the distance / 2.
*
* Parameters: none
*
* Return value: none
*/
// TODO: parallelize this
void TriangleInequalityBaseKmeans::update_s(int threadId) {
// initialize
for (int c1 = 0; c1 < k; ++c1) {
if (c1 % numThreads == threadId) {
s[c1] = std::numeric_limits<double>::max();
}
}
// compute inter-center squared distances between all pairs
for (int c1 = 0; c1 < k; ++c1) {
if (c1 % numThreads == threadId) {
for (int c2 = 0; c2 < k; ++c2) {
if (c2 == c1) {
continue;
}
double d2 = centerCenterDist2(c1, c2);
if (d2 < s[c1]) { s[c1] = d2; }
}
// take the root and divide by two
s[c1] = sqrt(s[c1]) / 2.0;
}
}
}
/* This function initializes the upper/lower bounds, assignment, centerCounts,
* and sumNewCenters. It sets the bounds to invalid values which will force the
* first iteration of k-means to set them correctly. NB: subclasses should set
* numLowerBounds appropriately before entering this function.
*
* Parameters: none
*
* Return value: none
*/
void TriangleInequalityBaseKmeans::initialize(Dataset const *aX, unsigned short aK, unsigned short *initialAssignment, int aNumThreads) {
OriginalSpaceKmeans::initialize(aX, aK, initialAssignment, aNumThreads);
s = new double[k];
upper = new double[n];
lower = new double[n * numLowerBounds];
// start with invalid bounds and assignments which will force the first
// iteration of k-means to do all its standard work
std::fill(s, s + k, 0.0);
std::fill(upper, upper + n, std::numeric_limits<double>::max());
std::fill(lower, lower + n * numLowerBounds, 0.0);
}

View File

@@ -0,0 +1,43 @@
#ifndef TRIANGLE_INEQUALITY_BASE_KMEANS_H
#define TRIANGLE_INEQUALITY_BASE_KMEANS_H
/* Authors: Greg Hamerly and Jonathan Drake
* Feedback: hamerly@cs.baylor.edu
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*
* This class is an abstract base class for several other algorithms that use
* upper & lower bounds to avoid distance calculations in k-means.
*/
#include "original_space_kmeans.h"
class TriangleInequalityBaseKmeans : public OriginalSpaceKmeans {
public:
TriangleInequalityBaseKmeans() : numLowerBounds(0), s(NULL), upper(NULL), lower(NULL) {}
virtual ~TriangleInequalityBaseKmeans() { free(); }
virtual void initialize(Dataset const *aX, unsigned short aK, unsigned short *initialAssignment, int aNumThreads);
virtual void free();
protected:
void update_s(int threadId);
// The number of lower bounds being used by this algorithm.
int numLowerBounds;
// Half the distance between each center and its closest other center.
double *s;
// One upper bound for each point on the distance between that point and
// its assigned (closest) center.
double *upper;
// Lower bound(s) for each point on the distance between that point and
// the centers being tracked for lower bounds, which may be 1 to k.
// Actual size is n * numLowerBounds.
double *lower;
};
#endif

View File

@@ -22,6 +22,11 @@
#endif
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#pragma GCC diagnostic ignored "-Wcpp"
#endif
/* precision-specific definitions */
#define LEVMAR_CHKJAC LM_ADD_PREFIX(levmar_chkjac)
#define LEVMAR_FDIF_FORW_JAC_APPROX LM_ADD_PREFIX(levmar_fdif_forw_jac_approx)
@@ -426,7 +431,7 @@ int info, rank, worksz, *iwork, iworksz;
static int LEVMAR_LUINVERSE(LM_REAL *A, LM_REAL *B, int m)
{
void *buf=NULL;
int buf_sz=0;
//int buf_sz=0;
register int i, j, k, l;
int *idx, maxi=-1, idx_sz, a_sz, x_sz, work_sz, tot_sz;
@@ -439,7 +444,7 @@ LM_REAL *a, *x, *work, max, sum, tmp;
work_sz=m;
tot_sz=(a_sz + x_sz + work_sz)*sizeof(LM_REAL) + idx_sz*sizeof(int); /* should be arranged in that order for proper doubles alignment */
buf_sz=tot_sz;
//buf_sz=tot_sz;
buf=(void *)malloc(tot_sz);
if(!buf){
fprintf(stderr, RCAT("memory allocation in ", LEVMAR_LUINVERSE) "() failed!\n");

View File

@@ -32,6 +32,7 @@ void lmcurve_evaluate(
const double *const par, const int m_dat, const void *const data,
double *const fvec, int *const info)
{
(void)(info);
for (int i = 0; i < m_dat; i++ )
fvec[i] =
((lmcurve_data_struct*)data)->y[i] -

View File

@@ -29,7 +29,7 @@ void QwtPlotGappedCurve::drawSeries(QPainter *painter, const QwtScaleMap &xMap,
return;
if (to < 0)
to = dataSize() - 1;
to = dataSize();
int i = from;
double last = 0;

Some files were not shown because too many files have changed in this diff Show More