This paper describes a new quaternion-based Kalman filter (KF) for estimating human body orientation using an inertial/magnetic sensor. The proposed algorithm is comprised of a quaternion measurement step and a KF step that are connected in feedback relationship. This allows the algorithm to have a minimum-order structure (i.e., fourth order) that is computationally very efficient. Furthermore, to offer more reliable information to the quaternion measurement step, a vector selector scheme is adopted, which effectively adds the gyro measurement to the so-called Wahba's problem that conventionally uses only the accelerometer and magnetometer measurements. This protects the algorithm against undesirable conditions such as fast movements and temporary magnetic disturbances, enabling it to compute an accurate orientation estimate. Due to the computational efficiency of the algorithm, it is suitable for real-time ambulatory human motion tracking applications that require multiple and untethered inertial/magnetic sensors with low-cost onboard processing.