App: Pool Swim

https://apps.garmin.com/es-ES/apps/f134a024-6ee4-47d3-8aec-3a397e3c9733



Track your pool swimming activities with your FR230 and FR235.
You can find the user guide and get support here: https://danipindado.github.io/Garmin-ConnectIQ-pool-swim-app.html


Credits
Icon made by Freepik from www.flaticon.com

You can donate my ConnectIQ development via PayPal here: https://bit.ly/2h1EMT1

Changelog
v1.0-upd.1: bugfixes. heading might drift sometimes.
v1.0-upd.2: improve heading calculation. new multicolor icon.
v2.0: support FR630. HR data.
v3.0:Initial support stroke count (feature as beta, waiting for your feedback). Several changes in memory managment and process execution for better performance and stability.
v3.0-upd.1: fix issue. data needed for stroke count analysis was not properly written in fit file. otherwise same functionality as v3.0
v3.1: discard menu: when exiting app, now you can choose between resume/save/discard.
v3.2: display summary window when paused.
v3.2-upd.1: fixed bug: duplicate lengths after triggering manual lap.v3.2-upd.1: fixed bug: duplicate lengths after triggering manual lap.
v4.0: most common pool length values and watch screen format & fields can be configured in watch. hold "up" button for three seconds. small adjustments heading. Several cosmetic changes.
v4.1:
calories can now be selected as screen field in watch menu.
new app setting "DEBUG" which enables writting of accelerometer and heading data @10Hz in FIT file (default disabled)
new feature autolap can be configured in watch menu (default disabled- when enabled, it triggers a new lap every n lengths, where n is a configuration parameter)
several bugfixes and memory enhancements.
v4.1-upd.1: bugfix calories calculation which caused crash when hr monitor is available.
v4.2: new FR630 key definition. improve how pace charts are displayed in Sport Tracks. See https://danipindado.github.io/Pool-Swim-app-v4.2-released.html
v4.3 Implement imperial units. Improve heading calibration. https://danipindado.github.io/pool-swim-app-v4-3-released.html
v4.4 Memory & stability improvements. new heading filter. stroke counting temporarily removed. https://danipindado.github.io/new-pool-swim-version-with-improved-length-detection.html
v4.5 New stroke rate algorithm. Small bugs and improvements. https://danipindado.github.io/stroke...pool-swim.html
v4.6 Garmin swim watch compatibility: recording continues during pause and stroke rate takes one arm into account only. heading chart shows now sine instead of rad. intensity field added (only 3rd party sites supporting ConnectIQ, f.i. sporttracks) https://danipindado.github.io/pool-swim-apps-improves-compatibility-with-other-swim-watches.html
v4.7 update summary window. update user guide. https://danipindado.github.io/Garmin-ConnectIQ-pool-swim-app.html
  • Hi,
    OK, I think I have understood. You would like to have a button to delete last length on the fly. Cool idea.
    I was thinking of adding a menu in the app, so that one can configure the pool length directly on the watch, not on the smartphone. Maybe your feature could also go in this menu :
    1)hold arrow up to show menu
    2) choose option 'delete one length'
    3) confirm/discard

    Would this approach be OK for you?

    And what about the idea of configuring pool length in the watch? Do you all of you guys find this is a good idea? Or do you prefer the current approach with the smartphone?
  • As for me it's not a big deal to change pool length at mobile app. It's not such often task. But let's wait for other members.

    And about new feature: your approach make sense. But in this case we will lose this time and next lap will not be complete. Let's think about some other approach. Maybe, other users have some cool for this feature.
  • As for me: it's not often case to change pool length so it can be changed at mobile app.
    And about new feature: your approach make sense, but in this case next lap will not be full(discarded time and strokes will be missing). Let's think on some other approach. Maybe, other members have cool ideas.
  • As for me: it's not often case to change pool length so it can be changed at mobile app.

    you are true that this is not something one does very often. but for instance, when going on holiday or travelling abroad, one might have the chance to swim in a different pool. but one needs internet connection to change the parameter via the app. if this is already available in the watch, it would be very straightforward.

    And about new feature: your approach make sense, but in this case next lap will not be full(discarded time and strokes will be missing). Let's think on some other approach. Maybe, other members have cool ideas.

    yes, lets wait for suggestions.
    anyway i got some FIT files with this kind of issues, and i hope i can do my app more robust so that they do not happen.
    still, the idea with the menu option might be useful, so that the overal distance matches before uploading to garmin connect. while in the menu, the activity would be paused so that no time is added. i will give it a second thought and wait for feedback too.
  • Also, what I see if I change swim style then app counts one lap. So, one more suggestion from my side is to count lap if there is rest time for 1-2 sec. So in this case lap will be calculated only after rest time. But, I'm not sure that this aproach is applicable for all users. I think that some prefer to swim without rest time for couple laps.
  • Still struggling with this a bit. Its close, but not enough that I can just give up on counting.
    I ensured I didn't pause for any length of time.
    But the directions in GC does seem to lose itself after a bit.

    3 activities, one after the other.

    20 lengths breaststrike, measured 400m instead of 500. The direction because weak towards the end for some reason.
    https://connect.garmin.com/modern/activity/1472875086

    10 lenths front crawl, overmeasured towards the end of activity for some reason:
    https://connect.garmin.com/modern/activity/1472875295

    10 more lengths breaststroke, distance spot on:
    https://connect.garmin.com/modern/activity/1472875508

    Any ideas why the heading deciated in those activities, and is there anything that could be done in the algorithm to mitigate it?
    In fairness it does look like the data from he watch was garbage for whatever reason, but wondered if it could somehow be 'ignored' or smoothed over?

    Out of interest, how does the compass even work in a foreerunner 235? I'm using it indoors, so it cant be GPS. But equally your wrist is going in all directions, so surely it cant be a magnetic compass either? Or does it use GPS as best it can indoors?
  • i think you are not using latest app version, v3.2. in previous versions I did a heading calibration during the first 10 secs or every split.i have changed this in v3.2. from this version just one heading calibration is done, during the first 10 seconds of the activity.
    20 lengths breaststrike, measured 400m instead of 500. The direction because weak towards the end for some reason.
    https://connect.garmin.com/modern/activity/1472875086

    here it begun to fail after split 3. the first three splits are spot on. my guess is that after 3rd split, you press lap button to trigger a split, but you did not begin to swim. and therefore the heading calibration was wrong. this will not happen with v3.2, because calibration takes place just once, at the very beginning of the activity.

    10 lenths front crawl, overmeasured towards the end of activity for some reason:
    https://connect.garmin.com/modern/activity/1472875295

    i think this is the same issue, but just at the beginning of the activity. you pressed start, but did not begin to swim immediately. and the heading calibration did not work properly.


    10 more lengths breaststroke, distance spot on:
    https://connect.garmin.com/modern/activity/1472875508

    heading looks perfect in this activity.

    Out of interest, how does the compass even work in a foreerunner 235? I'm using it indoors, so it cant be GPS. But equally your wrist is going in all directions, so surely it cant be a magnetic compass either? Or does it use GPS as best it can indoors?

    i am not an expert, but i think in the FR230 and FR235 compass is implemented by means of the internal magnetometer. In my app GPS is off. wrist is going in all directions, so i have to filter heading to make it stable. kind of a moving average.

    a little summary so that you can understand how the app works:
    1) during the first 10 secs of activity , the app "learns" in which direction you are swimming. we call this direction "NORTH", or "90°" or "1.57rad" => it is very important to swim properly the first 10 seconds after pressing start. otherwise the app will get confused with directions.

    2) when you turn back, you are swimming "SOUTH" or "-90°" or "-1.57rad". on a well calibrated activity you will see that the heading chart oscilates between -1.57rad and 1.57rad aproximately. when the heading crosses 0°, app will trigger a length. if your heading chart has stable levels very different to -1.57 or +1.57 (like in 4th split of your first activity, or like in your second activity), it will not work fine.

    short summary: press start, and then, swim!! :)

    EDIT: i have realized you have fw 5.40, while the latest available version is 6.30. In version 6.20 there were some fixes related to ConnectIQ. while i don't think your issues with my app are related to this, i cannot be sure either.
  • Also, what I see if I change swim style then app counts one lap.

    this should not happen. only i have realized, the app does not work properly when you change from breaststroke, butterfly or crawl, to backstroke. backstroke is not very stable at the moment. but the rest of the changes should work just fine. i usually alternate crawl and breaststroke. and this works just fine. i cannot swim butterfly but i have seen files from user who swum butterfly and were fine. only backstroke has issues.
    So, one more suggestion from my side is to count lap if there is rest time for 1-2 sec. So in this case lap will be calculated only after rest time. But, I'm not sure that this approach is applicable for all users. I think that some prefer to swim without rest time for couple laps.

    when you rest, you should press pause. when you are ready to begin, you start again. this way, rest time is not measured in the lap. besides, if you dont press pause and rest for more than 10 seconds, there is a risk that an additional lap will be triggered.
  • this should not happen. only i have realized, the app does not work properly when you change from breaststroke, butterfly or crawl, to backstroke. backstroke is not very stable at the moment. but the rest of the changes should work just fine. i usually alternate crawl and breaststroke. and this works just fine. i cannot swim butterfly but i have seen files from user who swum butterfly and were fine. only backstroke has issues.

    when you rest, you should press pause. when you are ready to begin, you start again. this way, rest time is not measured in the lap. besides, if you dont press pause and rest for more than 10 seconds, there is a risk that an additional lap will be triggered.


    I see, thank you for explanation.
  • hi,
    this has not happened to me. i cannot figure out the reason why this is happening.
    somebody contacted me yesterday via email with the same problem. for him, Restarting the watch fixed the issue.
    maybe you could try to help me figure out the reason. it would be great if you could attach the files in folder apps/logs from your garmin.


    Thanks for your help. Now it works :) I restart my watch immediately and files which you needed unfortunatelly has gone... (I assume that you need files before restart) Sorry