Back to Khushaan Virk

Pedestrian dead reckoning

Jul 2026

I walked a route with known ground truth using only a phone's accelerometer and gyroscope, reconstructed the path in Python, and measured how far off it lands.

Dead-reckoned path for Run A, ending 5.14 m from the true start
Sensors
Phone accelerometer and gyroscope, no GPS
Route
5 laps of a 10 ft × 15 ft rectangle, 76.2 m
Steps
0.7 to 2.1 Hz band-pass, then peak detection
Heading
Gyro bias from a stationary block, then integration
Run A
150 steps, drift 5.14 m (6.7 %)
Run B
155 steps, drift 6.00 m (7.9 %)
Raw acceleration magnitude for one full run
Raw acceleration magnitude for one run
Ten seconds of band-passed signal with a dot on each footfall
Band-passed, one dot per footfall
Reconstructed path for Run A
Run A: 5.14 m loop-closure error
Reconstructed path for Run B
Run B: 6.00 m drift