How does the Swim.com watch app work?

How does the Swim.com watch app calculate distance, timing, and stroke identification?

Here at Swim.com, we’ve received a lot of questions lately about how exactly our smartwatch app functions when it comes to counting laps, assigning the start and end times of a length, and determining stroke type.

Our app uses a combination of proprietary motion detection algorithms and the data gathered from the watch’s internal accelerometer to transform the movement you perform during your swim workout into quantifiable metrics you can use to analyze your workout and improve upon your performance.

First, for those of you who are unfamiliar, let’s briefly cover the accelerometer and motion algorithms. The internal accelerometer is an electromechanical sensor located within your watch (hardware) that senses dynamic movement, vibration, and acceleration forces. Motion algorithms are defined as “a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.” There are several motion algorithms, which are written by our staff and programmed into our app, that correlate to each movement you perform during a swim. For instance, there is one specifically pertaining to each stroke type, and another for a wall turn, and so forth.

The watch is meant to be worn on your wrist, and so the accelerometer is primarily sensing the motion produced by your arm, wrist, and hand. The Swim.com app is incapable of recording your kicking motion because there is no ankle sensor. This is what necessitates having a drill mode to record kickboard drills.

Now let’s go into how we turn all that movement you produce into the data you see on your workout analysis! First we’ll cover distance accuracy.

An accurate lap/distance count is dependent on the app identifying that you performed a turn at the wall.  Most lap swim trackers (including Garmin, Swimovate, and others) do this by using data collected and interpreted with the combination of the accelerometer/algorithms and a pre-programmed course length that is decided by the user.  They do not utilize GPS for several reasons, but mostly for reasons relating to satellite communication. Indoor pool roofs can hinder this satellite connection, and also each time the watch is submerged it will lose contact with the satellite for a split second. This produces a deviation of up to  +/- 10% from the correct distance swam.

We recommend that swimmers perform a flip turn or open turn while lap swimming, as these have the highest success rate for the app’s algorithms determining a length swam.  Each of these turns consist of a rapid acceleration off the wall (leg push-off) and a short streamline (pause in arm motion) before the swimmer resumes their stroke, which is the motion pattern trigger to tell the app’s algorithms that you’ve turned.  A turn in which you touch the wall, turn around, do not push off the wall, and immediately start your stroke again does not contain the acceleration/glide combination needed and will often fail to be interpreted as a turn by the app and produce an incorrect lap/distance count.

We’ve have also seen some instances not involving turns that can cause incorrect lap counts. Typically these include pausing mid-lap for more than a few seconds to let a swimmer pass you, changing stroke type mid-length, or if you have an extremely slow recovery/return motion on your stroke combined with low stroke rate.  We recommend trying to avoid this if you can.

Now, let’s go into how start and stop times are assigned to your lengths!

When you start an interval, the beginning of your interval time is based on when you take your first stroke with the watch-wearing arm. Variables that can affect this include block or push starts and how long your streamline is and whether or not your first stroke is performed with the arm wearing the watch.

Times of lengths within the middle of an interval are determined by an estimation calculated based on three motion signatures: the turn initiation (pause in stroke rhythm), the wall push off (rapid acceleration), and your first stroke on the new length (resume stroke rhythm).  The speed of your turns can affect this timing assignment. If it is a slower than usual turn and you are using the non-watch arm for the first stroke of the new interval, there is a chance that the watch may interpret this as the end of an interval and start a new one, assigning a very short rest time in -between.

When ending an interval, there is no turn, and so the app must take a moment to process that you have completely stopped moving (as opposed to a quick pause – like with a streamline glide after the turn). There is a small delay while this process happens, so you may notice that your last length might be marginally longer than expected.  Right now, our tests show that time measurements done with our app, per 100y interval, may differ by about up to 2 seconds as opposed to if you had someone record you with a stop watch.

Finally, let’s talk about stroke identification!

Each of the four main stroke types (freestyle, breast, butterfly, and back) produce a unique set of identifying accelerometer signals. Our team uses a series of different tools to analyze the accelerometer signals from a number of sample workouts in order to create motion algorithms that help the app predict what type of stroke you are using when you are swimming. The motion algorithms that we have developed for the app are the result of a combination of different mathematical methods, including classification trees and a random forest algorithm. The sample workouts used to create the algorithms included male and female swimmers of different levels, ages and technique. Using a number of different swimmer types was, and continues to be,  necessary to develop motion algorithms capable of predicting the type of stroke for a wide range of users.

As Swim.com has evolved we recognize the need to continually improve and expand these algorithms, because we realize that not every person performs the same stroke exactly the same way and that every body is not the same. There can be hundreds of small variations from person-to-person in how a stroke is performed, including but not limited to: body type, age, injuries, flexibility, and strength.  For that reason, we will be introducing an opt-in feature in future versions of the app that allow users to send us their raw data to help improve our algorithms.

The most common stroke misidentification problem we have run into so far with Swim.com is breaststroke being reported as freestyle.  For example, even though you might be able to look at a swimmer from the pool deck and easily identify that they are performing the breaststroke, this person might have their wrist rotated in a specific manner, they might have a weak pull or an incorrect pull angle due to an injury, flexibility, or technique issue, or even a narrow shoulder width combined with a small range of flexibility. All of these little deviations and many more could potentially cause this error. Even though these are small imperfections, they are magnified when you think about the small range of motion the accelerometer is actually measuring – and so sometimes this can cause an erroneous stroke identification. One of our goals is to gather more raw data from more swimmers in order to expand and improve the definitions of the algorithm so that we can try to prevent small imperfections from giving you a misidentified stroke.

With all of our motion algorithms, all of the processing of data happens in real-time within the watch app before it is synced over to the Swim.com database where you can view your workout results.

