This application provides a method, apparatus, terminal, and medium for calculating navigation heading angle based on a combination of GNSS and IMU, including: acquiring the real-time heading angle and real-time
forward speed of a
mobile device at the current moment to construct a motion model of the
mobile device; obtaining the state-space equation of the motion model based on the
state transition matrix, velocity increment matrix, and
white noise sequence; obtaining a
Kalman filter measurement model based on the state-space equation of the motion model and using GNSS navigation and positioning results as observation vectors; and obtaining the optimal navigation heading angle at the current moment based on the
Kalman filter measurement model, Kalman
gain, GNSS navigation and positioning results, and IMU kinematic calculation results. This invention effectively controls the influence of large GNSS
noise, and the use of incremental data to calculate prior values also avoids the cumulative
divergence phenomenon of IMU
random drift errors.