Gravar-mail: Real-time inverse kinematics for the upper limb: a model-based algorithm using segment orientations