In this paper we study the attitude estimation problem for an accelerated rigid body using gyros and accelerometers. The application in mind is that of a walking robot and particular attention is paid to the large and abrupt changes in accelerations that can be expected in such an environment. We propose a state estimation algorithm that fuses data from rate gyros and accelerometers to give long-term drift free attitude estimates. The algorithm does not use any local parameterization of the rigid body kinematics and can thus be used for a rigid body performing any kind of rotations. The algorithm is a combination of two non-standard, but in a sense linear, Kalman