This work proposes algorithms for reconstruction of closed-loop pedestrian trajectories based on two foot-mounted inertial measurement units (IMU). The first proposed algorithm allows calculation of a trajectory using measurements from only one IMU. The second algorithm uses data 1 from both footmounted IMUs simultaneously. Both algorithms are based on the Kalman filter and the assumption that while a foot is on the ground its velocity is supposed to be zero. Two methods for comparing the obtained trajectories are proposed, advantages and disadvantages of each method are indicated and a way to optimize the computation time is presented. In addition, a method is proposed for constructing one generalized trajectory of human motion based on the trajectories of each leg.