Design and evaluation of a Kalman filter for estimating body segment orientation using inertial and magnetic sensing near ferromagnetic materials