I need to count steps using data from Accelerometer and Gyroscope from a cellphone.
What algorithm can I use considering I have these data? Where my Accelerometer describes the velocity of the device, but don't include gravity. Example: (x: 0.3, y: -1.2, z: 0.2). And Gyroscope describes the rotation of the device. Example: (x: 0.0, y: -0.1, z: -0.1).
I can get these data every 1 millisecond.
I tried this approach but it didn't work well: https://programmerworld.co/android/how-to-create-walking-step-counter-app-using-accelerometer-sensor-and-shared-preference-in-android/
Pedometer plugins don't work for me, because I need to calculate the time for each step.