Multi-sport datafields

Did I miss anything, or is there no way to know what sport / sub-sport is currently active (either in normal or in multi-sport mode) and what the total time is during a multi-sport activity?
  • No, there isn't currently anything that just comes right out and tells you the activity type. It should be there, but for now you have to make a reasonable guess...

    You should be able to tell if swimming by looking at one of the swim-specific members of the Activity.Info structure (swimEfficiency, swimStrokeType or swimSwolf). I'm not certain that these would be non-null on all devices that support swimming, but it might be a good place to start. I believe that the power fields (averagePower, currentPower and maxPower) will be non-null only for cycling. Other than that, the only way that I know of to tell would be to look at the speed fields (averageSpeed, currentSpeed). Unfortunately, there are some really fast runners and really slow cyclists out there.

    I haven't done any testing, but I'd expect timerTime and elapsedTime to reflect the times for the entire activity, regardless of whether it is multisport or not. Is that not the case?
  • Unfortunately, there are some really fast runners and really slow cyclists out there.


    I find that a painfully true depiction of me.

    I may also be mistaken, but currently the watch / SDK don't even support multisport from a SDK perspective. The idea of multisport from the SDK (i don't think this has change but Garmin did add support for swim-run activities) is to break the fit file into the specific sports.

    So, prev, if I were to do create a swim-run app, it would record

    swim - fit file
    run - fie file
    swim - fit file
    run - fit file

    repeat to 50 times.. LOL..

    But that's not really the kicker, currently the SDK is supposed to support sports like soccer or football but when it's uploaded to Garmin Connect, it ends up being "uncategorized" regardless of whether GC has a Football category.
  • I think you've ventured off into discussion about watch-apps and activity recording, but you bring up a valid point. What happens to the activity data when transitioning between activity types in a multisport activity. i.e., what value of startTime and timerTime are seen by the data field after the transition to the next activity type. It seems these would be reset after each mode change, but I'm not sure.

    Regardless, I think this discussion is just about data fields and being able to tell what activity type the user is currently suffering through. I have an app that measures something similar to TSS, but the factors are different for cycling and running. I'd like to have a single app that looks at the current activity type and uses the correct factors to calculate the result. As it stands, this is not possible to do reliably.

    For the time being, I've created separate apps for each activity type (one run, one cycle), and labeled them as such. Then the user has to select the 'run' data field for the run activity type, and 'bike' for the cycling activity type. I don't like it, but it works.
  • Apologies to the OP for tangent-ing his thread.

    Missed the bit about the datafield.