Decoupled classes from MainWindow to reference Context
and Athlete (and introduced a couple of new headers).
We no longer pass around a MainWindow pointer to children
but pass a context instead.
There are still a few pieces left in MainWindow that need
to move to a better place;
* Setting/clearing filter selection
* Working with Intervals
* Adding/Deleting Rides
* Save on Exit
As mentioned previously there are lots of other parts to
this refactor left to do;
* break MainWindow Gui elements into Toolbar and Views
* migrate from RideItem and Ridelist to ActivityCollection
and Activity classes that are not tied into gui elements.
* introduce Application Context and AthleteCollection
Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.
Further updates will need to;
- break MainWindow Gui elements into Toolbar and Views
- migrate from RideItem and Ridelist to ActivityCollection
and Activity classes that are not tied into gui elements.
- introduce Application Context and AthleteCollection
Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
Using the CompuTrainer utility to convert GPS logs to a course profile
results in lots of very small segments where the height differences are
less than 1 metre. These were incorrectly handled as the altitude was
being stored as a long.
In fact the double to long conversion was always rounding down, for
instance 200+0.01 is 200 as expected, but 200-0.01 is 199. Therefore the
course would gradually ratchet downhill with every small data point.
Implementing a workout library that keeps
track of media and workouts that can be used
in train view.
This first part implements;
- library.xml to record search paths
- search dialog to find media/workouts
Part 2 and 3 will bring:
- Sqllite libraryDB to store found details
- Update traintool to use libraryDB and display
icons, duration/distance, IF and TSS in list
- import and drag-n-drop of new media/workouts
- incorrect RegEx to read some CRS files
- all files were assumed to be metric - (UNITS = ENGLISH) now converts
- scaling adjusted to not clip the top when some graphs were longer
As a precursor to more sophisticated workout
creation and config, the ergfile format and
plot now supports named intervals.
This is so we can identify blocks of the workout
and reuse them by name (rather than having to
select a section, which should also be supported).
A new menu option added to download workout
files from the ErgDB. Will also need to look
at upload so we can share amongst the GC
community.
Fixes#521.
The .pgmf file support needed to set the workout mode but
that was missed.
Now tested the Train View with some Tacx ErgoVideos and they
work perfectly.
The Tacx ergometer has a workout file format
(.pgmf) that is similar in concept to the
Racermate .CRS/.ERG/.MRC file format.
This patch adds support for this kind of
workout file.
Further work is required to support the .rlv
file format in order to support video playback
to match the user's speed (keeping the video
in sync as you ride).
In addition, for Turbos that do not support
variable load using gradient/slope we will need
to add an algorithm to approximate speed from
power/weight/slope.
Fixes#382
A number of new features / enhancements;
* Display IF/TSS or Elevation/Grade in the controller
when a workout is selected.
* Added buttons for forward/back which emulate the
forward/back from a computrainer controller
* Added a slider to increase and decrease intensity/grade
on-the-fly (during a workout), tied in with the
computrainer controller's + and - keys.
* Unpicked the manualOverride code previously implemented
Mostly, or at least for this release, fixes#494.
The original ErgFilePlot code used local static variables
to bridge between the selected ErgFile and the Qwt data
handlers.
This was not an issue when we only allowed one chart of this
type to be available at once. But now, with a more configurable
layout it is possible to have multiple.
The currently selected ErgFile can now be referenced from
MainWindow in the same manner as the current RideFile can.
This patch introduces no functional change for users.
When a workout file is opened, the contents are used
to calculate the NP,xPower thru TSS/Bikescore values
for the workout.
This is in preparation for on-the-fly adjustment of the
intensity of a workout and displaying the target stress
load (TSS/BikeScore) the workout will produce.
No user functional change.
The training view has a number of improvements, most
notable of which is the workout plot now plots the
telemetry as you ride. This enables you to view
your performance against the workout as you ride.
In developing and testing this I found and fixed a
number of other minor issues;
* The workout plot didn't have any axes
* The workout plot title didn't reflect the workout selected
* The workout plot markers didn't honour preferences
* Values didn't reset on stop/start of workout
* The rolling 30 second power plot in realtime was broken
* Lap numbers were not available for display
In addition, some minor changes were made;
* Save workout is no longer optional - it always saves
* The control buttons/margins did not resize nicely
* The workout plot uses colour to distinguish between
workouts that are time or distance based.
* A new default train layout for new users to avoid
having to muck about with layouts
* Removed the race servers since they are not used
and steal screen estate. Will re-introduce when
multi-rider or internet racing is implemented.
I have also added a few workout files into the
test/workouts directory, we should think about how
we can distribute these and allow users to share and
contribute them in the future.
Fixes#493.
A wizard to create workouts based on absolute wattage and time
relative wattage and time (to CP60) slope and distance and import
an existing ride, and provide some smoothing to the ride data.
Also fixes NP calculation SEGV when recIntSecs is negative.
Fixes#249
The Racermate MRC file format for workout files did not
honor TIME/PERCENT format files correcty. The code is a
little confusing because it mixes the device mode and
workout file format. Ideally, the file format and device
mode would be kept as separate state settings, but this
patch at least fixed the bug.
fixes#40