Type of sport in activity recording session

Hello,

I'm the creator of the Badminon Score Tracker app. I am now trying to associate badminton matches to Garmin Connect activities.

I've created an activity recording session using:
session = Recording.createSession({:sport => Recording.SPORT_GENERIC, :subSport => Recording.SUB_SPORT_MATCH, :name => "Badminton"});

Full code is available on Github if needed.

At the end of a match, I show some statistics about the match such as max heart rate or elapsed distance. This works well within the simulator but not with my real Fenix 3. It never displays anything. It seems the activity info object is empty.

Then I discovered that if I change the type of sport:
session = Recording.createSession({:sport => Recording.SPORT_RUNNING, :subSport => Recording.SUB_SPORT_MATCH, :name => "Badminton"});


Everything is working fine. My stats view displays good data and the resulting activity is nicely displayed on Garmin Connect website.

First of all, it would be nice if the simulator and the watches behave the same. That's not the first time I encounter this problem.

Secondly, is this the normal behavior? Why does changing the type of sport changes the type of data that are recorded? What I am supposed to use if I want to display info such as heart rate or elapsed distance in my badminton activities? Is there a place where I can find what kind of data are recorded for each type of sport?

Thanks.
  • In an app itself, the Activity.info changes about every second, and how often you look at the data determines the time between values.

    As far as what's in the .fit on a device, that depends on what the watch itself is set for. Some watches allow both 1 second recording as well as "smart recording". One second is every second, while "smart", is a bit of a "as needed" basis - and the readings might be written 5-10 seconds apart in some cases. (it saves space in the .fit)

    IIRC, you have a va-hr, and it supports both 1 second and smart, and the default is smart.
  • Still coming to grips with the watch (yes VA-HR) and can't find where to set the recording interval.
    And how to implement GLONASS tracking.

    OK...found them, deep in a menu on the watch.
  • Ok, on a va-hr, hold the right button, go to settings, then system, then data recording - that's where 1 sec or smart is set.

    As far as GPS only or GPS/GLONASS my understanding is it uses what ever was set for the last native activity used. So if you record a run with GLONASS, and then your app, GLONASS will be used. One of the Garmin folks might have more details. I know folks have suggested a way to specify this from the CIQ app itself, but it's not available at this time.
  • @FBOEDECKER I'm not sure to get your point. The subsport may be correctly written in the Fit file, but that's not my problem. I just would like to be able to control which data are recorded in the Fit file, independently from the kind of sport or subsport. And I don't want to do it manually using custom fields and manual retrieval of sensor data. Also, I confirm that I use ":subSport" and not ":subsport".

    Does that seem crazy?
  • Thanks for the information!