Normally, a three-dimensional orientation determination algorithm that is used in a magnetic and inertial measurement unit calculates the inclination (including both the pitch and roll) of rigid bodies by fusing the measurements of the gyroscope, as well as the measurements of both the accelerometer and the magnetometer. The measurements of the magnetometer can be helpful in improving the inclination estimation accuracy; however, once the measurements of the magnetometer are disturbed by ferromagnetic materials, the inclination estimation accuracy could be significantly decreased. Hence, a better approach should be followed in terms of not employing the measurements of the magnetometer for inclination determination. In order to achieve this goal, the component of the measurement of the magnetometer that is used for the improvement of the inclination estimation accuracy, along with the measurement of the accelerometer at each sampling time instant, is abandoned. Consequently, the remaining component of the measurement of the magnetometer, which is perpendicular to the measurement of the accelerometer, is used for the azimuth determination. After applying this process, the extended Kalman filter (EKF) is proposed for the inclination and azimuth estimations. Through experiments, the EKF is compared with three algorithms that were recently proposed with the same objective as this work, and the extracted outcomes show that the EKF approach clearly outperforms these three algorithms.