# Real-Time Feedback in Swimming Exercises Using Embedded Devices in Water
## 3 Results
The recorded demonstration of the front crawl swimming stroke corresponds to a single movement of the left arm, from the initial to the final position, as illustrated in Figure 5. For this test, training was conducted in water, and the corresponding training data is presented in Figure 11, showing acceleration and gyroscope readings for each sensor node. The graphs display 10 iterations readings of the stroke, where each plotted line represents a full motion cycle. Specifically, the first 40 data points correspond to the \(X\)-axis, points 41 to 80 to the \(Y\)-axis, and points 81 to 120 to the \(Z\)-axis. An analysis of the training data reveals that for the first two sensor nodes, the recorded values for both acceleration and gyroscope data exhibit inconsistencies across the 10 iterations. In contrast, the data for the third node demonstrates a high degree of consistency, with all iterations following a similar pattern. Figure 9: Data read from Node_2 (elbow) with a total of 23% similarity. This discrepancy is reflected in the results presented in Figures 8 and 9, where the similarity outputs for Node_1 and Node_2 are significantly lower, indicating the impact of inconsistent training. Following the training phase, the system computes the mean of the 10 recorded iterations, which serves as the reference pattern during the voting routine. Any deviation from this pattern in subsequent movements leads to reduced similarity scores. The differences in training quality directly affect the system's ability to evaluate new movements. For Node_3, where the training data were consistent, the resulting pattern closely matches the new input during the voting routine, leading to a similarity score of 86%. In contrast, Node_1 and Node_2 produced lower similarity scores of 27% and 23%, respectively. Despite the low similarity values, visual inspection of the plotted data indicates that the general shape of the movement was preserved, although with notable deviations from the mean pattern. Figure 10: Data read from Node_3 (shoulder) with a total of 86% similarity. These findings emphasize the importance of accurate and consistent training. When the training data are reliable, the system generates a representative pattern that enables effective comparison during real-time evaluation, leading to improved similarity scoring. In comparison, if training was performed on dryland and the voting was performed also on dryland, the system outputs very good data. Figure 12 illustrates desirable training performed on dryland. The voting results obtained during dryland testing, following the described training procedure, fall within the optimal similarity range of 90-100%. These results indicate that a well-established training pattern yields highly accurate motion recognition in controlled, dryland conditions. Based on these promising outcomes, a new approach was explored: performing the training phase on dryland and subsequently evaluating the voting phase during in-water movement. The following section presents and discusses the results of this cross-environment evaluation. Figure 11: Training routine in water for Figures 8–10 results. Figures 13-15 display recorded in-water data samples, accompanied by the application of the DTW algorithm and the corresponding _similarity percentages_ calculated using the established formula. Red-highlighted areas denote deviations in the sensor readings relative to the mean dataset established during the training phase. While the orange line (current readings) does not fully align with the blue reference line in several segments, the overall similarity score remains high. Notably, deviations exceeding a value of 1 on the vertical axis occur only in a few isolated instances, indicating that the motion pattern is generally consistent despite minor misalignments. Figure 12: Training on dryland.