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();