MEMS accelerometers and gyroscopes for inertial measurement in robotic orientation and fall detection