.. when adding an overview chart it configures from a .gchart
file built in via application.qrc
.. to update the default config all the developer needs to do
is design using GC then export the .gchart into the
appropriate src/Resources/charts/file.gchart
.. NOTE: the exported file has an errant comma (,) after the
__LAST__ element. This is invalid JSON and should
be fixed. It needs to be removed manually right now
otherwise the JSON does not parse.
.. progressively boldens as you hover and overlays contents
to avoid taking screen real estate and being a distraction.
.. only watches mouse events and ignores wheel events since
these clash with chartspace scrolling.
Fixes#4006.
.. commit 91f2c46 introduced a regression where the selector
is not updated when the perspectives are changed (via
the manage/add perspective functions).
.. this was because resetPerspective() returned if the
athlete/view combination was last used to set the
selector -- we now override this, but only when the
perspectives config is changed.
.. datestring() was using 2 digit years and Overview data table
sorting only expected 4 digit years.
.. datestring() now uses 4 digit years in line with everywhere
else in the code.
.. data table sorting now supports 2 digit years and xx/xx/xx
style dates too (just in case).
.. slightly improved category labels on a bar chart when groupby
and date range is used. Labels for week, month and year are now
specific e.g. 23/5, May and 2021 labels are applied respectively.
.. axis settings updated to enable users to smooth and group by
for data series on the axis.
.. since group by needs to aggregate the series also have a new
config term to define the aggregation method (Average, Total,
Peak et al).
.. grouping and smoothing is applied in UserChart not the Generic
chart or plot, so this functionality will not be available from
Python and R charts (mostly because axis management and config
is done differently).
Fixes#3999.
It behaves as before: current view layout is discarded and default
layout with perspectives is fetched from goldencheetah.org first and,
if not available, baked in layout is used.
Website defaults are not updated yet, so baked in layouts are used now.
Renamed Resouces/xml/*-layout.xml files to Resources/xml/*-perspectives.xml
Removed deprecated Summary from Activities and Trends, and added default Overview to Trends
Added enclosing <Layouts></Layouts> and General perspective with proper type to each one
This provides default layouts for newly created athletes.
We still need to update layouts before release and to enable Reset Layout.
.. along the way renamed AthleteTab related methods in MainWindow
to reflect the last commit renaming the classes.
.. there are also a handful of fixups to SEGV when no ride is
selected in DataFilter (triggered by opening a second athlete
and switching to trends view, which need to recreate the athlete
switch bug that is also part of #3997).
.. and the logic to reset perspectives is changed in MainWindow
with a special method resetPerspective that is called everywhere
but will check the athlete/view combination has not already
been set (to avoid multiple passes).
.. multi-athlete and perspectives need better testing as there are
probably more SEGV in there, and if we fix them we could also
remove the requirement for the opening view to always be Analysis.
Fixes#3997.
.. Tab becomes AthleteTab - since Tab is almost meaningless
TabView becomes AbstractView - since its the base for all the views
there are no functional changes or fixes in this commit.
.. honour the sort order when refreshing (e.g. select new daterange or
a new activity).
.. thin line to separate headings from data to make easier to read.
.. by clicking the header column the user can toggle sorting of
the contents.
.. we try to infer the type of data in the column for sorting which
probably works 80/20, but is better than adding yet more of a
burden on the program that supplies the data.
.. add legacy program to analysis view for an interval table.
.. highlight row in data table when mouse hovers over a row, but
only when not using clickthru, since that already highlights
the row to indicate click is available.
intervals(symbol|name|start|stop|type|test|color|route|selected|date|filename [,start [,stop]])
returns a vector of values for the metric or field specified for each interval
if no start/stop is supplied it uses the currently selected date range, or activity when no date range.
intervalstring(symbol|name|start|stop|type|test|color|route|selected|date|filename [,start [,stop]])
same as intervals above but instead of returning a vector of numbers, the values
are converted to strings as appropriate for the metric (e.g. Pace_Rowing mm:ss/500m).
Both metricname and metricunit now support name, start, stop, type, test, color, route, selected, date, filename,
in addition to metric names and date, to get corresponding localized string.
Example program to build an intervals table in Activities displaying all intervals for selected activity,
similar to the one in RideSummary:
{
names {
metricname(name,
Duration,
Distance,
Pace,
xPace,
Average_Heart_Rate
);
}
units {
metricunit(name,
Duration,
Distance,
Pace,
xPace,
Average_Heart_Rate
);
}
values {
c(
intervalstrings(name),
intervalstrings(Duration),
intervalstrings(Distance),
intervalstrings(Pace),
intervalstrings(xPace),
intervalstrings(Average_Heart_Rate)
);
}
}
Fixes#3626
.. when embedding json in xml element attributes the string
decoding mangles results.
this is because of the way \ and " are handled at each
pass, causing combinations to be lost early when decoding.
This is largely a non-issue, except the user chart config
is stored in perspectives.xml and worse, when embedded on
an overview is encoded as .gcchart (xml) before being
encoded in the perspective.xml.
To avoid this issue, specifically with user charts and
to leave all other json string encoding and decoding
unaffected (e.g. ridefile.json) a new protect/unprotect
method has been introduced.
Utils::jsonprotect2() and Utils::jsonunprotect2() will
still decode older style encoding for backwards
compatibility, but now will translate \ and " in the
encoded string with :sl: and :qu:
This means that, for example, the following substitutions
will be made:
newline (\n) -> :sl:n
cr (\r) -> :sl:r
\ -> :sl:
" -> :qu:
If users add text with these characters (e.g. :sl:) then
it will be decoded to a slash, but it is highly unlikely
they will do this, and if they do, it should be harmless
as these text strings aren't part of the the datafilter
syntax.
Fixes#3996
.. since axis min and max values were not initialised the
visualisation would fail to refresh and was generally
unpredictable.
.. we now set initial values and check when updating.
.. activities("Workout_Code=\"FTP\"", metrics(BikeStress))
A new function that provides an activities filter
to apply as a closure to an expression, following the
same approach as the daterange() function.
In the example above metrics() will only return values where the
activity has a workout code "FTP".
.. unescape datafilter strings since the lexer supports that
but they are not parsed.
.. Only supports \n, \r and \" for now, but that should be
enough.
Formula doesn't change.
When date range is set Trends View is assumed and we use the sport of included
activities with default to Bike (Run for Pace) when mixed, and date is the end
date for the date range.
Otherwise we use activity sport and date as before.
.. click thru from the data row to the trends view to
view it on the activity view.
.. Added a function "f {}" that returns the activity
filenames- the same semantics used in the user chart.
.. the mechanism used in the overview items to click thru
from the itemPaint function is dropped and we now
do it from the mouse release event.
.. see issue #3993 which will get fixed using the same
scheme as this one.
.. when a userchart is embedded into an overview mouse events
do not propagate in their entirety- as a result the legend
widgets do not see MouseRelease (even though they see
MousePress).
So the click to show/hide when hovering over a legend item
responds to the press not the release.
.. User charts can be scaled (lines, texts, markers, legend)
.. Plot area background color honours overview card color
when we're on an overview.
.. when adding a user chart to an overview make it span a couple
of columns and 3 times deeper than a metric tile.
NOTE:
There are two bugs that need to be squashed individually
and are related to user charts on overview:
1. Mouse event handling seems to be broken for user
charts in Overview.
2. User chart axis colors are always black when the series
are configured to use named colors.
zones(hr|power|pace|fatigue, name|description|low|high|units|time|percent)
applies to the currently selected activity and sport is implicit.
Also changed name() by metricname() and unit() by metricunit() in script comments.
.. You can now add a user chart to the overview dashboard
using a new tile UserChartOverviewItem.
.. Had to refactor UserChart away from a GcChartWindow and
into a QWidget so the QGraphicsProxyWidget would play
along.
.. A new UserChartWindow has been added to manage adding
a UserChart to a perspective.
.. fixed chartspace item config widgets being destroyed across
the add wizard and config dialog (existing bug).
.. fixed initialisation of items when added via wizard
NOTE the following issues/todo:
.. mouse click events are squiffy for some reason
.. need to add a way to scale as the text is tiny
.. legend has a performance issue (see #3989)
.. overall performance is good even tho we are using
a QGraphicsProxyWidget- might need to reevaluate
this later and embed the QChart directly into the
QGraphicsScene. To be reviewed.
.. a new zones datafilter function to retrieve zone info
and metrics for the current activity.
.. zones(sport, series, field)
sport is one of run, bike, swim
series is one of power, hr, pace
field is one of
* name - zone name (e.g. L1)
* description - zone desc (e.g. Active Recovery)
* low - the low mark for the zone (e.g. 0)
* high - the high mark for the zone (e.g. 100)
* unit - units for low/high (e.g watts)
* time - time spent in zone
* percent - time spent in zone as a percentage
each call will return a vector of strings for all
zones available.
.. to support the syntax the old functions 'name' and
'unit' have been renamed to 'metricname' and
'metricunit' to avoid clashing with symbols and
were bad choices in the first place.
.. the motivation for this function is mostly about the
overview data table, where we might create a tile
with the following program to display the zone
table that was previously available on RideSummary
names {
c("Name","Description","Low","High","Time","%");
}
units {
c("", "",
zones(bike,power,units),
zones(bike,power,units),
"", "");
}
values {
c(zones(bike,power,name),
zones(bike,power,description),
zones(bike,power,low),
zones(bike,power,high),
zones(bike,power,time),
zones(bike,power,percent));
}
.. we have a filter box on most trends charts config dialogs
and elsewhere. But when you resized the dialog the filter
box would also stretch (even though it is a QLineEdit).
.. this commit sets the vertical size policy to fixed to stop
this ugly behaviour.
.. when a column contains no tiles it may still be spanned
by a tile (since we add that feature).
.. this means we should check if the column contains a spanned
tile before shifting all remaining tiles left.
.. also enabled dropping into an empty column which was
not possible previoisly (impossible to have an empty
column)
A new overview tile that can be placed on trends or activity view to
display a table of data.
.. It uses a program to fetch the data to display via 3 functions:
* names() returns a list of column names
* units() returns a list of column unit names
* values() returns a list of values to show
.. If there are more values than names then it is assumed there
are multiple rows to be shown.
.. When adding a data tile an example program is provided to
demonstrate how this works (will need to also document this
on the wiki, or possibly a video tutorial).
Since time in zone is computed using the active zones for the series according
to sport and date, there is no good choice of limits to show in the general case.
This is part 4 of #3911
Power, HR and Pace use separate scales now.
This is part 3 and fixes#3911
The sport used to select zones in rangemode needs an update,
this will be included in a separate commit.
.. some new functions to help prepare data for the new overview
data table item. Possibly useful in other contexts too.
datestring(v) - returns v converted to a string date where
v can be a single value or vector of values, as days since
01/01/1900. e.g. datestring(Date)
timestring(v) - returns v converted to a string time
where v can be a single value or vector of values.
name(metric1 ... metricn) - returns the metric name in
the local language
units(metric1 ... metricn) - returns the metric unit name
in the local language
.. resize an overview item column width whilst holding down the shift key
to make it span columns, it will expand across and back.
.. this is largely to support the data table overview item type that
is pending, but also may be useful in the future when items can
contain charts (not planned for v3.6).
.. train plot background color is now honored more completely
with the backgrounds, sidebars and tabs all taking the
right color.
.. additionally, when applying any theme the train view will
always be set to a black background since it works best
like that (but users are still free to change it).
.. based upon current background plot color, so those with a
preference for dark themes get the new dark theme and those
with a preference for light get the new light theme.
.. making it mandatory will likely annoy some users but for the
most part it will mean the UI will get updated to a more
thoughtful color scheme.
.. the ride summary on analysis and trends is now replaced by
the overview dashboard.
.. since RideSummaryWindow uses html to deliver content via
an embedded web browser it had become unwieldy and the
UX was klunky and static.
.. additionally the code was unwieldy and difficult to
maintain and update when new feature were introduced.
.. this is a happy day, goodbye and farewell.
.. applies to all charts in the perspective, so you can create
a perspective called "Running" and set the filter to "isRun"
and all charts in the perspective will only show data from
runs.
.. updated charts on Trends view to honor the perspective
filter, as below:
* Overview
* Trends
* User Chart
* Treemap
* Critical Power
* R Chart
* Python Chart
* Histogram - for metrics
* Summary - no change as deprecating shortly
.. renamed the HomeView to TrendsView in line with some of the
other recent name changes. The class names were set over 10
years ago and no longer reflect the UI concepts.
.. New signal: GcWindow::perspectiveChanged(Perspective *)
When the chart is moved from one perspective to another, likely does
not need to do anything on Analysis view, but on Trends view its
quite likely the filter has changed, so refresh is needed.
.. New signal: GcWindow::perspectiveFilterChanged(QString)
When the perspective filter is updated this signal is called but
only on trends view since it doesn't really matter on Analysis
from the charts point of view.
.. at startup the perspective selection logic for analysis
view was not called and just defaulting to the first
available perspective in the analysis view.
.. when creating a perspective you can now add an expression
that will be evaluated when a ride is selected in the sidebar.
.. For example you can create a perspective "Running" with an
expression "isRun". When a run is selected on the sidebar
we automatically switch to the running perspective.
If now, whilst on the "Running" perspective you select say
a cycling activity, the expression will evaluate to false,
so we will look for another perspective to switch to.
If no expression is found to switch to, and the current
perspective has an expression that is evaluating to false
then we just switch back to the first perspective in the
list (you can reorder them if needed).
.. the perspective type is added to the xml when exporting and
also when saving state.
.. on import the perspective type is checked to make sure we
don't import trends views into activities and vice versa.
.. User Chart annotation labels now work when a standard color
has been selected.
.. The name of the standard color "CP Curve" has been renamed
to "Mean-maximal Power" to more accurately reflect how it
is used in the Critical Power standard charts.
.. there are lots of standard colors and they're hard to scroll
through. A new search box makes it easier to find them.
.. this is in anticipation of adding a lot more standard colors
for things like W', Pmax, Weight yada yada
.. New dialog to rename, add and remove perspectives, re-order them
and move charts from one perspective to another.
.. The focus is on managing perspectives and not the general UI
layout (ie. add/remove charts and rename things etc) this is
likely to be something this morphs into, but for now lets
keep it simple (this was complicated enough !)
.. also found a SEGV in CP chart when hover in allplot before the
CP chart has been notified in another perspective-- there are
likely to be a few of these kinds of bugs around.
When you start with a single click the workout is represented graphically
as a ramp from zero, but the qwkcode and erg code generated starts with a block.
Additionally an initial ramp starting from zero neither works.
This was reported at the forum and, although it is mostly cosmetic, it can be
annoying, so this change fixes both.
Difference between R Chart in Activities and Trends is a blank at the end
of the name, which is not preserved in German translation so new R Charts in
Trends are created as Activities charts.
Fixes#3427
It is unnecessary, since Train mode supports only 1 workout at a time,
and single selection makes it easier to scroll the list in tablet mode.
Related to #3268
Current GC root can be different from athlete library setting
due to GC startup logic and the spurious warning is confusing.
Revert to previous value, not current GC root, if the user chooses to.
Fixes#3903
.. Perspectives can now be added and are saved and restored on
startup and close.
.. A new config file 'xxx-perspectives.xml' replaces the old
'xxx-layout.xml'.
.. HomeWindow has been renamed Perspective across the code.
With TabView now taking responsibility for loading and
saving configuration.
.. This is a fairly big refactor that touches upon a number
of events at startup, including how sidebar events are
propagated across charts and tabs. And will need a reasonable
amount of testing before release.
.. Separately, I also fixed a SEGV in the Python chart when
no ride is selected (an old bug not related to this).
The user will be able to create collections of charts as opposed to
the single long list of charts in each of the four views.
This first update:
.. update toolbar to include a perspective selector
.. also updated aesthetics of toolbar (mostly icons on hidpi)
Further updates pending will:
.. part 2 will introduce code to add, save and restore perspectives
.. part 3 will introduce code to manage and rename perspectives
.. part 4 will introduce new defaults for each perspective
A future enhancement may allow the perspective to be aligned to a
specific sport in activity view, so the perspective can be selected
based upon the sport of the activity being analysed. But that will
not be part of these changes.
MapQuest API Key is a new DP parameter to allow users to enter one
and have personal transaction limits.
When empty it defaults to GoldenCheetah API key as before.
Fixes#3900
Any sport present in the list of possible Sport field values
can have its own HR and/or Power zones like Run before.
Otherwise Bike zones are used as default for backward compatibility.
Fixes#3280 combined with last 3 previous commits.
[publish binaries]
All sports defined as values for Sport metadata field can have
specifics Power Zones and default to Bike zones otherwise.
Similar to current power zones for Run.
Part 3 of #3280
All sports defined as values for Sport metadata field can have
specifics HR Zones and default to Bike zones otherwise.
Similar to current HR zones for Run.
Part 2 of #3280
.. the alpha channel was too agressive for light backgrounds and
was washed out and unpleasant on the eye.
.. reduced the alpha blend to make it flatter and cleaner.
.. showEfforts was not being initialised when the plot was created
which resulted in sustained efforts always being shown regardless
of the chart setting.
.. themes are now either light or dark, which selects the default
color set used to set the standard colors.
.. users can of course maintain them, but when applying a theme
there is no need to adjust now (some of the default colors looked
poor on a light background).
.. there is a line of code in main.cpp to dump the current colors to
stderr so it can be cut and paste into colors.cpp -- this makes it
much easier to use the UI to maintain colors and update the code.
this is obviously just for developers.
.. letting users define their own themes could be done later, but feels
like overkill at this point.
.. When creating user charts we can now select a standard color as
configured in appearances.
.. This means users can select e.g. the "Power color" when plotting a
power series.
.. The second part of this commit will update the themes to ensure that
the standard color settings are appropriate for the background (as
they are inappropriate currently. e.g. Critical power is always
yellow, even on a light background).
.. mostly straight replacement as qt5 containers are templated
and qSort semantics are the same as std::sort
.. prepping for Qt6.2 which is due late 2021.
Signed-off-by: Mark Liversedge <liversedge@gmail.com>
Continuation of previous commit. Caveat is value argument is string
so the user is resposible of providing proper string representation
of the value for overrides and numeric metadata.
For Metadata handling in Python Data Processors, similar to set/unset/isset
in formulas, but no metric overrides for now.
- setTag(name, value[, activity])
- delTag(name[, activity])
- hasTag(name[, activity])
All return boolean success indicator and activity is optional,
defaulting to current activity.
setTag and delTag are enabled only in Python Data Processors, mark
the activiy as modified and notify metadata has changed on success.
Fixes#3639
.. Makes it easier to identify code that has been snaffled in from
other repositories and check licensing
.. The httpserver is now no longer optional, since it is delivered
as contributed source.
Variable row height, depending on activity calendar text being empty or not,
provokes refresh issues when calendar text changes from empty to not, or
viceversa.
Instead to try to solve this issue with specific code, I think it is
simpler, and more regular from UX point of view, to have a uniform row height.
After this change row height depends on metadata config only:
1) a new RideMetadata method is introduced (hasCalendarText) to check if
Calendar Text can be non empty, i.e. if some field has diary checked.
2) RideNavigator uses this method when config changes to set hasCalendarText
member used to determine row height for all activities.
Fixes#3074
Configurable in Train Preferences, defaults to 0, which is current behavior.
When countdown > 0, start is delayed and countdown is displayed in
notifications panel.
Fixes#3632
Since a simple metric name is the most common use case for PMC functions,
it is useful to avoid the need to call the expression evaluator at refresh
time, for better performance and to sidestep #3788.
This is a continuation of previous commit, since x-axis change affects
the is blank status we need a full replot to consider cases when the
selected activity lacks time or distance.
This change remove deviceType_ private member from RideFile
replacing its use by access to "Device" metadata field.
The objective is to remove limitations s.t. update using set
in formulas and ride navigator immediate refresh.
Fixes#3760
.. when trying to find the right values for the measures() datafilter
function e.g. measures("Body", "weight") it was not clear why this
was failing. Added more information to the error message.
A new Trainer metadata field is included in metadata.xml
On upload a checked Trainer metadata field, or the presence of
TRAIN XData series, marks the activity as trainer.
On download the trainer flag is used to update Trainer metadata field.
This is a complement of 5a1bd1a, a user is reporting a crash in
Widget::setSyleSheet on Windows at startup after that commit.
I cannot reproduce the issue, but since that change was modeled
after LTMSidebar, lets try to avoide the issue making it even more
similar. This way, the widget already has a proper parent when
HelpWhatsThis is added.
Add recommendation to pair only FE-C sensor for FE-C devices
Group Custom Virtual Power settings, move Name and Create button,
rename for clarity and enable only when Name is not empty.
Remove compiler warnings.
Fixes#3697
deriveExtCPParameters established Initial parameters estimates before
the data verification steps so when data don't meet the minimum
criteria for estimation those initial parameters are returned.
This change moves the initialization step after data verification,
similar to what deriveCPParameters does for the envelope fitting case.
Fixes#3862
A new logging category is added gc.usb, inactive by default, to log all the USB transfers between GC and the USB trainers. It can be activated by changing the logging filter with the --debug-rules option.
This change adds some useful defaults for Tile Servers A/B/C when not set
and allows to enter full urls including apikey, s.t.:
https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=<your-apikey-here>
so use OpenCycleMap with your own apikey.
[publish binaries]
Leaflet.js API uses the upper left corner as reference point while
GoldenCheetah icons, designed for Google Maps API, uses bottom center.
Since all marker icons are fixed size 32x37, this change adds the attribute
iconAnchor:[16,37] to fix positioning.
Fixes#3193
This change allows the user to independently via the new chart checkboxes to:
- ignore any Power Shading Zones and always draw the red line (Hide Shaded Zones)
- remove the route background yellow line (Hide Yellow Line)
For Pace related metrics converting back from toString using toDouble
fails and then sparkline, up/down, etc. are not displayed.
This change avoids that conversion to fix this issue and to make code simpler.
Add declaration for variable v inside the loop used to compute avg/min/max
to avoid affecting variable v in the outer scope, this is the minimum change
to fix the problem and the same pattern is present in other tiles.
Without this change up/down is based on the first activity of the same sport
in the previous 30 days, instead of the current one.
Adds a “Polarized” option to Overview Zone tile to chart HR/Power/Pace as 3 zones histogram, it has no effect on Fatigue/WBal zones.
Complements #2555
[publish binaries]
Decimal watts, which tipically happens when a workout is scaled,
play havoc with qwkcode, so lets avoid them.
Text cues are not supported either in qwkcode yet, adding them
was my mistake, so I commented out them for now.
Fixes#3846
* Add debugging options to select the log file, format and rules, and redirect stderr even on Windows
* unistd.h does not exist on Windows use io.h instead
* STDERR_FILENO does not exist on Windows
* Different strategies and much error checking to redirect stderr on Windows
* Synchronize cerr and stderr with filedes 2 and STD_ERROR_HANDLE
* Some functions like write in Linux and Win32 have slightly different signatures
* Code cleanup, final test to check that fd=2, stderr, qDebug and cerr are redirected
* Remove the file and line number from the default logging format in release mode
Once Ubuntu 16.04 reached EOL we will switch Travis-ci builds to 18.04,
this guide is intended to help new developers setting up a local build
environment.
To allow duplicate keys happening when the same metric/measure or
Best/PMC/Banister combination is used in more than one curve.
This is useful when the curves have different filters or trendlines,
for example, and avoids a weird behavior in these cases.
Fixes#2185
In total 18 new metrics are added and 6 new charts using them are
included in charts.xml (existing users needs to remove their local
copy in config/charts.xml to activate them, reset doesn't work since
it retrieves the server copy which is v3.5 yet.)
Fixes#2555
[publish binaries]
Change CVPage to include AeT Velocity/Pace
Default to 90% CV for runs and 97.5% CV for swims
Used to delimit Polarized Zones I and II
Add config(aetv) to formulas
Add aetv to R/Pyhton/Rest APIs
Fixed column widths to fit contents
Part 3 of #2555
Change CPPage to include AeT Power
Default to 85% CP, used to delimit Polarized Zones I and II
Add config(aetp) to formulas
Add AeTP to R/Pyhton/Rest APIs
Fix W' col resize bug in Power Zones settings #2661
Part 2 of #2555
Change LTPage to include AeT HR and look like CPPage and CVPage
Default to 90% LTHR, used to delimit Polarized Zones I and II
Add config(aethr) to formulas
Add AeTHR to R/Pyhton/Rest APIs
Part 1 of #2555
It should be closer to current offset than the fixed default.
Users having issues with calibration can change default value adding:
[srm]
offset=400
to configglobal-trainmode.ini
When exiting, GC complains that the Web Profile is released before Web pages that refer to it with the message: "Release of profile requested but WebEnginePage still not deleted. Expect troubles !".
The Web pages are now released explicitly in the destructor to insure that they are freed earlier than the Profile.
Fixes#3844
When any change is detected, _userMetrics are reloaded and updated in Metrics
factory, but metric recomputation still depends on fingerprint field to avoid
unnecessary recomputation.
Fixes#3838
It copies xml config files from the selected template athlete, if any.
Together with Athlete > Open > New Athlete, Athlete > Delete and
the new Athlete view should make multiple athletes management easier.
Fixes#308
[publish binaries]
Allows to delete a closed athlete without the need to exit the program,
it re-uses the logic in ChooseCyclistDialog and removes the AthleteCard
from AthleteView.
Objective is to allow creation of new athletes, without the need to
exit GoldenCheetah, using Athlete > Open > New Athlete like in v3.5
When a new athlete is created MainWindow emits newAthlete signal
so AthleteView can create the corresponding AthleteCard.
The Sigmasport ROX devices do not set a product ID, hence GC shows any Sigmasport fit import as "Sigmasport ROX". The Sigmasport wearable "iD.FREE", however, sets a product ID of 45. This adds specific logic to the fit ride file detection logic, while leaving the ROX default for backwards compatibility.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Fix VLC Hangs with Intentional State and Ordered Async Dispatch
Two main parts to this change.
- a thread locked managed player state
Fixes issue where calls to player could occur in wrong order
- all calls to VLC are made via an ordered Async dispatch.
Fixes issue where qt must process widgets after stop is called.
By moving stop off the qt gui thread this permits qt to shutdown
widgets which eventually allows vlc to stop.
Since vlc stop is async, and we wish vlc operations to be ordered
we are forced to put all other vlc operations on the same async
queue.
Fix#3756
to force Strava upload of altitude data.
The user can revert to Strava basemap on Strava.
Upload to Garmin Connect was tested for regresion.
Fixes#3824
I noticed zoom configured in xml file is ignored, and code is always starting with a value of 16 for thee zoom of thee live map widget.
This change uses field of the xml; it was already being parsed but not used, so using it is simple and straightforward
Co-authored-by: Peret <mail@mail.com>
* when CRS workout files are read, the altitude is already derived and precomputed from the gradient for all formats handled. A new function was added, altitudeAt, that accesses this value, avoiding to derive anew the altitude from the gradient in the TrainSidebar main loop, and getting the correct altitude value when FastForward.
* Replaced assert by qDebug in ErgFile.cpp because asserts would needlessly kill the program
Fixes#3805
* Fix the request - reply interactions with the Fortius
The open command is in fact to get a reply with the version. However, some already queued messages need to be skipped, before the well formed reply message is received. The open command is sent initially, and each time the device is disconnected and reconnected. The procedure to open the device and get the version was then put in a separate function.
When the run command is sent with a specified force, a reply comes back with the force echoed. However, here again, some messages may need to be
skipped before the correct reply comes back.
* Updates based on comments
The first reply is always skipped on the T1932 (64 bytes reply). A notification about the motor not turned on is sent when the version number cannot be read.
* Add a comment for a non obvious if condition
Added calibration trainer command, delayed check for user stopped pedaling with visual feedback on progress and saved calibration for next use on success.
The crash is reproducible on Linux starting an Erg workout after another
and it is caused by an array index error due to average arrays not being
cleared on start.
* Initial correction of force/speed/power calculations for Fortius using information from https://github.com/totalreverse/ttyT1941/wiki
* Use wind speed, rolling resistance and wind resistance value from trainer interface, if provided
* Added FortiusANT's AvoidCycleOfDeath() routine from https://github.com/WouterJD/FortiusANT to limit trainer resistance at low wheel speed
LRBalance is left side contribution while the ANT+ messages carries
right side pedalPower contribution, so it needs to be converted.
When not available RideFile::NA is used since 0 means 100% right.
Complementes b29f72d, Fixes#3017
Add support for 8008 TRS and, using the profile string, delay and sound can be configured
This adds the following functionality for daum:
* if the profile string contains a number or the string sound,
no automatic cockpit configuration is done, but the information from
the profile string is used
* if the string sound is present, play the sound when connecting
* if a number is present, use this number as the delay in milliseconds
between commands. A reasonable number to start with is 50 in case of
connection problems
This also solves the problem, if the cockpit id is not known by
GoldenCheetah. In this case the profile string can be just set to
e.g. 50_sound and the unknown cockpit id is ignored.
Athletes with default config can be safely skiped without loss of
information in the same way as non athlete folders.
Fixes#3735 for new cases, but users previously affected by this bug
need to manually delete metadata.xml from GC root folder, it doesn't
seem a problem common enough to merit an special treatement.
[publish binaries]
Default is checked to preserve current behavior, when cleared
the choose athlete dialog will be presented at start.
Workout library setting was moved to Train preferences
page to reduce clutter in General settings page.
[publish binaries]
* Daum: Remove redundant virtual keywords
These function were not involved in any inheritance, so the virtual
keyword is removed.
* Daum: Remove unused parent member
* Daum: Remove redundant destructor
* Daum: Remove default values for contructor parameters
This circumvents problems where e.g. explicit would be necessary.
The constructor is actually only used when all parameters are given.
* Daum: Remove redundant this->
* Daum: Ensure timer only allocated once
Also use nullptr instead of 0.
* Daum: Remove unused includes
* Daum: daumDevice is now a private instance member
There is no need for it to be a pointer or public.
CTRL+Click on a selected media file allows to clear the selection,
lets honor this action to have a way to train without video after
a media file has been selected.
[publish binaries]
For this a 50 msec delay is introduced before sending each serial
command. This is tested on hardware ond also used be jergotrainer.
Also during initialization there is a delay between each command, so
even slow devices can keep up. As soon as the cockpit type is known,
the delay is set according to the cockpit type.
Create ergfile finalize for every parser to call.
Consolidate lap init into ergfile finalize.
Consolidate lap distance updates into a single method.
Laps now sorted by location.
Workout with no lap is given bracketing laps.
Fix handling of final lap (falls back on route distance).
FFwd lap on final lap no longer jumps to route start.
AddLap button now actually creates a new lap in lap list,
making it reachable using nextLap and prevLap.
Remove the displayLap field as it serves no purpose.
Improve Virtual Power in Presence of Acceleration
Part 1: Rotational Inertial for Custom Virtual Power
This change is only enabled when device is defined with non-zero
Inertial Moment. When Inertial Moment is not defined or is
zero then this change has no effect.
Change adds field to device to hold trainer's inertial moment
in (KG M^2).
This allows power calculation to track energy that passes in
and out of trainer's flywheel so that acceleration and
deceleration power can be reported immediately.
Whenever device sets a new rpm sample a time is
recorded alongside which allows the common controller
to compute change in rpm over time, which allows
calculation of kinetic energy that has entered or
left the trainers flywheels during the duration.
It is a bit of math to determine a correct I for a trainer's
flywheels, especially if the flywheels have different rpms,
hopefully we can add the I values for the current built-in
virtual power trainers.
Part 2: Use average power instead of point power.
Moved numerical integration into its own header, its now used by
bicyclesim and by virtual power. Changed default integrator to
Kahan-Li since in my testing it is stable and converges fastest.
Virtual Power now computes average power since previous sample,
which has the effect of reducing reported power during acceleration
and deceleration.
New advanced virtual power is on with this commit. It seems to work
very well in my testing.
Fixes#3650
Fractional watts are not supported by Workout Editor and they
are trucanted for most import formats, this fixes remaining
cases reported by users.
Fixes#3675
Current route tile looks off compared to the map one is more used to,
because it is lacking mercator projection. This commit adds the
spherical pseudo-mercator projection as described on
https://wiki.openstreetmap.org/wiki/Mercator. As mentioned there, the
true elliptical projection is avoided for being more computation
intensive. This is also the case in OpenStreetMap and thus in the full
map view in GoldenCheetah. With this commit, those views match up again.
This is an experimental feature, the primitive was available
but currently unused, it seems to have been available from
Computrainer HDC in former versions.
When used with videosync it does a naive extension of the FFwd
implementation, but it seems less precise than without videosync,
some tuning may be required.
* Teach ttsreader to process routes and segments
TTS reader previously ignored routes, segments and strings.
With this change the route name, route description, segments,
segment descriptions are now all parsed into ttsreader object.
With this change the route name and description are assigned to
the ergfile, so route name now appears while riding a tts file.
With this change there is still no place to put segments in ergfile.
With this change none of the new information is assigned into the
activity file.
The segments and segment descriptions are used by tacx software
so user can select a named region of a long ride. Example ride
was >200km long and contained 12 named segments, each with a nice
description. Would be nice to bubble that info up to train mode.
* Translate tts segments into ergfile laps.
Also fix old issues with how laps work in slope mode, especially
with ffwd and rwnd.
Also lap markers are double.
As far as I can tell laps work ok now.
Simplified the meterwidget elevation display loop, bug was that it
was skipping the final route point.
Add minY to ergfile so range of y can be obtained without computing
each time, so can remove search loop from meterwidget.
Fixes for power adjustment:
Fully populate new point from old before rewriting fields.
Prevent power from reducing to zero since after it is zero you
cannot increase it again...
* remove unused CompareDateRange::days
* remove unused Season::days
* ensure Season limits are only accessed via accessors
* remove unused Seasons::seasonFor
* add SeasonLength to create relative seasons that end today
* save Season::_length and use it instead of Season::prior
* add SeasonOffset for the start of relative seasons that don't end today
only functional difference: "All Dates" is now aligned on the beginning
of a year instead of starting on the same day and month as today
* use _offset+_length instead of _start+_end for relative season
functional differences:
- in CriticalPowerWindow, relative seasons that don't end today ("All
Dates", "Last Week", etc) were previously computed with respect to
QDate.today(); they are now computed with respect to
myRideItem->dateTime.date(), as other relative seasons ("Last 7 days",
etc); this is technically a bug fix, but there probably was no one
using these relative seasons for CriticalPowerWindow anyway
- every call to Season::getStart and Season::getEnd computes a fresh
value (based on the offset and length specified for the season), so
relative date ranges refresh when the display refreshes, e.g. when GC
is open for multiple days (fixes#1751)
* add comments for SeasonOffset/SeasonLength
* Use Season accessors in AthletePages
* when looking for events, consider all seasons that intersect the date range
seasons starting before and ending after were not considered
Fixes#2620
* center event labels on the event mark
if the labels are to the right of the mark, the label of an event at the
end of a date range will not be shown
* code cleaning
loop only once over seasons, instead of twice
Before this change, when looking at an activity, the routes seemed to
appear in order of creation in the interval section. This patch instead
sorts them by their start time in the activity instead (or by their end
time if the start times are the same).
Note that the routes are also known as segments.
Fixes#2132.
Fixes the problem happening when a ride crosses the start point of a segment but diverges for some reason then at some point later in the ride the segment is ridden for real. It introduces boolean "resetroute" and sets it to true in two places where where the code needs to reset the segment point and break out of the ride point loop in the case where diverge is found. Then check for this condition at the bottom. Reset the segment index to -1.
To avoid the script running twice on ride selection and
interval edition/deletion.
Caveat is when intervals are created via find intervals
the script is not notified until interval or ride selection changes.
Overview chart needs to do computations with metric values converted
to selected units and format results accordingly, for this purpose
RideMetric::toString(useMetricUnits, value) should not do the units
conversion again, so it is changed to do formatting only and useMetricUnits
parameter is removed.
The original meaning is used only in RideItem where it is replaced by
the composition of toString with value.
Fixes#3647
[skip appveyor]
transfer.sh service has become very unreliable and it is being
phased out on oct-30, according to the public site announcement.
free.keep.sh offers free uploads up to 500MB with a similar service,
limited to 24hr storage, enough to download build artifacts.
This is the Same fix applied to the Computrainer a few months ago to remove the modal dialog that would be issued in a loop upon connection problems. The modal dialog loop made the interface completely unusable. Now a notification is emitted but the interface remains available.
Similar to other DPs, it is what the users expect and it is easier
to try with different parameters.
When called automatically existing watts are preserved
to avoid accidental overwrite.
More recent first intended to avoid the need to scroll to the end
Fingerprint changed to include time to detect changes when adding
more than one on the same day.
Fix inconsistent use of local/UTC dates.
.. MacOS Qt crashes when destroying it, OpenGL is *that*
broken by Apple.
.. applied to Windows too, despite it not being an issue
reported there is no value in doing it so removed.
[publish binaries]
.. saves/loads values to athlete global area, particularly useful when
modelling as you can save away parameter estimates that may have
been expensive to compute, and re-use them across series in a
user chart.
.. they are not saved across restarts, but we could fix that later if
they become more useful
.. store("name", value) and fetch("name"). if the named value does
not exist 0 is returned.
[publish binaries]
Fix the slope and power values in the Fortius Slope mode
Users have complained about incorrect slope and power values for the Fortius. This was due to a few problems. This commit greatly improves the situation with the fixes that solve the following problems:
- The Fortius protocol is better documented in the comments.
- The pedal sensor is on byte 42, not 46, this prevented the pedal sensor echo to keep the trainer operating normally.
- The slope was converted to uint before being scaled, losing the fraction.
- The trainer most likely reports the torque. It must be multiplied by the speed to get the power.
- The scaling factor for the slope was 2x too high but this did not show earlier because of the pedal sensor problem.
- The period for retrieving data was too fast, most packets were empty, the period was changed from 10ms to 50ms (Tacx software uses 100ms).
GoldenCheetah is now quite usable on my Fortius with those changes. The slope appears too easy and the power overestimated but this is similar to the behavior of this trainer with the Tacx software. It would be interesting to get feedback from users with powermeters to refine some of the coefficients involved.
.. MacOS support for OpenGL is unreliable and there are user reports
of issues. We will need to wait till Qt 6 for hardware acceleration
on Metal.
.. Windows support for OpenGL is ok if you use Nvidia GPUs but the
AMD OpenGL driver is slow and broken. So we disable OpenGL here
although Nvidia users are potentially being short changed.
.. Hardware rendering really needs to wait for Qt6 for a more complete
and reliable implementation that has cross platform support.
Fixes#3594
.. the concept of a new gui as a replacement for MainWindow was dropped
in preference for gradually adjusting MainWindow to the new design.
.. this is still in progress, but the 'newgui' concept is dead.
.. Fetch the version of OpenGL available at startup and use it in
ChartSpace to decide if we want to enable openGL rendering.
.. some fixups for X11 builds, which are not needed on the main
OS combinations we use (Linux, Mac, Windows) but may prove
useful when building for X11 vs Wayland in the future
The weight has a direct impact on how fast you climb for a given power.
Other parameters like the wind resistance and the rolling resistance do
not change as much but should still be communicated to devices which can
take them into account. All the needed values were already present in
the BicycleSim and DeviceConfiguration modules. It is simply a matter of
communicating those values in the RealtimeController interface, just like
the gradient.
.. xdata("name", "series" | km | secs) - returns a vector of xdata.
.. no resampling or interpolation is applied since the user can
do this with the resample() and interpolate() functions.
This has been reported to produce garbled output on Windows and,
according to https://doc.qt.io/qt-5/qtglobal.html#qPrintable,
it is dangerous since the array returned by QString::toLocal8Bit()
will fall out of scope, so lets use a safer version to avoid
the risk of crashes hard to debug.
[publish binaries]
For the same reason metadata.xml is now global.
Also load default measures groups even when measures.ini is present,
this may change when we provide an UI to edit measures.ini, but for now
it avoids users breaking body and hrv features.
[publish binaries]
.. Global settings (themes, metadata etc) are now maintained
in the config dialog as in the past, whilst athlete settings
(such as zones, measures etc) are now maintained in a new
config dialog accessible from the athlete view (gear icon).
.. Config changes are communicated via two signals;
* Context::configChanged(qint32)
* GlobalContext::configChanged(qint32)
Crucially, all global context signals are cascaded through
the athlete contexts-- so athlete specific widgets only
need to connect to the athlete context signal (and will get
athlete and global config change notifications).
Whilst global widgets such as the sidebar and mainwindow
need only connect to the globalcontext signal since they
are not interested in athlete specific details.
[publish binaries]
.. Ride metadata was associated to the athlete rather than a
global setting. This was a serious design flaw since user
metrics can reference metadata.
.. A global metadata.xml file is generated on startup by
consolidating all athlete level settings into a single
configuration.
.. Other dependencies were also moved; SpecialFields,
ColorEngine and UseMetricUnits.
.. We should now be able to remove athlete configuration
from the config dialog and put it into the athlete view
instead.
This will also fixe a long standing issue with
configuring athlete settings when multiple athletes are
open.
[publish binaries]
.. the 'Details' chart now combines editing the metada fields such as
workout, sport, notes and so on, with an additional tab 'Raw Data'
that contains the RideEditor.
.. it is now no longer possible to add Editor inidividually and the
Summary and Details chart is deprecated (Summary will also be
removed once Overview has enough functionality to replace it).
This reverts commit 6bc48200e7.
It is crashing on Windows 8, I can't debug on that version
and it is not that useful feature, --debug gives more information.
[publish binaries]
.. the views were not being deleted, so the global context connection
to configChanged signal was still called, but the athlete and
context were long gone - so SEGV (!)
.. the reason this didn't get triggered in earlier releases is due to
the fact the event was disconnected when the athlete context was
deleted.
.. move thread based load of ridecache into ridecache, this fixes a
serious regression.
.. previously because the ridecache was created in a thread it could
not attach to the events from the main gui event loop.
.. we now load the RideDB.json file in a worker thread, but the
ridecache, and its items are created in the main thread.
Since F3 was assigned to Calibration, its use as modifier was deprecated.
Also nextDisplay is not implemented so we can do some cleanup.
F1 is restored to their original function: start/pause and F2 is used
for new lap, in both cases with debouncing to avoid false activations.
This way the same functions enabled for ANT+ remotes are available via HBC:
Start&Pause: F1
Lap/Interval: F2
Load increase/decrease: +/-
Calibration: F3
measures.ini is looked for in Athlete's config folder,
it should have a section for each measures group,
nutrition data with Energy and Macros is provided as example.
Moved default weight to About and removed RiderPhysPage and created
a tab for each measures group under Measures.
MeasuresPage handles conversion between metric and imperial units
Generalized CSV import with configurable headers.
MeasuresDownload enables download from Withings/Todays Plan only for Body
measures.
This is Part 1/2 of #2872
.. GlobalContext::context() provides a global context that is not
tied to an athlete or MainWindow.
.. At present it just offers signals for config changes but will
likely see more context move across as the application preferences
and athlete configuration are separated as we enhance support
for multiple athletes.
Similar to Linux/macOS builds, messages are redirected to goldencheetah.log
when not output to console is requested, but instead of relying on low level
stderr redirection a message handler logging directly to the file is installed.
[publish binaries]
configdialog_ptr is already maintained to handle raise event,
cleanup is moved to destructor to ensure it is always called,
and it is used to ensure:
1) only one instance is created from MainWindow
2) it is closed on MainWindow destructor
Fixes#1918
The logic to generate synthetic speed/distance/cadence sample data
from length records was removed from FitRideFile, and Fix Lap Swim
data processor is now used for that task, this is simpler, avoids
code duplication and preserves other data s.t. HR and Temp
Fixes#3545
total_timer_time is used as length duration instead of total_elapsed_time
to support Suunto lap swim files
Fixes#3272
.. since the context of the first athlete is used as a partial
application context across the code we now prohibit closing
the first athlete opened.
.. we will separate out the app and athlete context shortly
but this will at least protect against SEGV.
[publish binaries]
.. Show days since last activity and disable config icon since there
isn't an appropriate action for now
.. Athletes can be opened and closed via the tiles and a reusable
'Button' overview widget is available for re-use elsewhere.
.. Part 3 will enable checking for downloadable data to show an
indicator on the tile for e.g. coaches with multiple athletes.
NOTE:
There are a few issues regarding application context separation
from athlete context that need fixing up (if you close the first
athlete loaded expect crashes). Will look at this as a separate
update since its been there for some time and is not related to
the new view per se.
.. modern light now uses the Fiori Belize Blue theme.
.. this means that the overview (chartspace) background is now also
configurable, so the existing themes could be updated.
.. probably need to revisit all the themes tbh.
There has been some reports about performance issues on Windows,
and this was a debug tool for a feature which has been stable
for years, so we can remove it to avoid the overhead.
[publish binaries]
.. string manipulation using raw C since its simple character
replacement, halved time over previous approach.
.. lookup rideitem in ridecache via binary search (lower_bound)
rather than serial. Minor speed up.
.. Overall, loading should be noticeably quicker for most users.
.. introducing the athlete view
.. at startup the first athlete is loaded as normal, but once the
mainwindow is open the athletes are managed from the athlete view
.. athlete ride cache restore happen in background (via a thread) to
enable the GUI to remain responsive whilst it takes place (since
for most non-trivial cases it can take 30 seconds or more).
.. multiple mainwindows has been deprecated and whilst each open
athlete is selected via a tab, this will change to a combobox
in later commits.
.. the tiles in the athlete view do very little apart from show the
avatar and progress/load status when an athlete is being loaded.
.. future commits will introduce more detail and actions for the
athlete tile and deprecate the athlete tab bar for a combo on
the toolbar (amongst other things).
.. Scatter chart click thru from trends.
.. Need to decide how click thru will work from a line chart as the UX
doesn't quite work as the auto hover points are elusive (they move
when you go to click on them). Will review and fixup shortly.
.. Enable click through from the data points on a generic chart
when on trends view.
.. This commit includes the 'addCurve' bindings to pass the
activity filenames from R, Python and the User Chart.
.. It also includes a new DataFilter function 'filename' to
get a vector of strings that are the filenames for the
activities in the selected date range (or the filename
for the currently selected activity).
.. The second commit will include the interaction code for
GenericPlot to click-thru a selection.
Import Texts from Erg files in TrainerRoad format, Zwo files and
from Lap names in json files.
Display texts on TrainBottom for both, erg and slope mode, at the
corresponding time/distance for the specified duration.
Export Texts in erg, mrc and zwo formats.
Fixes#1118Fixes#2967
Prerequisite for #2098
.. adding some new functions for working with strings:
trim(p) - trim whitespace
tolower/toupper(p) - convert case
split(p, sep) - split a string into a vector
join(p,sep) - join a vector into a string
replace(p, s1,s2) - replace s1 with s2 in string or vector
.. this is the last of the first wave of commits to support
strings, but more will come as we work with categorical
data, factors and so on.
[publish binaries]
.. show/hide sidebar setting is reinstated on restart, is specific to
each view and now the menu check stays in sync with user selection.
.. another old glitch thats taken a while to get resolved !
.. metadata("name") returns the value for the metadata field on analysis
view or a vector of values if on trends view.
.. also fixed a few nits when working with category data on the user
chart; sort/multisort had bugs, blank labels and pie chart legend.
.. since we can now set category data using string vectors we can
support bar and pie charts in the user chart.
.. there were a few issues switching between bar and pie charts
related to the way axes were being configured that have been
resolved in this commit.
.. Update builtin functions to support working with strings as well
as numeric vectors; e.g. sort, uniq, aggregate
.. next commit will add some new functions that are specific to
working with strings; e.g. tolower/upper, split, replace.
.. Update operators to support string vectors; compare, assign, index,
select, contains and so on.
Most maths operators make no sense apart from '+' which concatenates
strings and arrays together.
.. next commit will update functions where they are appropriate for
strings and string vectors; sort, uniq etc.
.. Strings and vectors of strings are useful for plotting bar charts
or wherever category variables are needed, they are also useful
when working with xdata names and metadata within ride files.
.. Full support for strings will be introduced over the next 4
commits, including this one (1 of 4):
1 - Basics - Create, Assign, Coerce, isString
2 - Operators - Logical, Math etc
3 - Functions - sort, uniq, aggregate etc
4 - String Functions - cat, split, toupper/lower etc
.. Will wait until all 4 commits are completed and string support
is feature complete before updating the wiki.
[skip appveyor]
Homebrew upgraded to python to 3.8, switched back to the 3.7.5
included with the Travis image until we decided to upgrade.
Changing to 3.8 requires to upgrade SIP to 5.x and testing.
.. click on item in list to select it and click thru to analysis view.
.. also implemented a hotspot() method in chartspaceitem to tell the
chartspace to stop stealing events when in our hotspot-- in this
case it was the area where we paint the list.
.. stackpointer increment before redo and indexing into the stack
when stackpoint is -1 in NavigationModel::forward().
.. introduced in the last commit.
.. clicking on an activity in the trend overview bubble chart will
switch to analysis view to look at it.
.. to support this all the underlying changes to navigation model
and related have been updated to force view change and allow
going back and forth in the navigation model.
.. along the way a couple of bugs were also squased. The worst was
a SEGV related to Tab::rideSelected() calling MainWindow::sidebar.
.. now the main foundational code is in place we can add more click
through opportunities; e.g. top N on overview, user chart.
.. back and forward buttons to navigate between views and selections.
.. currently limited to just rides, date ranges and views.
.. next step is to enable click to select from trends overviews to allow
users to drill down from the season overview into activities and
back again.
.. part of the shift from searching through lists to analyse data to
exploring data visually with drill down and click through.
.. the buttons are very basic and there is no way to explore the
history / recently viewed items etc. these will come later.
Fixes#3529
.. the user can configure the colour of toolbars and sidebars, so this
is honored in the sidebar painting,
.. we should look at separating out the way theme colors are edited;
the core colors are more important than the pallete colors like
CPOWER etc (and as an aside the palette colors should be usable
from user chart config too).
.. gap between ride list and sidebar color didn't get reset when change
color theme in preferences. (was a nightmare to find the fix).
.. overview default backgrounds when changing themes were also really
bad choices and toned down. quite why we have to change in pages.cpp
and colors.cpp is a bit tedious.
.. new metric 'Activity Date' which is days since 1900/01/01 as a metric
so can use wherever metrics are used.
.. added RideMetric::isDate() so we can mark as a date and honor setting
in RideMetric::toString()
.. updated BubbleViz to support Dates by using xoff and yoff to truncate
the values used when days since values.
.. changed the default config for a trends view bubble viz in overview
to use activity date as the x-axis.
.. thanks to Ale for the original idea behind this.
.. repurpose the interval bubble to show activities instead of
intervals.
.. changed the animation/transition to work better when looking at
seasons by resizing the axes before updating the points.
[skip appveyor]
Not a great difference, but we are too close to 50' limit
Also reduce curl max time to avoid timouts.
For Linux buils remove --silent build to avoid the job being cancelled
The block was introduced in bb6d2552c0 to
avoid the upload of charts without configuration, now configuration is
possible and it will be interesting to see what layouts users share.
The y scale is computed from the font instead of only from the current content, to avoid having different scales between different Text widgets of the same size. For example, "kph" has a high k and low p, resulting in a text widget with bigger bounding box, and thus smaller scale than a text widget with "watts". Options are added for alignment and for text width, to help align the different entries. The formatting of metrics with the integer part as Text and fraction as AltText is more systematic and it is possible to add an AltTextSuffix, to specify the units when they are not provided in VideoWindow. The visibility of the BoundingRect and Background car be controlled.
.. its much faster to vectorize and use the samples() function in init
or value function when working with user metrics.
for example this code:
sample {
work <- work + (POWER * recIntSecs);
}
value { work; }
count { Duration; }
should be refactored to:
value {
work <- sum(samples(power) * recIntSecs);
}
count { Duration; }
To be used as workouts and videosync with free Ergo Planet Videos
EPM files contain video sync plus geolocation information in XML format
Library of free rides: http://wiki.ergoplanet.de/myor/roadmovie-galerie
The problem is altitude set to zero in those examples, likely because it is
redundant when you resort to the EPP (Ergo Planet Program) for slope data,
but the EPP is an unpublished binary format we don't support directly.
So the workflow to use the those synchronized videos is:
1) Import the .epm file to GoldenCheetah as an activity
2) Use Fix Elevation and Fix GPS to add and smooth elevation and route data
3) Export the conditioned activity to GoldenCheetah JSON format
4) Import the .json file as Workout and VideoSync files,
plus the .avi as media in GC Train mode using Scan Workouts and Media
5) Train using a Video Window with overlay widgets and simulated speed for
better experience.
Fix base class toString 2 parameters bug
Use toString(metric, value) in getStringForSymbol to avoid setting the value
Use toString(metric, value) in MetricOverviewItem::setDateRange for testing
Any other activity file format GC supports can be imported,
conditioned using Fix Elevation, Fix GPS, etc. and exported
to GoldenCheetah .json format to be used for simulated rides
with synchronized video and position tracking.
Complements #3469, Fixes#3376
.. shows a little medal on the metric tile if it is a best for the
period. Shows if top 3, in order:
- all time, including the future
- all time till today
- last year
- last 90 days
- last 30 days
.. helps to highlight positives from most activities.
Initial implementation of #3482
LiveMap is hidden when GPS data is not available
New layout including Live Map and graphical widgets
added to video-layout.xml, zoom can be configured there.
The video layout file is extended to contain possibly several named
layouts. The file is read to list the layouts and offer a selection in
the Video Player chart settings menu. The file is then read again to
instantiate the selected layout.
* Base work for dynamic speed power curves.
* Add test for spindown - proof templates.
* Dialog for adding virtual power curve
* Finished.
* Potential typename fix.
* Fix another typename problem.
* const typename reorder
* Missing header in clang build.
* Fix error with static init order.
* Forgot to set id for known devices.
.. plot metric by category as a donut (pie) chart.
.. particularly useful as an overview of sport or workout codes for
multisport athletes.
.. also fixed up metadata selection which was broken (!)
.. layouts mucked up a bit, needed stretches
.. the filterset wasn't updated correctly, causing filtering to not
work in the way anticipated.
.. Activities metric should be a MetricType::Total, which will become
more popular on Metric tiles with filters (e.g. how many activities
> 0.85 IF etc).
But to check for errors.isEmpty() is overkill, when the returned value
is not NULL, they can be warnings according to RideFileImport interpretation.
Fixes#3479
2020-06-14 15:16:29 -03:00
568 changed files with 164696 additions and 88834 deletions
Update Note: to build GoldenCheetah v3.6 we are using the APT Package
Manager to install dependencies, including Qt and GSL, on Travis-ci
Ubuntu Xenial build environment.
You can check the travis/linux folder for the complete and updated build scripts,
the minimum Qt version known to work is 5.13 with Qt WebEngine and Qt Charts.
GSL - GNU Scientific Library is a mandatory dependency starting with v3.6
Ale Martinez - May, 2020
+++++++++++++++++++++++
LINUX BUILD WALKTHROUGH
+++++++++++++++++++++++
Mark Liversedge
John Ehrlinger
Ale Martinez
Jan 2015
Version 1.2
Mar 2021
Version 3.6
A walkthrough of building GoldenCheetah from scratch on Ubuntu linux. This walkthrough
should be largely the same for any Linux distro.
A walkthrough of building GoldenCheetah from scratch on Ubuntu linux 18.04
This walkthrough should be largely the same for any Debian derivative Linux
distro, and very similar for others using their correspoing package manager.
CONTENTS
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
- QT
- git
- flex
- bison
- QT
- OpenGL
- gsl
2. ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 2
2. ADDING OPTIONAL DEPENDENCIES
- FTDI D2XX
- SRMIO
- liboauth
- libkml
3. ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 3
- checking out the release 3 branch & building with MANDATORY dependencies
- flex
- bison
- libical - Diary window and CalDAV support (google/mobileme calendar integration)
- libvlc - Video playback in training mode
- libical - Diary window and CalDAV support (external calendar integration)
- libusb - If you want support for using USB2 sticks in Train View
- R - If you want R charts
- Python - If you want Python charts, scripts and data processors
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
=================================================
Installed Linux distribution of choice on platforms i386 or amd-64 (currently Debian-based distributions and Arch-based distributions are covered). You will not need to do this if you
already have a Linux distribution installed. Left this step in to highlight the
Linux distribution the commands below were executed on.
Install the Linux distribution of choice on amd64 platform (Ubuntu 18.04 is used
for this document). You will not need to do this if you already have a Linux
distribution installed. Left this step in to highlight the Linux distribution
the commands below were executed on.
login and open a terminal to get a shell prompt
Download MANDATORY DEPENDENCIES (browser)
-----------------------------------------
Install Qt
----------
Download and install the Qt SDK from http://qt-project.org/
Once that is completed test qmake is ok with: qmake --version (should report 4.9.8 or higher)
You can use a browser to download and run the interactive installer, be sure to
select version 5.14.2 or higher 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)
Issue tracker is **only** for Bugs and Features, before to open a new issue please read the contributing guidelines (link below), and use the forums if you need help or technical support.
Issue tracker is **only** for Bugs and Features, please don't open issues for questions or technical support. Before to open a new issue please read the contributing guidelines (link below).
If you have questions, please read the FAQs and User's/Developer's Guide:
GoldenCheetah is an open-source data analysis tool primarily written in C++
with Qt for cyclists and triathletes
with support for training as well.
GoldenCheetah 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 is a desktop application for cyclists and triathletes and coaches, providing a rich set of tools and models to analyse, track and predict performance, optimise aerodynamics and train indoors.
GoldenCheetah integrates with most popular cloud services like Strava and Todays Plan, imports data from bike computers, imports downloads from any website like TrainingPeaks and Garmin and will also connect to smart trainers using ANT+ and Bluetooth.
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
@@ -29,12 +22,10 @@ INSTALL-LINUX For building on Linux
INSTALL-MAC For building on Apple OS X
macOS and Linux: [](https://travis-ci.org/GoldenCheetah/GoldenCheetah)
macOS and Linux: [](https://travis-ci.com/GoldenCheetah/GoldenCheetah)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.