We hope that you’ve found this post informative and encourage you to ask questions in the comment section below!

8 thoughts on “How does the Swim.com watch app work?

  1. Wow, this is amazing! I am a year round swimmer, every 2nd day, and log my swims over the years. This watch would cut out my checking the wall clock at the pool every so often, which is inconvenient. Your watch would be faantastic I am amazed that your company has developed such a new ‘invention’.

  2. Great work.

    Here are my comments:
    1) You try to autodetect interval start, that is why you are using first stroke with watch but if you want to make your personal best on 100 or 200 meters it will be not so accurate. From my point of view there must be a way to manually start and stop interval if you want high precision.

    2) I am a little bit confused (may be I do not understand something) on explanation you gave for length beginning and ending in the middle of interval. Why you have two events – “end of length” and “begin of length”? From my point of view within the interval the time one length ends next one begins. There is only one event not two. How time between wall push and first stroke is calculated in interval data?

    3) Your application detects length time and also stroke count. Problems with lengths appear (in case of my Garmin Swim) when:
    – you have to pass or be passed by someone and you accelerate or slowdown
    – you stop/slowdown at the middle to adjust cap or goggles
    – lane change
    – you do not push the wall hard enough
    and etc.
    All these situations can be easily detected using length times and stroke count during watch synchronization (not runtime during workout). For instance: if you “normally” (according to whole workout data) swim 50 meters freestyle for 50 seconds with 25 strokes and in workout you have made two consecutive 50 meters for 25 seconds with 12 and 13 strokes – it is suspicious. Same if you have made 50 meters for 1:40 with 50 strokes. From my point of view application on the phone or on the site during synchronization have to warn you about such situations and give you suggestions for correction.

    4) And finally – Have you ever got out of the pool at different side than you got into it? For more then 15 years swimming I have never done it. So, odd number of lengths in an workout is very-very suspicious. Where are my flip-flops 🙂

    1. Hi Milan!
      Thanks for the feedback!
      Right now we need to use the first stroke to start the timer. We are looking into if we can use the acceleration off the wall when streamlining to start (or a block start) or multiple signals to start the workout but right now the first stroke is the most reliable signal to start the workout. Having a manual start/stop is complicated with touch screen watches – and specifically with the Apple Watch it is hard to have this because of the need to lock the screen to prevent the water from making a false touch and also because the physical buttons are mostly reserved for Apple Watch OS functionality, with the exception of scrolling the digital crown. While we want to get our app to have the best timing possible, it is definitely not meant to replace precision timing, but to be another tool to help analyze your workout.

      Regarding lengths in the middle of intervals, the watch and app (working together) cannot actually tell when you touch the wall, so we must use an estimation calculated from the following motion signals: initiation of turn (pause in stroke rhythm), wall push off (acceleration), and first stroke (resume stroke rhythm) to arrive at the one point in time in which the app determines that the last length has ended and the new one has begun. I’ll change the language of the post to be a little less confusing!

      There is no processing of the data that happens during the sync itself. All of the data is processed in real time on the watch. We don’t really want to meddle with what the watch recorded and would rather let the user edit any discrepancies themselves after the workout populates on your account. I can certainly pass on your suggestion to our development team about possibly building out an alert of strange data and suggested correction after the workout populates on your feed!

      I want to digress a bit into explaining the sync process for those who have been having issues with it: Synchronization is just a Bluetooth file transfer protocol, so the information is just moving from the watch’s internal memory to our servers. There’s a few steps in the process itself: 1) The app finalizes and saves the data when you end the workout and the file is stored on the watch’s internal memory. 2) WatchOS makes the file available for transfer. 3) The file is sent to iOS via Bluetooth. 4) iOS sends the file to our servers and it populates on your workout feed. The delays in file transfer happen because of the nature of Bluetooth being a low energy and therefore slow, close range wireless protocol. When it’s slow and you go in and out of Bluetooth range it can cause problems with the protocol’s transmission and sometimes send over things in weird orders or in some cases, pieces. We’re not sure what the factors are in iOS/watchOS deciding when/how/with what priority they transfer data. We do know that the Bluetooth system may delay transfers slightly to improve power usage, but other than that it’s a bit of a black box, unfortunately. We are trying to see if there is anything we can do on our side to improve the consistency of this functionality – it’s a work in progress. Sometimes just force closing the watch app and restarting it can fix this. Other times it can take a combination of force closing both the watch and phone app, restarting both devices, and toggling Bluetooth off and back on. Basically anything you can do to cycle the Bluetooth connection may or may not help.

      The odd number of lengths means somewhere along the way a turn didn’t get detected or the watch picked up on a longer than usual pause and added a phantom length. I like to use the desktop editing tool to fix that when it happens to me, but you can certainly use the mobile editing tool as well! 🙂

  3. Hi, thanks for the explanation, is good to know how the little green people inside the watch is working 😉

    One of the things I like to know is if I forgot to put “drill mode” or my coach tell me “hurry up” so I can’t move from swim to table kicks… and the watch think… “this is a rest”, can I change this “rest” into a drill? this will be great… I couldn’t find it in the web app, or the phone…

    Thanks again for the explanation!

    Regards

  4. >> Right now, our tests show that time measurements done with our app, per 100y interval, may differ by about up to 2 seconds as opposed to if you had someone record you with a stop watch

    I train with instructor who measures time by stop watch – so I can compare the accuracy. I get always around +3 sec to the time measured by instructor.
    It is not actually that good as I do lots of 50s, 100s and those 3 secs are very visible. ;-(

    Of course If I swim alone I get used to subtract 3 secs from my result.
    But I would rather have swim.com subtract 3 sec automatically ;-))
    Or this is only me who got + 3 sec for every swim?

Leave a Reply

Your email address will not be published. Required fields are marked *