Commit Graph

151 Commits

Author SHA1 Message Date
Mark Liversedge
b91c8395c0 Revert "Fit : Decode Dev Fields"
This reverts commit 2e4fa9f406.
2020-07-10 08:51:31 +01:00
grauser
2e4fa9f406 Fit : Decode Dev Fields 2020-07-09 17:13:11 +02:00
Ale Martinez
e32e233d5f Add Favero Assioma Duo and several Garmin sensor ids
Fixes #3503
2020-06-18 12:34:48 -03:00
Ale Martinez
3be603a9ee Ignore additional sports in tha same session
Also removed the old logic for mulstisport sessions, now replaced
by sessionSplit.
Add Garmin Fenix 6 models
Fixes #3507
2020-06-16 20:47:01 -03:00
Ale Martinez
1c4c83af5e FitRideFile - Don't try to split when we don't have a RideFile
But to check for errors.isEmpty() is overkill, when the returned value
is not NULL, they can be warnings according to RideFileImport interpretation.
Fixes #3479
2020-06-14 15:16:29 -03:00
Ale Martinez
04b4d945fa FitRideFile - Don't call splitSessions without rideFile
To avoid crashes and since there is nothing to do.
2020-06-13 10:53:35 -03:00
Ale Martinez
74f3a213ac Don't try to split FIT files with errors
Fixes #3479
2020-06-12 19:17:39 -03:00
Ale Martinez
757a01e876 Add Garmin MTB Dynamics to FitRideFile
Grit and Flow - Fixes #3488
2020-06-12 11:34:06 -03:00
Ale Martinez
60600948be Add Tacx NEO 2 Smart
Fixes #3484
2020-06-08 11:34:10 -03:00
Ale Martinez
3450f577d3 Add Garmin HRM-Dual
Fixes #3483
2020-06-08 11:31:54 -03:00
Ale Martinez
1167cdd582 Add Edge 530 id to FitRideFile
Fixes #3404
2020-04-20 17:18:28 -03:00
flo
fae2b935e1 Support Multisport fit files
GoldenCheetah lacks support for splitting multisport fit files.
These files combine multiple sports recorded into a single
activity. Those sports are marked by session entries. These
session entries are parsed but ignored.

Fit files are parsed on-the-fly without caching data. This is
great in terms of memory useage but bad in terms of splitting
the activity into sessions because of the fit specification.
The specification allows session entries to appear either
grouped at the beginning of the file or at the end of the session
spread throughout the file.

We do cache the most relevant data entries along with the
session field entries. This hopefully adds as little overhead
as possible while parsing and in memory useage, but allows
us to determine if there are multiple session entries in one
file. If so, we can split the single file into multiple ones,
each representing a single sport (activity). Eg.: If a triathlon
is recorded using the multisport method it is split up into
the following activities:

 - Swim
 - Transition
 - Bike
 - Transition
 - Run

This corrects the metric calculation. Prior to this change
the parsed activity is tagged as a run activity and the whole
data - swim/bike HR, bike cadence, ... - was taken into account
for the run metrics calculation. Now only the relevant part of
the file is taken into account.

Laps as well as XData records are also split up to the files
created out of a single multisport file and are aligned in time.

It turned out that it is best to treat transitions as run.

