Project

General

Profile

3-axis accelerator data

Accelerometer data:
Acceleration along x - axis
Acceleration along y - axis
Acceleration along z – axis

The magnitude of 3-D acceleration data:
Sqr(acc_x^2 + acc_y^2 + acc_z^2)

Get the difference in this magnitude from the previous value.

If the value is greater than a particular threshold value, then increment the steps count.
-Threshold for walking = 6
-Threshold for running = 10

Ref:
[[https://programmerworld.co/android/how-to-create-walking-step-counter-app-using-accelerometer-sensor-and-shared-preference-in-android/
]]