DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Compass "nose down" calibration and unwanted ATTI events

ScrappyMavic

Active Member
Joined
Dec 18, 2016
Messages
39
Reactions
44
Age
47
After the awesome DIY rear compass cabling fix, I only had one remaining issue. The occasional unwanted switch from GPS to ATTI mode when you least expect it. Now as @BudWalker has mentioned in the past, the switch to ATTI mode was usually preceded by a large deviation between Yaw and magYaw in CsvView. (usually 30 deg or more difference) I had previously been calibrating my compass as the new app shows, with second rotation with Mavic on it's side. I just switched to the second rotation "nose down" method as indicated in the manual this morning. By examining Yaw vs. magYaw from CsvView both prior to my switch and after, I can see a fairly dramatic difference over several flights. It seems Yaw and magYaw never deviated more than 10 deg now as I flew two full batteries through many different maneuvers. No ATTI events yet but need much more testing. In the plots below, I had just calibrated in both conditions this morning, in my backyard far from any metal object.

Has anyone else experienced this? Does nose down compass calibration result in less ATTI mode events and better Yaw / magYaw tracking?

After compass cal on side (lots of magYaw deviation)
upload_2017-2-26_16-26-10.png


After compass cal with nose down (much less magYaw deviation)
upload_2017-2-26_16-29-17.png
 

Attachments

  • upload_2017-2-26_16-20-37.png
    upload_2017-2-26_16-20-37.png
    28.9 KB · Views: 48
After the awesome DIY rear compass cabling fix, I only had one remaining issue. The occasional unwanted switch from GPS to ATTI mode when you least expect it. Now as @BudWalker has mentioned in the past, the switch to ATTI mode was usually preceded by a large deviation between Yaw and magYaw in CsvView. (usually 30 deg or more difference) I had previously been calibrating my compass as the new app shows, with second rotation with Mavic on it's side. I just switched to the second rotation "nose down" method as indicated in the manual this morning. By examining Yaw vs. magYaw from CsvView both prior to my switch and after, I can see a fairly dramatic difference over several flights. It seems Yaw and magYaw never deviated more than 10 deg now as I flew two full batteries through many different maneuvers. No ATTI events yet but need much more testing. In the plots below, I had just calibrated in both conditions this morning, in my backyard far from any metal object.

Has anyone else experienced this? Does nose down compass calibration result in less ATTI mode events and better Yaw / magYaw tracking?

After compass cal on side (lots of magYaw deviation)
View attachment 7238


After compass cal with nose down (much less magYaw deviation)
View attachment 7239
For those who are unfamiliar with Yaw and magYaw. Yaw is extracted from the .DAT and represents what the Flight Controller expects the heading to be. It's initialized with compass value, but after that, it's determined mostly by the IMU data with small corrections coming from the compass. magYaw is diagnostic that CsvView/DatCon provides; it doesn't exist in the .DAT. The advantage of magYaw is that it is independent of the FC's Yaw value. It's useful when analyzing incidents where the Yaw value is suspect. magYaw is derived directly from the magnetometer data and then corrected for roll and pitch.

For an example of an incident where magYaw was used look here. Looking at the first plot it seems possible that flight may have been one of those types of incidents. Could you please provide the .DAT so we can look closer. Or, you can go to the Menu Bar and File->Export Workspace which will create a .zip that can be attached to a post containing the .csv (no need to Dropbox it).

This is a very surprising, but interesting, result. The two compass dances should each produce a valid compass calibration. Also, an invalid compass calibration shouldn't produce the results seen in the first plot. The magYaw/Yaw errors should be heading dependent where a bad calibration is the cause. That doesn't appear to be the case in the first plot.

I do think you're on to something here and suggest two things. First, re-calibrate with the nose sideways dance and see if the problem returns. If it does then do a test flight where the AC is hovering at, say, 20 meters and yaw through 720 degrees. Look at the .DAT for something like this
upload_2017-3-1_8-24-8.png
This comes from a P3 where there is good evidence that it was due to a bad calibration. Here it can be seen magYaw deviates from Yaw in a predictable, heading dependent fashion. Moreover, the deviation is both positive and negative which it would have to be if the calibration presented a distorted view.
 
For those who are unfamiliar with Yaw and magYaw. Yaw is extracted from the .DAT and represents what the Flight Controller expects the heading to be. It's initialized with compass value, but after that, it's determined mostly by the IMU data with small corrections coming from the compass. magYaw is diagnostic that CsvView/DatCon provides; it doesn't exist in the .DAT. The advantage of magYaw is that it is independent of the FC's Yaw value. It's useful when analyzing incidents where the Yaw value is suspect. magYaw is derived directly from the magnetometer data and then corrected for roll and pitch.

For an example of an incident where magYaw was used look here. Looking at the first plot it seems possible that flight may have been one of those types of incidents. Could you please provide the .DAT so we can look closer. Or, you can go to the Menu Bar and File->Export Workspace which will create a .zip that can be attached to a post containing the .csv (no need to Dropbox it).

This is a very surprising, but interesting, result. The two compass dances should each produce a valid compass calibration. Also, an invalid compass calibration shouldn't produce the results seen in the first plot. The magYaw/Yaw errors should be heading dependent where a bad calibration is the cause. That doesn't appear to be the case in the first plot.

I do think you're on to something here and suggest two things. First, re-calibrate with the nose sideways dance and see if the problem returns. If it does then do a test flight where the AC is hovering at, say, 20 meters and yaw through 720 degrees. Look at the .DAT for something like this
View attachment 7435
This comes from a P3 where there is good evidence that it was due to a bad calibration. Here it can be seen magYaw deviates from Yaw in a predictable, heading dependent fashion. Moreover, the deviation is both positive and negative which it would have to be if the calibration presented a distorted view.

Thanks for the additional points. Doing several more "sideways" and "nosedown" compass calibrations, I have been unable to repeat my initial results. What I see now, is that no matter how I calibrate, as I yaw through 720 deg as you suggested the max deviation between Yaw and magYaw is less than 10 deg. (fine, good enough) This is true regardless of sideways or nosedown.

I think what really happened was my earlier sideways calibration that lead to this post was somehow defective. That lead me to thinking the magic was in the nosedown position, when it may not be the case. Sorry to mislead anyone.
 
Thanks for the additional points. Doing several more "sideways" and "nosedown" compass calibrations, I have been unable to repeat my initial results. What I see now, is that no matter how I calibrate, as I yaw through 720 deg as you suggested the max deviation between Yaw and magYaw is less than 10 deg. (fine, good enough) This is true regardless of sideways or nosedown.

I think what really happened was my earlier sideways calibration that lead to this post was somehow defective. That lead me to thinking the magic was in the nosedown position, when it may not be the case. Sorry to mislead anyone.
Bummer. Not related to your situation but you might find this entertaining. I was trying a new set of goggles and I was absolutely sure that using them caused the RC/AC connection to be weak. Must've tried with and without the goggles 4 or 5 times to be absolutely sure that the goggles were the problem. Turned out the problem was the right angle HDMI connector that I was using.

I mentioned in the other thread that there is a bug in magYaw. It presents itself when the AC rolls far enough to cause the y axis to pass through the geomagnetic flux. This will happen at the higher or lower latitudes where the geoInclination is closer to vertical. I implemented the algorithm you mentioned here
Firmware v01.03.0000 Compass Error.
and that problem is fixed.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

Members online

Forum statistics

Threads
131,543
Messages
1,564,048
Members
160,440
Latest member
jlhdez