Continue Yaw Drift

Hi! I used the new version of the firmware(Copter4.2.0-dev) to test on the ground and the yaw drift, but it was difficult to reproduce it later. I attached the log:!AtY6Wtn1T07BcfU5bEg7ZWY1JZY?e=7djaWp
I hope you can see it sometime.

Using NMEA GPS Yaw
EK3_SRC1_YAW = 2

I also encountered it on 4.0.7, and the height is easy to continue getting worse.Until i saw this post:
EKF3: Fix covariance matrix stability issues by priseborough · Pull Request #16842 · ArduPilot/ardupilot (


Txs for the report. I’ve asked @tridge if he can have a look and see what’s going on.

My first guess is that the GPS position isn’t good and this has reduced the EKF’s confidence in the yaw as well. Are you testing indoors by any chance?

that log doesn’t seem to correspond to a version in our git repository. Can you point us at the git repo with this version?
Also, can you try with the latest development version and the following settings:


that will get us a “replay” log that should make it possible for us to reproduce the issue inside a debugger.

What model of GPS is it? Do you know what exact NMEA sentences it is producing? A sample capture of a few seconds of the NMEA stream would be very useful.

Thank you for your reply. Sorry, I didn’t reply in time.

Yes, this is the data I tested outdoors. Test the yaw of copter will always drift indoors, because I use single point positioning, and the position error is large, resulting in large changes in GPS YAW angle output.I tested it outdoors for a few days, and it never happened again.

Thank you for your reply. Sorry, I didn’t reply in time.

Yes,I just added the auto configuration code of GPS module based on this submitted version(6 days ago):
Plane: fixed EKF fly-forward flag for tailsitters · ArduPilot/ardupilot@497a7c9 (
This is the part I modified:

I use China Unicorecomm GNSS(UM482).

can you open your changes for JOYTON NMEA as a pull request?
Also, see my request above for a replay log.

Okay, I try pull request. I will change JOYTON NMEA to UM482 NMEA.
My next test will open the above parameters.Thanks!

I have submitted a pull request.
AP_GPS: Add new NMEA GPS type: UM482 by AwesomeOY · Pull Request #18423 · ArduPilot/ardupilot (
The new code considers that the GPS heading frame is valid only after it is successfully parsed to the heading angle. Instead of getting the “HDT” string.

I’d still really appreciate a replay log showing the problem where the yaw is spinning?
It needs:


Okay, I haven’t encountered this problem yet, it seems difficult to reproduce it again. I have set these parameters. If I encounter the problem again, I will post a new log.Thanks!