Development and test of a protocol based on an Inertial and Magnetic Measurement System to measure the 3D kinematics of gait in real-life environment