Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Track distance in open water

ANSWERED

We are developing an app for open water swimming. Unfortunately, we are not able to read the exercise distance, even though GPS is enabled and working. The exercise.stats.distance from the device always return 0, but when viewing the activity in the Fitbit dashboard the distance seems to be measured pretty accurately.

Is there another way to track the elapsed distance directly on the device?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Good question!

There's a chance that the Exercise API deliberately ignores the GPS (assuming unreliability) during a swim, like it does with heart rate. You could test this theory by specifying a different exercise type when starting the Exercise session.

I suspect that the Geolocation API would always work (except if using connected GPS), but it would be up to you to determine distance based on position readings. This might actually be an advantage for open-water swimming, since you'll usually want straight-line distance as opposed to track length.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
2 REPLIES 2

Good question!

There's a chance that the Exercise API deliberately ignores the GPS (assuming unreliability) during a swim, like it does with heart rate. You could test this theory by specifying a different exercise type when starting the Exercise session.

I suspect that the Geolocation API would always work (except if using connected GPS), but it would be up to you to determine distance based on position readings. This might actually be an advantage for open-water swimming, since you'll usually want straight-line distance as opposed to track length.

Peter McLennan
Gondwana Software
Best Answer

Thank you very much, it works. We use this approach now in our Swim Trainer app:

https://swim-trainer.online/

 

Best Answer
0 Votes