Commit Graph

25 Commits

Author SHA1 Message Date
Mark Liversedge
0134931638 Fix compiler warnings
All are harmless but for the sake of clarity have
fixed them all bar a couple;

- Lucene grumbles about signed/unsigned conversion which
  is/isn't valid depending upon the version of CLucene you
  compile with. Either way it is harmless.

- QxtScheduleView has a bunch of issues, but since it is a
  third party widget its better to leave it unchanged.
2013-02-06 15:54:32 +00: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
46c1302f57 Ignore/correct invalid start time for an interval
modified:   src/FitRideFile.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
Gareth Coco
e6a4905ead Added Garmin Forerunner 110 2012-06-17 18:48:25 -04:00
Mark Liversedge
097c9caf77 Fix SEGV on empty/dodgy FIT files
Fixes #633.
2012-02-05 09:31:34 +00:00
Mark Liversedge
47f1539495 FitRideFile distance of zero bug
Fit ride file contains samples where the distance
is set to zero, even if the previous sample is
non-zero.

The parser has been adjusted to keep the previous
distance used when a zero value is encountered.

Fixes #544.
2012-01-11 22:23:03 +00: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
fecc9a5a8c Fix FitRideFile for header change
The header size in FitRideFile has increased from
12 to 14 bytes, but the new field is at the end of
the header, not in the middle.

Additionally, there is a new global record (79) which
we now silently ignore.
2011-08-27 23:50:32 +01:00
Mark Liversedge
deffbcc52a Support FR310xt latest firmware
Fit file format can now have a 12 and 14 byte header. This
patch adds support for 14 byte headers since this is required
by the latest 310xt firmware.

Fixes #430.
2011-08-27 09:05:04 +01:00
Mark Liversedge
1d7696fb6a Fit files sometimes go backwards
FIT record type '253' occasionally causes time to go
backwards, this might be a decoding error, but for now
we force time to go forward anyway.

Looking at bad files GPS data with this patch suggests
this is the correct behaviour.

Fixes #104.
2011-08-06 17:45:20 +01: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
878647fbd0 Fit: handle unknown fields gracefully
So far the FIT parser bailed out, whenever it found something
unknown/uninterested to GC. This is quite orthogonal to the FIT design, as
it's supposed to be extended.

renamed read_<foo> functions to match the FIT base_type names.

unified handling of "unavailable/invalid" values - i.e. if sensor data is
temporary unavailable. This allows easier and consistent handling -
especially for the uintXz base_types, which only differ by a different
"invalid" value. Had to change the type of the "values" list to int64 to
fit uint32/int32, as well.

added proper support for signed integer types. I'm wondering, why lon, lat
+ temperature were decoded properly...

added support for currently unsupported base types by just skipping their
bytes. This allows us to continue reading.
2011-07-23 13:56:12 +01:00
Rainer Clasen
97d2603a49 Fit: support big/little endian data
... on both, big and little endian machines.

Fit reader only supported little endian data on little endian machines.

All values read from FIT files are now swapped (if neccessary) according
to file and system endianess.

fixes #287
2011-07-23 13:56:12 +01:00
Rainer Clasen
f4e498c835 Fit: ignore unknown message types
do not bail out on unknown message types. This violates the design of the
Fit format of being extensible.

As this was the last thing using the global_msg_names QMap, I've nuked
this, aswell.
2011-07-23 13:56:11 +01:00
Gareth Coco
c4f379d12c FIT file reader fixes
1. Allow FIT reader to recognise the file comes from a Garmin Edge 800
This is Garmin product ID 1169 in the decodeFileId routine.

2. Ignore global_msg_type = 72
This message appeared with the introduction of the Garmin Edge 800.
There is no FIT SDK that tells us what this message is.
It appears only once and has timestamp/device serial number.
Code now recognises the msg_type as valid but we don't process it.

3. Add all decodeEvent types and work only with "timer" events
Not all event_types were present. They are now all in the function.
Previously the decodeEvent would look at all "events"
We now only decode event_types if the event is of type "timer".

Fixes: #250
2011-02-26 14:09:30 +00:00
Gareth Coco
603c56f595 Resolve Lat/Long issue on FIT file import
The FIT parser will attempt to interpolate data when filling in for smart
recording or if a record is missed. A problem occurs if one of the lat/long
points is missing or 0,0.

This patch will record a 0,0 lat,long if the record is missing in the FIT
file and when interpolating, will set any interpolated data points to 0,0
if the start or end record is also 0,0.

A 0,0 record is not plotted on the MAP tab.

Fixes #111
2010-10-26 19:12:37 -04:00
Sean Rhea
281c357605 quiet possibly meaningless warning 2010-03-23 21:06:45 -07:00
Sean Rhea
d1f003c190 the FIT saga continues
New idea: only linearly interpolate between two consecutive "record"
messages.  I don't know what else to do.  My FIT files have all sorts
of weirdness I can't explain.  One, for example, has two consecutive
start events with the same timestamp.  What does that mean?

This is all proof that just having the file "format" isn't really
enough.  What you need is the file *semantics*, and we don't have that
for FIT yet.
2010-03-23 20:59:58 -07:00
Sean Rhea
92725db36a ignore records when time is stopped
I'm not really sure what these are doing in the FIT file Jamie sent
to the list, but there's only one of them, and it's at the end of a
long rest period, so it seems safe to ignore it for now.
2010-03-21 21:59:25 -07:00
Sean Rhea
fbf4f988c9 assert.h is my nemesis 2010-03-21 08:57:45 -07:00
Sean Rhea
a217243456 fix FIT files with smart recording
Linearly interpolate missing points *except* between a pair of stop
and start event records.
2010-03-19 09:12:16 -07:00
Sean Rhea
affed979ba fix HR in FIT files with no HRM
The value 255 means, "no heart rate".
2010-03-18 08:03:56 -07:00
Mark Liversedge
32d67f21eb FitRideFile Linux fixups
Small mods to changed the capitalisation of the Qt includes and
add stdint.h uint16_t et al.
2010-03-17 22:48:41 -07:00
Sean Rhea
c0437f30e3 read Garmin FIT files
There is still the mystery of what global message type #22 is, but
other than that concern, this code seems to work pretty well now.
2010-03-17 08:22:31 -07:00