Commit Graph

42 Commits

Author SHA1 Message Date
Joern
0175f85320 XML Ridefile Formats exports - error on Windows
... UTF-8 ByteOrderMarks was missing in the exported XML,... files causing problems on Windows e.g. in cyrillic
... BOM header added for PWX, Fitlog, GC and TCX format
... Fixes https://github.com/GoldenCheetah/GoldenCheetah/issues/1547
2015-10-09 13:12:07 +02:00
Mark Liversedge
34dacb20ed API Fetch Activity format=...
.. when retreiving an activity using the API
   you can now specify the format you want the
   data to be returned in.

   it can be one of;
   tcx - garmin training centre xml
   pwx - training peaks xml
   json - goldencheetah json
   csv - all available data (not powertap csv)

.. along the way the file writers for the respective
   formats now accept a NULL context to work standalone.
   this may be useful as a file conversion tool.
2015-09-08 21:13:17 +01:00
Alejandro Martinez
7dd10d7c75 Fixed interval alignment
To be inline with the new interval structure
Problem was clearly visible in swim workouts (Manual, TCX and PWX).
2015-06-25 11:12:59 -03:00
Mark Liversedge
40fdc66a1b Add Core Temperature
.. New derived data series representing an estimate of core temperature
   on the basis of HR changes.

   * shown on AllPlot and RideSummary
   * 2 new metrics; max and avg core temperature

.. This has been based upon "Estimation of human core temperature from
   sequential heart rate observations" Mark J Buller, William J Tharion,
   Samuel N Cheuvront, Scott J Montain, Robert W Kenefick, John
   Castellani, William A Latzka, Warren S Roberts, Mark Richter,
   Odest Chadwicke Jenkins and Reed W Hoyt. (2013). Physiological
   Measurement. IOP Publishing 34 (2013) 781–798.
2015-06-18 18:41:04 +01:00
Claus Assmann
1d5755443d Fix comment typos 2015-06-07 16:31:56 +01:00
Mark Liversedge
0e11f9de11 RideFile::intervals_ now array of pointers
.. so we can keep a reference to the user interval
   in a ridefile from the rideitem and not worry about
   trying to match or handle index offsets into the array

.. this is required to fixup the relationship between
   an IntervalItem and a RideFileInterval in RideItem
   and RideFile respectively.
2015-05-18 13:57:21 +01:00
grauser
28f9576359 Interval: Add interval type (Device, User, Peak, Route,...) 2015-04-30 18:20:22 +02:00
Alejandro Martinez
129ee0e264 Added support for smart recording and lap swimming in pwx files
Smart recording interpolation fills the gaps in pwx files present
when the original .fit or .tcx files had them.
Test files for running: 1 activity in .fit, .tcx and .pwx formats
Lap swimming expands the sample-per-length and pause to 1-sec sampling.
Test files for lap swimming: 2 activities in .pwx format,
one from Garmin 910xt other from Finis SwimSense.
2015-02-23 21:09:36 -03:00
Damien
fb7f6d70d5 Garmin Cycling Dynamics : Switch on Power Phase 2015-01-06 18:44:27 +01:00
Mark Liversedge
fd6c01160d Import TrainingPeaks Manual entries
.. hr, spd, power and work are all missing from the
   data they provide, but things like duration and TSS work
2015-01-05 17:51:36 +00:00
Damien
b24ee97278 FitRideFile: Add new FIT fields
Especially for Vectors new metrics
	- Left and Righ Platform Center Offset - eg: -8mm and -11mm
	- Left and Right Top dead Center  - eg: 10° and 11°
	- Left and Right Bottom dead Center  - eg: 203° and 210°
	- Left and Right Peak Power Phase Start - eg: 83° and 76°
	- Left and Right Peak Power Phase End - eg: 115° and 125°
2015-01-05 08:01:33 +01:00
Mark Liversedge
ac5c905b10 Fix TrainingPeaks.com GPS data precision
.. it wasbeing lost when uploading via PWX file format because
   the data was not being stored with enough precision.
