| Algorithm 1: A step count algorithm using cumulative sum of all pressure signals. |
|
1: Input: N channels pressure Pi (t),
2: Calculate the sum pressure Psum (t); 3: Calculate the cumulative sum pressure Pcum_sum (t); 4: Initial: Npeak = step count = 0; A = 0; B = 0; 5: For j = 1 : M do 6: if Pheel ≥ 50% of Pi max then 7: A = Calculate Pcum_sum (t); 8: else 9: B = Calculate Psum (t); 10: end 11: if (A != 0 && B != 0) then 12: Step count = Npeak + 1 = step count + 1; 13: A = 0; B = 0; 14: else 15: Step count = Npeak = step count; 16: end 17: end 18: Return: step count. |