Research Article

Recovering Walking Trajectories from Local Measurements and Inertia Data

Algorithm 1

Foot Trajectory Reconstruction and The peusedo-code of our algorithm.
(1)Initialization
(2)
(3)
(4)
(5)
(6)end
(7)Precompute for lifting foot trajectory estimation by solving (6)
(8)Detect Standing Status (Section 3.2)
(9)for each frame k do
(10) if in    //subproblem I
(11)  
(12)  Solve (4) for , if k in or Solve (4) for by switching and , if k in
(13)  
(14) else   //subproblem II
(15)  if k in    //the left foot is lifting
(16)   Estimate from equation (5)
(17)   Set
(18)   Solve (4) for
(19)  else             //the right foot is lifting
(20)   Estimate from equation (5) by switching and
(21)   Set
(22)   Solve (4) for by switching and
(23)  end if
(24)  
(25) end if
(26)end for