2015-01-04 20:09:10 +00:00
Mark Liversedge
b1bc12d853 Add Garmin Running Dynamics Data
.. read from FIT/TCX
.. write to JSON
.. view in Editor

NOTE: They are not on any of the charts yet.
2014-09-25 14:31:06 +01:00
Mark Liversedge
54f23bbab4 TP.com fixups
.. title metadata

.. title of dialog
2014-09-12 13:18:38 +01:00
Mark Liversedge
b598f8c8c2 Add Support for PWX "title" field
.. it is read/written to metadata field called
   "Workout Title"
2014-07-08 09:50:34 +01:00
Damien
8047e73382 Add hemoglobin SmO2% and tHb data series (Moxy) 2014-04-19 09:22:06 +02:00
Mark Liversedge
0a32f3c571 Add Vector/Rotor TE and PS data series
.. Added the torque effectiveness and pedal smoothness
   data series to the RideFile structures.

.. The only file formats that support it at this stage
   are Fit and  GoldenCheetah JSON.

.. As more file formats support it we will add it here.

.. The charts/editor now need to be updated to support
   these new data series.
2014-04-11 13:46:10 +01:00
Rainer Clasen
128e76bbac PWX: read/write temperature
added temperature to read/write
2013-08-26 23:00:53 +02:00
Rainer Clasen
ada0b553ed PWX export: keep timestamp + distance precision
Pwx does support for arbitrary sample lengths. No need to chop off
timestamp precision and introduce bad data + jitter.

Instead we should look at fixing data import and consider resampling on
read.

Distance is defined as double, aswell - so, let's keep the precision,
aswell.
2013-08-26 23:00:53 +02:00
Rainer Clasen
943810f7d3 fix PWX export: always write summarydata
xml schema is requiring summarydata to exist. Otherwise upload to
trainingpeaks fails.

Block was omitted when no intervals were defined.
2013-08-26 23:00:53 +02:00
Rainer Clasen
bc8c1d93d7 fix PWX export: handle end of gaps gracefully.
As I got it pwx by itself has no concept of recording intervals. "smart
recording" and other strange data require variable recoring intervals.

On the other hand it's not recording the duration of a sample explicitly.
This means the duration needs to be derived from the previous samples
timestamp (assuming the sample timestamps are referring to the end of the
sampled period).

This diff writes an empty timestamp at the end of each gap so that the
next real sample/ridepoint can calculate the correct duration.

Please note that this may unhide some deficiencies in GCs file reading in
exports.
2013-08-26 22:46:14 +02:00
Mark Liversedge
77278b2ed1 A lot less assert
There still some assert left in the code, but removed
a fair number of the examples where, its just as easy
to handle the condition gracefully, without crashing.

By 3.1 we will have eradicated assert from the code.
2013-08-04 11:06:07 +01:00
Mark Liversedge
0fcbbe1b77 Refactor MainWindow Part 2 of 5
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
2013-07-11 14:02:02 +01:00
Mark Liversedge
c56c5a9567 MainWindow Refactor Part 1 of 5
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.
2013-07-07 15:50:28 +01:00
Mark Liversedge
af28a477ea Fix PWX export SEGV
fixes #654.
2013-07-01 19:14:16 +01:00
Mark Liversedge
2c5aced70f PWX support make/model for TP.com upload
.. on request from TrainingPeaks we now add the make and model
   elements to a PWX file.

Fixes #593
2013-05-09 19:25:03 +01:00
Marc Boudreau
9440c234ad Notes (<cmt/>) from PWX files not added as RideFile tags... 2013-04-20 10:40:21 +01:00
Mark Liversedge
830f4c5e63 Improved deduction of PWX recording interval
Fixes #533.
2013-03-29 15:33:14 +00:00
Mark Liversedge
064a294715 Code Cleanup: RideFile readers
.. mostly comments about features not yet implemented, but
   not relevant to current feature set anyway.
