Measurement of human body motion has a myriad of applications ranging from gaming, rehabilitation, animation, virtual reality, sports science and surveillance. Existing methods of motion tracking include visual, mechanical, magnetic and inertial tracking. Visual methods require line of sight and suffer from the notorious occlusion problem. For the existing mechanical or inertial tracking methods, they have cumbersome wirings which hinder the natural movements. In this thesis, a wearable wireless sensor network using inertial/ magnetic sensors is developed to overcome the limitations of these existing methods. Using tri-axial accelerometer as the sole sensor will lead to singularity when the heading axis is vertical, restricting measurement of orientation to half a vertical plane. A new factorized quaternion approach is proposed in this research to overcome this deficiency with consideration of anatomical and sensor constraints. Different from the conventional approach based on single angle-axis quaternion, the proposed approach factorizes the quaternion into two principal axis quaternions corresponding to two equivalent arm motions. This allows for the implementation of anatomical arm constraints that match the range of arm motion and reduces the ambiguity in solutions. In addition, the singularities arising from the use of tri-axial accelerometers can be detected and resolved for a transient state. A novel algorithm based on elevation and heading angles is also proposed to determine the orientation of a sensor node equipped with tri-axial accelerometer, gyroscope and magnetometer. Compared to Euler angles, the fixed elevation and heading angles are independent on the temporal order of rotations. In addition, the fixed elevation and heading angles are observable and thus more intuitively visualized.