Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Sport type missing

Rank

Total Posts: 4

Joined 2020-06-09

PM

Hi,
so I was parsing a .FIT file with an activity of type single_gas_diving.
When parsing the file, the sport defaulted to INVALID.
On further research, I noticed, that the value stored in the sport type belonged to the SubSport and that there was no dedicated entry for sport.
Is this desired behavior and if yes, how should be reacted to such cases?

Regards,

Jonas      

File Attachments

Rank

Total Posts: 15

Joined 2020-02-05

PM

In the session message there is a sport type and a sub sport type. The sport type for diving is 53, but it does not look like that value made it into the public FIT SDK. It is just a coincidence that the sub-sport for single gas diving is also 53.

For diving activities, what you will see in a FIT file from a Garmin device is that the sport type will be set to diving, 53, and the sub sport will be set to one of the following:

generic - 0
single_gas_diving - 53
multi_gas_diving - 54
gauge_diving - 55
apnea_diving - 56

In your CSV file the session message shows sport type 53 and sub-sport 0, which looks correct.

We will add the diving sport type to the public FIT SDK in the October release. In the meantime, you can add "diving" with a value of 53 to the list of sport types in your project. Depending on what language you are using, sport types are either an enum or a list of #define values.

Ben
     
Rank

Total Posts: 4

Joined 2020-06-09

PM

Hi,

thank you for your explanation. I will add the sport type to the enumeration.

Have an awesome day.

Regards

Jonas      
Rank

Total Posts: 3

Joined 2020-10-09

PM

I have been looking for this information for a long time, I was very surprised when I found it here.      

Signature

Rank

Total Posts: 15

Joined 2020-02-05

PM

Version 21.40 of the FIT SDK was released today, and adds Diving to the sport type enum.

Starting today the FIT SDK has a new home. Moving forward you can download the SDK from:
https://developer.garmin.com/fit/

Also as of today, the FIT SDK forum has a new home and these forums will be made read only by the end of the week. You can find the new forum at:
https://forums.garmin.com/developer/

I look forward continuing the conversation in the new forum.