2013-02-10 11:27:33 +00:00
Dean Junk
f688ec1cfa Updates for XML schema compliance.
Added tags for additional info in TCX file and a tries to use a
valid value for sport type/activity based on user defined meta
data.
2013-01-26 13:50:54 +00:00
Mark Liversedge
3050753a8e Fix split ride SEGV on bad recording interval
When reading a PWX file we try to guess the recording interval
by looking at the first two samples. This can lead to silly
values when there are recording errors.

This patch sanity checks the recording interval and sets it to
1s recording if the derived value is unusual.
2012-11-28 16:08:22 +00:00
Damien
4005e27039 Add FileType to RideFile
modified:   src/Bin2RideFile.cpp
	modified:   src/BinRideFile.cpp
	modified:   src/Computrainer3dpFile.cpp
	modified:   src/CsvRideFile.cpp
	modified:   src/FitRideFile.cpp
	modified:   src/FitlogParser.cpp
	modified:   src/FitlogRideFile.cpp
	modified:   src/GcRideFile.cpp
	modified:   src/GpxRideFile.cpp
	modified:   src/ManualRideFile.cpp
	modified:   src/PolarRideFile.cpp
	modified:   src/PolarRideFile.cpp
	modified:   src/PwxRideFile.cpp
	modified:   src/QuarqRideFile.cpp
	modified:   src/RawRideFile.cpp
	modified:   src/SlfRideFile.cpp
	modified:   src/SmfRideFile.cpp
	modified:   src/SplitActivityWizard.cpp
	modified:   src/SplitRideDialog.cpp
	modified:   src/SrdRideFile.cpp
	modified:   src/SrmRideFile.cpp
	modified:   src/SyncRideFile.cpp
	modified:   src/TacxCafRideFile.cpp
	modified:   src/TcxParser.cpp
	modified:   src/TcxRideFile.cpp
	modified:   src/TxtRideFile.cpp
	modified:   src/WkoRideFile.cpp
2012-11-14 00:37:24 +01:00
Mark Liversedge
88dbd9e4ec Only set PWX weight from metadata tag "Weight" 2012-10-01 19:07:32 +01:00
Damien
0b16845612 Add Left/Right Power Support
Add Left/Right Power Balance for FIT and Polar HRM parsers
 Add Left/Right Balance metric
 Add Left/Right series to Ride Chart

Fixes #711.
2012-08-19 13:57:24 +01:00
Tom Weichmann
1d21e43f4c Added notes to pwx <cmt> tag
Fixes #630.
2012-02-05 09:39:04 +00:00
Mark Liversedge
23d9fe51bc Fix PWX file intervals
Fixes #624.
2012-02-03 19:23:35 +00:00
Damien Grauser
ac3112b286 Add Temperature and Slope Data Series
This patch adds support for temperature and slope
across the ridefile readers.

For the most part their is no functional change
although it is now possible to view and edit these
data series in the editor.

File formats that can provide temp or slope include;
.bin, .fit, .srm, .sync, .wko

Further updates will be required to display the data
in the ride plot and histograms.
2011-12-03 23:17:11 +00:00
Mark Liversedge
c7e39d8824 TrainingPeaks does not have a space in it
References to TrainingPeaks should never have a
space between the words Training and Peaks.

Modified at the request of our friends over at TrainingPeaks.com.
2011-10-24 18:38:36 +01:00
Mark Liversedge
047c1dd140 File Export (part 1 of 2)
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.
2011-10-12 14:19:14 +01:00
Mark Liversedge
a1fa22149a Support Garmin Training Center Export Files
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.
2011-08-05 20:53:13 +01:00
Mark Liversedge
805e74de5a Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
f0e9d72576 PWX Ride file support
Support for Training peaks new .pwx file format. This
is an XML format (and is particularly verbose). Support
has been added to enable interoperability with WKO+ v3,
TrainingPeaks.com and Device Agent.
2010-08-06 19:48:51 +01:00