Fixes: #3211
2020-02-19 17:45:53 -03:00
Erik Botö
2c0eb835d4 Fix import of HRV from Fit files where single records occur (#3323)
* FitRideFile: handle single values in decodeHRV()
Currently only records of type ListValue are handled, but single
RR-intervals can also come as type SingleValue. Before such records
were silently ignored.
* FitRideFile: Unify indentation of decodeHRV()
The indentation before was a mix of tabs and spaces, which made the code
quite a challenge to read. This unifies to use 4 spaces at least
throughout the function.
* Added test file
Fixes #3297
2020-01-28 20:19:53 -03:00
Poncho
40d03c4402 Add New Device IDs for FIT files (#3315)
add Garmin Edge 830
add Stages Cycling
Add test file for Garmin Edge 830 with Stages Cycling power meter
2020-01-26 18:52:13 -03:00
thebaron06
8a94666e91 Add the identification of Garmin HRM-Tri and Vector 3
Fixes #3306
2020-01-25 09:12:45 -03:00
Kamen Naydenov
1bf8f43f0a Add Garmin Instinct device ID (#3300)
Device information:
https://buy.garmin.com/en-US/US/p/621802/pn/010-02064-00#specs
2020-01-23 09:06:19 -03:00
Stranger
afdc860676 Add Garmin GPSMap 66 device (#3240)
GPSMap 66 can use ANT+ sensors, store in FIT format, synchronization with Garmin Connect and relevant to use with long-term activities (walk/hiking/ski).
2019-12-05 10:21:24 -03:00
Ale Martinez
5bd4404279 Avoid endless loop on FIT files unknown type and negative size
Includes a test file to reproduce the issue.
Fixes #3229
2019-12-03 14:45:47 -03:00
Ale Martinez
675cbcbe58 Add Tacx Neo Bike Trainer to ANT IDs
Contributed by Pavel Vasilyev
Fixes #3221
2019-11-24 09:21:38 -03:00
Ale Martinez
5da74f1136 Tag Multisport activities from FIT files correctly
Also remove unused Workout Code Tag
Partially fix #3211
2019-11-22 11:47:49 -03:00
Ale Martinez
5383430b19 FitRideFile - Handle resync when HRM is unbucled
Fixes #3059
2019-11-21 09:41:34 -03:00
grauser
91d0ac1639 FitFile : QuickFix FloatValue can be Multi-Value
I probably have to refactor this code...

fix #3059
2019-11-14 13:54:05 +01:00
Ale Martinez
6f50bc74e3 Garmin Fenix 5/6 new firmware uses enhanced speed and altitud fields
This maps them to correspoding standard fields
Fixes #3161 and #3168
2019-09-20 17:16:55 -03:00
grauser
937b70e596 FitRideFile : Add Powertap/Powercal and Favero 2019-08-21 11:46:31 +02:00
Keith Reynolds
1e1dceef73 Add Lezyne Super GPS 2019-07-02 15:53:47 -06:00
Frank Zschockelt
1dbe3c9be8 FitRideFile: Unify handling of invalid product id 2019-06-07 20:06:09 +02:00
Benedikt Stegmaier
f334097f30 FIT : Add Hammerhead as manufacturer 2019-06-07 19:52:30 +02:00
grauser
27e044f763 Fit : Power phases - limit to 360
fix #3030
2019-06-02 22:11:34 +02:00
grauser
a8ca30ccd7 FIT : Add Respiration Rate 2019-05-23 22:36:43 +02:00
grauser
44026a1838 Fit : Add some Garmin models 2019-05-23 22:22:00 +02:00
grauser
523be2bc0a FIT : Add Lezyne Micro-GPS
Thank you Claus Assmann
2019-05-13 18:12:56 +02:00
Frank Zschockelt
73e5d0bd4d FitRideFile: Add Lezyne MegaXL 2019-05-13 08:25:35 +02:00
Ale Martinez
f817692659 Pad missing altitude in FIT file records with previous value
Previous behavior is to pad with zeroes which inflates Elevation Gain
Fixes #3070
Fixes #3067
Includes test file
2019-04-05 20:48:13 -03:00
Ale Martinez
cce26607ea FitRideFile - Rename record field 90 as PERFORMANCECONDITION
It is not docummented but it seems to match the observed values in GC
2019-03-29 19:33:52 -03:00
Ale Martinez
81bf4a0b48 Additional Running Dynamics support
-Extra data fields renamed and scaled according to spec: stance_time_percent,
activity_type, vertical_ratio and step_length
-Average metrics for the new fields: Average Stance Time Percent,
Average Vertical Ratio and Average Step Length
-Tested using Garmin 935 with Running Dynamics Pod
2019-03-29 17:21:32 -03:00
grauser
80e99d1159 Fit : Be sure only on cad point used 2019-01-27 10:18:48 +01:00
Hennadiy Verkh
867e86e185 Set the type of activity to Ride, Run or Swim, instead of always Ride.
If exporting a Run, use rcad instead of cad
Lrbalance was never exported - fixed it.
2019-01-27 10:13:41 +01:00
grauser
05a8c49053 FitRide : Correct doubled interval duration 2019-01-13 22:27:35 +01:00
grauser
c9581079da Fit : Interval use total_elapsed_time if no time info
fix #2982
2019-01-08 23:00:41 +01:00
Hennadiy Verkh
807ea685d6 Added method decodePhysiologicalMetrics to decode garmin/firstbeat specific activity metrics
Added additional metrics to the metadata.xml
2019-01-01 22:05:20 +01:00
grauser
ad46bf9b32 FIT : Add debug logs 2018-12-17 23:52:20 +01:00
grauser
ee5e93be43 FitRideFile: Add ibike in manu 2018-11-13 21:05:25 +01:00
vlcvboyer
1191b8bd51 fix missing break in switch/case statement (#2918) 2018-08-29 09:52:56 +01:00
grauser
55ec3973c3 FIT : Change the time_offset reference
Bryton files were impacted

fix #2029
2018-07-17 22:21:37 +02:00
Ale Martinez
1f094f5712 Always expand lap swim Fit and Tcx files
Even if Garmin Smart Recording is not enabled, make users life simpler
Since otherwise the datais useless and the original lenght-by-length
data is preserved as XData.
2018-04-24 13:51:14 -03:00
Mark Liversedge
eb363c3fab Fix Swim FIT parse crash
.. not checking timeIndex() for out of bounds
   when secs goes negative during parsing.

.. also, enable interpolation for swim laps by
   default to ensure no data loss (i.e. don't
   insist on garmin smart recording setting).

Fixes #2953
2018-04-24 10:10:02 +01:00
Joern
bb06f898f4 Fix error exporting activity without data points to .FIT
... GC closes without message/ SIGSEGV when exporting e.g. manual acvities as .FIT files
2017-12-22 13:14:05 +01:00
grauser
18c43fcebd FIT : Use recIntSecs 2017-11-29 17:19:54 +01:00
grauser
ac04d20edd FIT : Export : Correct file duration 2017-11-26 23:46:34 +01:00
grauser
f573b5c48f FIT : Small addition and correction for expor
hardware_version and lap start_time had incorrect field_num
2017-11-26 22:38:50 +01:00