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
  • 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

    No problem, I'm glad it fixed the issue. If restarting the watch fixed it, then I don't think it is a problem of the app.
  • I would like to share some data from my last activity. Maybe it would be helpful in future improvements.
    So today I swam 1200 meters. (12 intervals, 100 m. each., without breaks). As you can see in summary total distance is 1475 m. I counted laps (high and low peaks) on heading chart and it looks like everything is correct because there are 48 laps (25 meters pool). I do some math: 1475-1200=275, 275/25=11 so it looks like on each interval I have one lap in surplus ;)
    I think it works that way:
    - when I reach wall at the end of interval I press lap button and lap is added
    - when I start swim in opposite direction another lap is added automaticaly
    How avoid this?

    Even that I still think this app is awesome and when I swim without intervals it works perfect :)

    Here is a link to my activity:
    https://connect.garmin.com/modern/activity/1473706883
  • I think it works that way:
    - when I reach wall at the end of interval I press lap button and lap is added
    - when I start swim in opposite direction another lap is added automaticaly
    How avoid this?

    this really looks like a bug :o
    i never experienced it because i make laps with the start/stop button. i take the chance to take a rest, i am a bad swimmer :)
    i will look into it and fix it.

    thanks for reporting!

    i have a question to your activity: the app calculated about 10strokes/min (this is one arm => it would be about20 strokes/min). how feasible is that? you'd say is working fine?
  • v3.2-upd.1

    v3.2-upd.1: fixed bug: duplicate lengths after triggering manual lap
  • 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.

    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.


    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.



    heading looks perfect in this activity.


    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.


    I realised I was using an old version of the app shortly after posting the above. I have now forced an update.
    I've deliberately stayed off the latest version of firmware, as there are always issues with updates and I was happy with 5.40. Will have to see if I still have issues and maybe try it.

    "my guess is that after 3rd split, you press lap button to trigger a split, but you did not begin to swim."
    No, I never pressed lap/pause button at all on any of these activities.

    I'll see how I get on with the newer version of the app.

    Interesting piece on how the manufacturers do lengths using the accelerometer? Did you play about with that at all, maybe in conjunction with the compass also?
    https://www.dcrainmaker.com/2014/04/tomtom-cardio.html#swimming

    "It’s important to note that the way all swim watches on the market work today indoors is not via GPS, but rather via accelerometers. As such, pushing off the wall is ultimately what tells the watch whether or not you’ve completed a lap."
  • this really looks like a bug :o
    i never experienced it because i make laps with the start/stop button. i take the chance to take a rest, i am a bad swimmer :)
    i will look into it and fix it.

    thanks for reporting!

    i have a question to your activity: the app calculated about 10strokes/min (this is one arm => it would be about20 strokes/min). how feasible is that? you'd say is working fine?


    Today's visit on the pool gives me this outcome:

    https://connect.garmin.com/modern/activity/1476029383

    10 intervals x 100 m. Total distance 1000 m. Everything is correct :D Thanks for this immediate update. I appreciate it.


    And regarding your question about number of strokes. Durning one lenght of the pool I counted 10-12 strokes (one arm) in 30-35 seconds (front crawl) .
    This Connect IQ field with avg stroke rate shows one arm strokes?

    Let me know if i can help somehow
  • No, I never pressed lap/pause button at all on any of these activities.


    maybe you pressed the button without intention. but if you go to "intervals" section of this activity:
    https://connect.garmin.com/modern/activity/1472875086
    you'll see there are three intervals. (well, actually there are four. this happens in all activities, there is always an empty interval at the end. i think it is a garmin issue, but i am not sure though...)
    anyway with current version there is no calibration after laps. therefore this shouldn't be a problem anymore. tell me how it goes with most recent version.

    Interesting piece on how the manufacturers do lengths using the accelerometer? Did you play about with that at all, maybe in conjunction with the compass also?
    https://www.dcrainmaker.com/2014/04/tomtom-cardio.html#swimming

    "It’s important to note that the way all swim watches on the market work today indoors is not via GPS, but rather via accelerometers. As such, pushing off the wall is ultimately what tells the watch whether or not you’ve completed a lap."


    :)
    i am also a Ray follower. i even asked him a couple of things in his forum, and I even got an answer!
    i really dont think i will be using accelerometer data to detect lengths. I think, that the app measures distance accurate enough by using just the compass. it works pretty well for me. and i have even some room for improvement, there are sections of the code i want to improve.
    using accelerometer data would introduce an additional source for false length detections.
    i dont mean that all watch manufacturers are wrong. but the data analysis posibilities within ConnectIQ are very limited. I acquire data (heading, acceleration) at 10 Hz. but i just can write in the FIT file 1 sample/second (best case). this means there are 9 samples every second that i can just guesstimate. this is driving me crazy for stroke/counting, for instance.

    By the way, i am not the first one who had the idea. check this out:
    https://www.dcrainmaker.com/2011/12/great-swimming-mp3-player-shootout.html
    "This is because unlike most swim distance watches, this one actually doesn’t use an accelerometer – but rather a compass. This means it tracks the changes in direction each lap (flip or open turn)."

    :) anyway thanks for the suggestion. i really appreciate it.
  • 10 intervals x 100 m. Total distance 1000 m. Everything is correct :D Thanks for this immediate update. I appreciate it.

    i am glad it is fixed. :)

    And regarding your question about number of strokes. Durning one lenght of the pool I counted 10-12 strokes (one arm) in 30-35 seconds (front crawl) .
    This Connect IQ field with avg stroke rate shows one arm strokes?
    Let me know if i can help somehow


    the chart is in strokes/length. and the summary (botton left) is the strokes/min over the whole activity.
    in the chart you should see a line oscilating between 10-12. and in the summary you should see around 20 strokes/min.
    summarizing: stroke counting sucks. i swum yesterday, and i already realized. what surprised me is that the app understimates strokes. i had guesed, it would be the other way around.
    i have a couple of ideas. we'll see. but i dont feel very optimistic regarding stroke counting.
    could you provide me today's FIT file? i write in it some debug information which might be useful to improve the algorithm. i have my data already. i suck at swimming. and it is always better to have somebody to compare with :)
  • i am glad it is fixed. :)



    the chart is in strokes/length. and the summary (botton left) is the strokes/min over the whole activity.
    in the chart you should see a line oscilating between 10-12. and in the summary you should see around 20 strokes/min.
    summarizing: stroke counting sucks. i swum yesterday, and i already realized. what surprised me is that the app understimates strokes. i had guesed, it would be the other way around.
    i have a couple of ideas. we'll see. but i dont feel very optimistic regarding stroke counting.
    could you provide me today's FIT file? i write in it some debug information which might be useful to improve the algorithm. i have my data already. i suck at swimming. and it is always better to have somebody to compare with :)



    Here you are:

    :)
  • Durning swimming with Pool Swim app comes to my mind some ideas that I wanted to share. I hope it will be useful to someone else also.

    Could you consider my proposals:

    - Auto-laps - after swimming a certain number of lenghts of the pool, automatic time split will be added. I thought it would be easier to control this function from mobile phone. On existing already screen with pool lenght, there could be option to enable or disable Auto-lap (be default could be off, because maybe not everyone want to use it or deal with these settings). After enabling Auto lap there will be possibility to set when auto-lap will be triggered. For example: I swim 1000 m. and I would like to have splits after each 100 m. so I set auto-laps parameter to 4. When I swim and I would like to have splits after each lap I set parameter to 1.
    - additional screen with data - durning swimming (underwater and durning movement) it's hard to see digits from the main screen because they are too small. It is possible to add another screen with one or two fields with distance or lap counter (something like screen with HR). Sometimes it's good to know how far is to the end of training ;)

    What are you thinking about it? It is reasonable?