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.
Provide more data to Garmin Training Center and
also makes the export compliant with the latest
TCX schema. It displays correctly in GTC.
As an avid runner and biker I use GTC to combine
the data from both sports for additional analysis.
I'm sure others would benefit from the additional
data in the TCX file when importing to other tools.
The following derived/computed metrics have been
added to the export:
1. Added MaximumSpeed
2. AverageHeartRateBPM
3. MaximumHeartRateBPM
4. MaxBikeCadence
5. AvgSpeed
6. AvgWatts
7. MaxWatts
8. HeartRateBPM defaults to 1* (if not present or zero value)
*Garmin training center won't display the HeartRate
charts if the tag isn't part of every TrackPoint and
greater than zero.
Write a valid TCX file, that conforms to its
schema, including;
- ProductId is ProductID
- Watts must be an integer
- Language ID is required
- PartNumber has a specific format
Tcx XML HR must be positive, so if there is no
value (i.e. it is zero) then don't write it.
Thanks to Dean Junk for diagnosing this and
posting his findings to them mailing list.
Added a function for Batch Export of current
activity history. The user can select files
to export, the target directory and format to
use.
This completes the updates to improve export
functionality.
Fixes#476.
The export functions in mainwindow are getting quite
cumbersome with multiple menu options.
This patch creates a single menu option "Export.." which
allows the user to select a supported format and a filename.
To support this the ridefile reader code needed to be adjusted
to allow registered readers to declare capability to write and
use a consistent (virtual) method to do so.
By modifying the base class for ride file reader we now allow
new readers to register both read and write capability.
GTC will export all rides as a single TCX file so they
can be imported en-masse into another application.
We did not support >1 rides in a single ride file. This
patch adds support for reading multiple rides (if the ride
file reader supports it).
The ride import wizard will now extract and parse files from
a GTC export. Many thanks to Damien for writing the TCX file writer.
Fixes#371.