To improve the accuracy of attitude and heading reference systems for moving vehicles, an effective orientation estimation method is proposed. The method uses an odometer, a low-cost magnetic, angular rate, and gravity sensor. This study addresses the problems of non-orthogonal error, carrier magnetic field interference and calibration to obtain accurate, long-term, stable magnetic field strength. A neural network fusion 12-parameter ellipse fitting method is proposed to eliminate the soft magnetic field and hard magnetic field interference. The interference to the accelerometer from linear acceleration is eliminated by using an odometer and a gyroscope, and the high-frequency noise from the accelerometer is eliminated by using a low-pass filter. An improved method to evaluate vehicle attitude is proposed and utilized to compensate for filtered accelerometer measurement when the vehicle is moving at a uniform, accelerate and steering state. The proposed method uses an effective adaptive Kalman filter based on the error state model to reduce dynamic perturbations. Filter gain is adaptively tuned under different moving modes by adjusting the noise matrix. The effectiveness of the algorithm is verified by experiments and simulations in multiple operating conditions.