Record Swimming activity within app

In writing an app for swimming I'm encountering a few issues.

1) I'd like to get distance updates by polling with Activity.getActivityInfo(). I've been checking the 'elapsedDistance' field of the Info object, but it doesn't seem to match the distance swum with the Fenix 5x at all. It shows around 600 or 700 (not sure which units) for a 25m swim. Am I just not interpreting this distance correctly or is this a bug or missing feature?

2) When the .FIT file which is generated syncs with Garmin Connect, the data is not right - a few times when I went for about a 100m swim Garmin Connect showed around 5k yards swum in a few minutes. Other times Garmin Connect has shown 0 for the distance. Am I not recording the swim activity correctly?

var activityName = "Swimming";
var activitySport = ActivityRecording.SPORT_SWIMMING;
var activitySubSport = ActivityRecording.SUB_SPORT_LAP_SWIMMING;

session = ActivityRecording.createSession({
:name=>activityName,
:sport=>activitySport,
:subSport=>activitySubSport
});

session.start();


and later...

var info = Act.getActivityInfo();


and later ...

session.save();
  • Fit format foresees that native fields can be overriden. This is suported by connectiq as well. My fit files can be uploaded to sites fully supporting fit format (runaluze.com, golden cheetah, sporttrakcks.mobi, to name some of them) and native field will be overriden just fine.
    the problem here is not xonnectiq, is garmin connect. They do not fully support fit, and ignore the flag fields.

    i do not agree about Jim comments. There are ways to avoid wrong data being an issue. For instance, garmin overides elevation in fit file by information obtained from a map service. And the user has the choice, to disable this for a certain activity and get back the data in the fit file. Clean and easy. Add a switch for overriden fields and let the user decide which of both to take.

    besides, I do not know how distance zero is better than any distance calculated by the app, even if it is way off. Zero is always way off. Sorry Jim, I admire you a lot, but I don't think you are right here.


    Right, I haven't launched the app yet but I know for sure I'm going to get tons of negative reviews for having 0 distance shown in Garmin Connect. This is honestly pretty terrible.