An inertial sensor system for measurements of tibia angle with applications to knee valgus/varus detection