Distance in swim activity is useless (vivoactive)

Former Member
Former Member
Hi together,
i am creating a multisport app for my garmin vivoactive watch and i got an issue i cannot solve.

I've tried it at the weekend while lane swimming in the pool (50m). If i use the original garmin swim-app it will record my distance absolute perfectly - every lane counts 50m and thats it.
But if i use my own app, things getting worse:

I've implemented the simming part of the multisport that way:
I create an activity session with :sport=SPORT_SWIMMING and :subSport=SUB_SPORT_LAP_SWIMMING

Now, if activity is startet, i display the value i get for "activityInfo.elapsedDistance" but this is absolutely useless. If i select ":subSport=SUB_SPORT_LAP_SWIMMING" - the value is twice as big as it should be and if i select ":subSport=SUB_SPORT_OPEN_WATER it nearly ten times bigger (wtf?)

Ok, i think garmin has an algorithm implemented that indicates a new lap at the moment i change the direction on the pool wall but i hoped, that this algorithm will also be used for the "activityInfo.elapsedDistance"...

Do i have to implement an own algorithm to detect a new lane in pool and then add "pool-length" (eg 50m) to an own distance counter? Or is there another way to get the right distance while pool swimming like the original garmin swim activity?

Thank you for your advice!