Fig. 1

The angle of each lower leg is compared to the critical angle \(\left( {{\uptheta }_{{\text{c}}} } \right)\) to determine uprightness. Accelerometer measurements (ax, ay, and az) and gyroscope (i.e. angular rate) measurements (p, q, and r) are in the local coordinate frame—x, y, and z. Roll \(\left( \phi \right)\) and pitch \(\left( {\uptheta } \right)\) are measured using the fixed global coordinate frame—X, Y, and Z