A new method of estimating lower limbs orientations using a combination of accelerometers and gyroscopes is presented. The model is based on estimating the accelerations of ankle and knee joints by placing virtual sensors at the centers of rotation. The proposed technique considers human locomotion and biomechanical constraints, and provides a solution to fusing the data of gyroscopes and accelerometers that yields stable and drift-free estimates of segment orientation. The method was validated by measuring lower limb motions of eight subjects, walking at three different speeds, and comparing the results with a reference motion measurement system. The results are very close to those of the reference system presenting very small errors (Shank: rms = 1.0, Thigh: rms = 1.6 degrees) and excellent correlation coefficients (Shank: r = 0.999, Thigh: r = 0.998). Technically, the proposed ambulatory system is portable, easily mountable, and can be used for long term monitoring without hindrance to natural activities. Finally, a gait analysis tool was designed to visualize the motion data as synthetic skeletons performing the same actions as the subjects.