sparkweaver / MyFitnessApp

Ann application for walking, to start with.
MIT License
0 stars 0 forks source link

Implementing Accelerometer based measurements #18

Closed sparkweaver closed 3 months ago

sparkweaver commented 3 months ago

Background

After the problems with using the geolocation class, I looked for different means to do the distant measurement. There are two ways to do it after a quick search

Conclusion

I will attempt to use the accelerometer to measure the total distance, but this will be done in a roundabout way.

  1. Step Counting: Multiple videos explain how to use the accelerometer, including how to determine when the user takes a step. So, I will include this in the initial design.
  2. Distance Estimation: After the step counter works well enough, I will see if I can use the device's measured acceleration with some basic equations to estimate the distance.
sparkweaver commented 3 months ago

Implementation

I have created two classes:

Testing

When testing the application during a walk, I could clearly see that the number rose by 2-10 units at each step I took. This shows that the initial integration works but needs adjustments to add one unit.

Next Step

There are multiple ways to handle this. I will most likely try the first things that come to my mind:

Sources

sparkweaver commented 3 months ago

Improvements to Previous Implementation

To enhance the step detection accuracy, the following modifications were implemented:

Testing

The application was then tested by myself and a family member, representing fast and slow walking speeds, respectively, to ensure versatility:

Conclusions

Next Steps

Considerations

Enhancing filtering and control mechanisms impacts the device's performance and energy consumption. future developments may need to address potential compromises.

Sources

sparkweaver commented 3 months ago

The feature continued to grow and will contain multiple related challenges. To better manage the development and provide a clear overview of the progression. I have decided to close this issue and split the parts into two new issues:

  1. 19 will mention the creation of the step counter to its initial state.

  2. 20 will encompass multiple aspects that will be used to enhance the step counter.