This file relies on Qt's QDataStream to handle the parsing
of primitive C types from Computrainer .3dp files, including
floats. In Qt4.5 and earlier, Qt defaulted to 32 bit
floats. In Qt4.6 and later, Qt started using 64 bit
floats by default. As a side-effect, parsing broke on
Qt4.6, leading to a crash when importing or using .3dp files.
This patch fixes the issue by using QDataStream's
"setVersion()" method to tell Qt to use the Qt4.0 serialization
format for the QDataStream used in this file. This
patch does not affect any other files. This patch
should make the formatting assumptions both backwards
and forwards compatible.
I think the previous implementation could have referenced already-deleted
RideItem objects during calls to Split Ride.
This commit removes the calendar's own map of RideItems, and instead
uses the list of rides in MainWindow::allRideItems. Because I use
binary search on that list, this implementation should be just as fast
as the old one. But because I don't hang on to any RideItem pointers
beyond a single call to RideCalendar::paintCell, it shouldn't be
vulnerable to referencing already-deleted RideItem objects.
Since the daily stress values are readily available
from the stress calculator this patch shows them on the
chart to show the make-up of the training that has resulted
in th short term and long term stress scores.
Ideally, we would also show the relative intensity for each day
too so you can view, at a glance, the intensity AND volume of the
ongoing training load -- but the intensity is not readily available
in the calculator or the stress.cache file.
Need to call item->ride() in order to load the ride, and should ignore those
for which the result is NULL. Do this after checking the date, though, so
that we don't load older rides into memory.
Before, if distance and speed were both zero, time_riding was set
to zero, and the manual ride time would not be included in the
weekly summary. This patch fixes that by overriding time_riding.
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.