This repository provides the source code for a foot-tracking algorithm using an inertial measurement unit (IMU) attached to the foot, as demonstrated in Seb Madgwick’s “3D Tracking with IMU” video (March 2011). The method performs dead reckoning to integrate foot motion and corrects for drift at each foot strike (when the foot touches the ground) to reset error accumulation.