Commit Graph

35 Commits

Author SHA1 Message Date
Rainer Clasen
5710aeeced fix timestamps after gaps in SRM files
"secs" is miscalculated for gaps between blocks: It takes the delta
between last chunks *END*time and next chunks start time - and thereby is
off by RecInt. This error adds up for each block/gap - so, the n'th block
will by off by n seconds.

fixes issue #582.
2014-05-04 10:20:57 +02:00
Damien
84928380bd Add hemoglobin SmO2% and tHb data series (Moxy) 2014-04-19 09:22:06 +02:00
Mark Liversedge
cc70788085 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
4f1a2523d0 SrmRideFile: handle bad marker start
Marker start wasn't check - so, it could point to data outside the array
and cause a crash.

This fixes #737
2012-11-19 19:53:02 +01:00
Damien
9425a4b5c2 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
Damien
d51cb951ce 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
Rainer Clasen
29afd39645 SrmRideFile: handle bad/truncated files
SRM file reader didn't check stream status / values taken from the file.
This could easily lead to segmentation faults.
2012-07-30 18:55:50 +02:00
Rainer Clasen
d19689d8f6 SrmRideFile: don't truncate comment
last character in comment was truncated due to a bad string termination.
2012-07-30 18:55:50 +02:00
Rainer Clasen
1c6918b9d4 SrmRide: set Tags
Ride notes, slope, zero offset... were ignored during import of SRM files.
This patch sets the meta tags accordingly.
2012-03-22 19:37:50 +01:00
Rainer Clasen
edbfdefbfd SrmRide: suppress empty intervalls 2012-03-22 11:06:58 +01:00
Rainer Clasen
a375f7a4d0 SrmRide: Import marker names, aswell
so far marker names were ignored. Changed code to pick them up, aswell.
2012-03-22 11:06:58 +01:00
Damien Grauser
70c8f0223c 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
03b0dea597 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
Rainer Clasen
961e80d34c SrmRideFile: turned assertions into graceful fail
reading unsupported SRM files caused assertions. This shouldn't happen, as
it's no Programming error.

Changed the checks into graceful failures.

fixes #364
2011-07-25 19:34:10 +01:00
Rainer Clasen
5594f95275 whitespace cleanup
unfortunatly my latest patches introduced some tabs. Replaced them with
spaces to meet GC indent style.

Fixes 347.
2011-07-23 19:18:54 +01:00
Rainer Clasen
d7fe968844 fix reading signed values from srm files
seems, the assumption for "speed" in SRM7 files being unsigned was wrong.
Powercontrol/SRMWIN seem to use negative speed as "invalid".

Furthermore altitude may become negative, as well.

To address this, QDataStream now does the bit-swapping and speed +
altitude are read as signed values.

Fixes 346.
2011-07-23 19:18:40 +01:00
Rainer Clasen
57b9e28110 Added SRM5 file format read support
SRM5 basically is the same as SRM6, but lacks "blocks". This means, it
only has the date of the exercise and no further absolute time info.
Furthermore it can't flag periods of time, where no data was collected.

Due to lack of absolute time, Exercises start at 0:00, by default.

Fixes #208
2011-02-26 14:08:54 +00:00
Rainer Clasen
59ae5fc537 Fix SRM interval start/end
While the last patch for misaligned SRM Intervals did fix the out of
bounds indices (and thereby fixed the crash), it got the start/end
swapping wrong. In other words: It swapped start/end where it shouldn't
and therefore broke all interval handling.
2010-11-02 06:19:18 +00:00
Rainer Clasen
99c330edc2 tolerate swapped marker in srm files
in certain circumstances srmwin seems to (have?) written bad files: The
first/last data chunks referenced by a marker were swapped plus the "real"
start index was 0 - although chunks are counted from 1.

This patch checks for this defect and interprets the data in the same way
as recent srmwin versions do when reading files with this defect.

Though the way marker are stored in PCV makes me guess, the refernce the
bad chunk index 0 really means "last" chunk in the recording.
2010-10-14 10:12:53 -04:00
Sean Rhea
e0f6cf23e6 fix SRM interval alignment
SrmRideFile was setting RideFilePoint::interval correctly for
each RideFilePoint, but it was setting the start and stop of each
RideFileInterval it created to 1 RideFilePoint later than they
should be.  This patch fixes things so that RideFilePoint::interval
and RideFileInterval::start|stop agree about the interval bounds.
2010-03-13 11:26:02 -05:00
Andy Froncioni
a02bfaf810 Added headwind to Aerolab calculation for iAero
Added a headwind data field, which is available when using
an iAero head unit, to dramatically improve the calculation
of Chung analysis for users of more recent iAero devices.

All other data files than the iAero have the headwind term set to
zero when they append a point.
2010-03-06 13:11:36 -05:00
Sean Rhea
9b4782ab98 srm interval end bug fix
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.
2009-12-22 14:49:54 -05:00
Mark Liversedge
45d7d3c610 GPS support in RideFile
RideFile data points now include lon and lat members for the longitude
degrees and latitute degrees from the source ride files. As a result
most of the RideFile readers now set longitude and latitude to zero for
each data point, except for:

* Gc Format Files - now support read/write
* Wko Format Files - now support read
* Tcx Format Files - now support read (smoothed if smart recording)

Although there are no features within GC at this point in time that use
positioning data this may change over time. Critically, as users save
files to the new GC file format whilst adding interval data it is
important that this positioning data is not discarded before new
features arrive.
2009-12-14 19:13:45 -05:00
Sean Rhea
0789c68f30 srm intervals names match those on PowerControl 2009-11-01 20:01:20 -05:00
Sean Rhea
094e58d04d switch to QVector and fix a memory error 2009-11-01 20:00:24 -05:00
Sean Rhea
263ffd353f combine SrmFileReader::openRideFile and readSrmFile 2009-11-01 17:43:49 -05:00
Sean Rhea
d6f46b80d4 remove commented-out code 2009-11-01 17:27:48 -05:00
Sean Rhea
a312b4a881 srm.h|cpp >> SrmRideFile.cpp and rm the former 2009-11-01 17:24:55 -05:00
Sean Rhea
a49b659014 fix eol spaces -- no functional change 2009-11-01 17:21:46 -05:00
Sean Rhea
5dc82a6c93 add descriptions to RideFile types
...and use these to get rid of the explicit list of ride file type
descriptions in the import wizard.
2009-10-31 15:00:37 -04:00
Sean Rhea
a1bbf4d50f bug fix: no altitude in srm files
This bug was introduced in 5c0bdd89, which added an alt member to
SrmDataPoint without initializing it.
2009-09-01 05:38:18 -04:00
Thomas Weichmann
5c0bdd8969 Changes to add altitude data to allplot & elevation gained to ride metrics 2009-08-25 06:18:20 -04:00
Justin F. Knotzke
84f4250e4a Dan Connelly's MEGA patch.
It includes both powerzones and weekly summary plots.

  Thanks Dan.
2009-06-22 02:22:18 +00:00
Sean C. Rhea
ec38e8ca1d add device types 2008-05-27 03:53:22 +00:00
Sean C. Rhea
6e5487ca39 everything in one directory 2008-05-12 03:28:53 +00:00