A Real-Time On-Chip Algorithm for IMU-Based Gait Measurement (Lecture notes in computer science)