This paper concerns the navigation algorithm of motion reference unit (MRU) for autonomous underwater vehicle (AUV) We apply the strapdown navigation system using middle level inertial sensors. But, because the MRU consists of inertial sensors, the values of AUV motion calculated by navigation computer are increased by drift property of inertial sensors. Therefore, we propose the attitude algorithm using switching method according to the motion of AUV From this algorithm, the drift terms are eliminated effectively for roll and pitch. But, another device is required for yaw angle.