Fernando Maldonado pointed out that if he deselected, for example, Cadence on
the Ride Plot, then switched to another ride, the Cadence check box remained
unchecked but the Cadence curve showed back up on the plot. To hide the
curve, he had to check and uncheck the box again. This commit fixes that bug.
I'm not entirely happy with this fix. I'd rather AllPlot had access to the
QCheckBox objects in AllPlotWindow, but I can't think of a clean way to do
that. This patch at least seems to work.
A new tab on the ride analysis view for analysing ride data in three
dimensions. Interval selection is supported and a z-axis slider is
available for helping to identify data in the z-plane. A color legend
is displayed since coloring is independent of x/y/z values.
Coloring and Z axis values are averages for associated values of x/y.
The code requires qwtplot3d to be installed (see gcconfig.pri.in) and
with older Mac dev envs you will need to add -lz to LIBS too. (LIBS += -lz).
On Linux qwt3d_function.h needs a #include <stdio.h> added to compile.
Greg Steele helped design and test.
There are 2 open issues x/y/z axis labels occasionally appear in the
wrong place. lastly, the bin selection is for X&Y bin sizes and it
would be better to have separate sliders.
This commit adds a page to the config dialog in which the user can choose
which metrics GC will show for intervals. The GUI design could use some work,
but the functionality is there. All implemented metrics are available to
choose, and choices are saved across restarts.
Move the logic for how to compute RideMetrics from a RideFile, including
dependency tracking, out of RideItem and into RideMetric. I'm going to start
using them for intervals as well as rides, and I don't want to construct a
RideItem for each interval. It also seems more natural here. For
performance, RideItem still caches the computed metrics for a RideFile.
In the average column of the RideSummary, we don't need to re-emphasize that
the averages names' start with "Average ". I hope this doesn't cause
problems for translation.
Instead, just list the symbols of the RideMetrics for each column, then get
the name and precision of each metric from the RideMetric object. This change
builds the groundwork to letting the user specify which metrics to show.
The symbol of a ride metric is the string by which we refer to it in the
code, configuration files, and caches (like stress.cache). It should not
be translated, and it should never be shown to the user.
If the user forgot to end an interval before downloading a ride, GC
would crash due to an assertion failure. The included ride file
demonstrates the bug.
Another rightclick menu for intervals, adding a bring to front and send to
back option but only when viewing the pfPvPlot, additionally the algorithm in
PfPv plot for determining which interval a point is used for has been adjusted
to fully populate every interval curve where appropriate (and incorrect
comments and redundant code have been removed).
IntervalItems now have a display sequence number so when you have
overlapping intervals you can bring to front and send to back on the
PfPv plot. The display sequence could be used on other plots if/when
they distinguish between intervals.
Previously, the coloring of intervals on PfPvPlot was determined solely
by the order they were defined which could be quite confusing.
This patch removes the QToolBox from commit e93970 and replaces it with
a QComboBox instead. A new object ViewSelection can be included in any
new views and will manage the interaction with MainWindow to switch
between views. It is essentially a QComboBox with some code to interact
with MainWindow.
A new signal viewChanged(int) has been implemented in MainWindow to
notify of a view change. The parameter will be set to VIEW_ANALYSIS
or VIEW_TRAIN depending upon which view was selected.
In addition, a new TrainWindow object has been created which implements
the Realtime code and is comprised of the TrainTool and TrainTabs
implemented in e93970. It also sets its splitters from remembered values
in the same fashion as the central splitter on the Analysis view.
Summary analysis suggests the new (v29) of the WKO 3.0 file format does
not contain any differences (or noticeable) to the previous version.
This patch enables files to be imported using the existing code instead
of being rejected because they are 'newer than the supported format'.
Further testing and analysis will be performed on the WKO 3.0 file formats
but this patch should enable users of v3 to import there files into GC.
The left side of MainWindow is now a toolbox which contains
Ride Analysis and Racing and Training options. The Right side
tabs have been reorganised and associated with the toolbox.
To support the population of the Racing and Training left tool
the config dialog has been updated to enable the user to configure
the location of their workouts.
In addition, the config dialog now calls upon MainWindow to issue
a configUpdate() signal to notify widgets when config has been
updated. This is a refactoring of the existing mechanism that
only called realtimeWindow->updateConfig, now any widget can
connect to the MainWindow signal and re-read its config appropriately.
Currently, the TrainTool and RealtimeWindow widgets have been coded to
use this.
This commit allows every ride file to specify a set of "metric overrides":
values to use in place of those for RideMetrics we would otherwise compute.
The most gratifying immediate result of this change is that we can associate a
"skiba_bike_score" metric override with each Manual CSV file, thereby
eliminating the need for a bogus "bs" parameter in RideFilePoint.
In the future, though, we can also save these overrides to a GcRideFile using
a syntax something like this:
<override>
<metric name="skiba_bike_score" value="100"/>
<metric name="average_speed" secs="3600" km="30"/>
</override>
(Note that average_speed needs to store time and distance in order to
aggregate properly.)
Then we can add a dialog that allows the user to override the computed value
of a metric for any given ride. For example, if my HRM was on the fritz
during a ride, I could estimate my average HR and override that metric.
(We might want to show these overrided metrics in a different color, so that
it was clear they weren't the computed values.)
Finally, I think we could actually use this feature to eliminate the Manual
CSV format altogether, and just use GcRideFiles without any samples or
intervals, but with metric overrides for all the available metrics.
The stress calculator works through every ride and updates stress.cache.
After each file is processed its details are wiped with a freeMemory, this
causes unsaved changes to be lost (isDirty is ignored).
This patch adds a check to make sure the file is not dirty before the
in-core values are deleted.
The docs for CreateFile indicate that to open a comm port above
COM9 you must use a filespec of "\\.\COMX". The original code
did not apply this rule and failed to open ports above COM9 as a
result. This is especially important since it is quite common for
the USB->Serial converters to assign an assignable comm port number.
When setting up the CP for a new cyclist the code for inserting
ranges called setCP with an unitialised range number variable. This
fix sets it to 0 for the very first range.
Also fixed the indentation of the code around the fix to make it
easier to follow.
With the introduction of the rideSelected signal the RideFile was
opened (as previously) by the RideSummaryWindow::htmlSummary()
member. In some cases, this signal was processed by RideSummary window
AFTER the other charts (AllPlot etc) this results in 'No data' being
shown on other charts.
This patch moves the file reading to RideItem::ride() which was previously
a public RideFile * (that is now a protected member ride_). As a happy by
product it removes the need to check if the file has already been read
across all other functions ensuring in-core values are not accidentally
overwritten. The read errors are made available by a new RideItem::errors()
member.
This modification is required to support the RideImportWizard in freeing
loaded RideFiles during batch import to ensure virtual memory is not
exhausted when large numbers of files are imported at once. This modification
is also included in this patch.
The commit replaces the erroneous commit a3ae0ee. I thought the problem with
the zones file that motivated that commit was that some of the zones were of
length zero. In fact, the problem was just that the CP is zero in the first
zone range, and a CP of zero leads to a RI of inf.