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

Compass error demonstration

Ok my apologies, I don’t own a Mavic but I know how my phantom standard and i1 reacted in these exact same locations, pix below. With a compass error. I was totally wrong for flying in these areas but I clearly remember how my drones reacted after take off. I had to walk out of the block to keep visual. If she got far enough away without knowing the orientation of the drone it’s over.
The drone always shot forward in a east direction straight up the block.

The reason I joined the forum in January 2015

A few months back with my I2 in those exact same location take off was impossible. Now I get solid green. Go figure

4 Dji platforms all reacting

Are you sure that they were not auto-switching to ATTI, because what you are describing sounds just like ATTI mode flight? That was the default immediate response to any compass errors under earlier DJI firmware. More recent firmware versions for the newer aircraft wait much longer to switch, which seems to cause most of the problems.
 
  • Like
Reactions: Slim.slamma
So, if you left the bird on the ground with motors running, removed the magnet from effective range of the bird, it would not correct after while, but possibly would if in flight ?
And in flight correction can come far too late to avoid flyaway or crash from reading various threads ?
It does correct itself, but probably not fast enough to avoid an incident. As @sar104 mentioned the magnetometer data is used to adjust the FC's Yaw solution but at a rate much slower than the gyro data. This graph was taken from my Mavic Pro. A wrench with a magnet was placed just close enough to cause a compass deviation of 45° but not cause a "compass error". When removed the magnetometer heading (green plot) went from 15° to 61° (the correct value). Yaw (red plot) stayed the same but started the gradual change necessary to finally agree with magYaw.
73699
Note that the final difference between Yaw and magYaw is around -11°. This is due to the fact that the geoDeclination was 12.8°
9.402 : 214 [L-NS][AHRS] wmm dec: 12.817291
9.402 : 214 [L-NS][AHRS] wmm inc: 59.390961
 
It does correct itself, but probably not fast enough to avoid an incident. As @sar104 mentioned the magnetometer data is used to adjust the FC's Yaw solution but at a rate much slower than the gyro data. This graph was taken from my Mavic Pro. A wrench with a magnet was placed just close enough to cause a compass deviation of 45° but not cause a "compass error". When removed the magnetometer heading (green plot) went from 15° to 61° (the correct value). Yaw (red plot) stayed the same but started the gradual change necessary to finally agree with magYaw.
View attachment 73699
Note that the final difference between Yaw and magYaw is around -11°. This is due to the fact that the geoDeclination was 12.8°
9.402 : 214 [L-NS][AHRS] wmm dec: 12.817291
9.402 : 214 [L-NS][AHRS] wmm inc: 59.390961

That's different behavior to the response I showed in post #1, where the Yaw value stayed constant, and incorrect, after the applied magnetic field was removed. I wonder if the different behavior was due to the smaller (45°) discrepancy or the lack of a compass error.
 
@sar104 thats a very good explanation of why problems happen if there is magnetic interference on start up.
I have got into the habit of carrying a small pocket compass with me and i use it to align compass north on my take off pad
i hold the compass at waist height and find compass north then i lower it slowly on to the pad and see if there is any change in direction as i move it closer to the ground, if it moves i know there is some magnetic anomaly in the ground.
if all is well i power up the controller and once all is connected and the mav is powered up with GPS lock i check the compass heading in the app to make sure it it pointing to the small north indicator on the radar like display doing it this way may seem tiresome to many people,but for me it is time well spent. just like to add that the mav is placed on the pad facing the north symbol on power up
Simple enough. I may start doing that. Better safe than sorry. Thx.
 
That's different behavior to the response I showed in post #1, where the Yaw value stayed constant, and incorrect, after the applied magnetic field was removed. I wonder if the different behavior was due to the smaller (45°) discrepancy or the lack of a compass error.
I'd guess it's lack of a compass error.
 
I'd guess it's lack of a compass error.

That would be my guess too. But there is more complexity here than I thought. The first field test did not go as expected. I powered up the aircraft in the presence of an imposed magnetic field, with a regular compass sitting on top so that I could see what the field looked like. The IMU was duly initialized with the wrong heading, after which I removed the external field, leading to a disagreement of 146°. Note there was no gradual correction occurring. Then I started the motors, waited 30 seconds, and the took off. The result is interesting - something happened that I haven't seen before:

73724

As you would expect from those data, the aircraft flew just fine in P-GPS. Thoughts?
 
Ok this got even more interesting! What is that I see right around 30 seconds? IMU yaw self corrected?
 
Ok this got even more interesting! What is that I see right around 30 seconds? IMU yaw self corrected?

That's what happened. Not on motor start, but on take off - the IMU yaw was discontinuously corrected to match the compass. So the test was not fully representative of the real situation because I had removed the magnetic interference earlier - to do this properly I guess I need to leave it in place on the ground and have the aircraft take off to get away from it. But the behavior is clearly different.
 
@SAR Thanks! Question: if the initialization is incorrect as in your example, will the compass in the app point in the wrong direction once the aircraft is in the air at the time it indicates “Home point set”?
 
@SAR Thanks! Question: if the initialization is incorrect as in your example, will the compass in the app point in the wrong direction once the aircraft is in the air at the time it indicates “Home point set”?

Yes - it will point in the direction indicated by the IMU yaw value, not the compass. That's why it's a good check before taking off - if the arrow is correct then the IMU is correct. In the test that I showed above, at 31 seconds the direction arrow rotated 145° to agree with the compass without any rotation of the aircraft.
 
This is an interesting experiment. Have you seen the pocket compass needle swing substantially in any of your attempts?
@Thunderdrones yes Rob that is why i lower it from waist height,if there is any metal in the ground it will swing ,if it stays still then i think that everything is ok i started to do it when i noticed that after getting ready to take off and checking the Radar like display the mav was not pointing the same way as the icon on the screen,but since i have checked compass north up to now the mav and icon both point the same way
 
@Thunderdrones yes Rob that is why i lower it from waist height,if there is any metal in the ground it will swing ,if it stays still then i think that everything is ok i started to do it when i noticed that after getting ready to take off and checking the Radar like display the mav was not pointing the same way as the icon on the screen,but since i have checked compass north up to now the mav and icon both point the same way

An old fashioned solution to a high tech problem! Pocket compass!
 
That error was most likely just a request for calibration that the M2P firmware requires every 30 days or if it has moved more than 50 km from the last flight, rather than actual magnetic interference. That request is, unfortunately, worded just like the actual magnetic interference warning. You can tell the difference in two ways. Firstly, look at the sensors»compass interference level, which will be low if there isn't actually any interference. Secondly, if it is the recalibration request then the motors will not start, whereas with actual magnetic interference they will start. You can also pull the mobile device DAT file for that power up cycle and the event stream will show exactly what was happening.

Thanks, Sar104, that fully explains it. I had moved more than 50km from last flight. And the motors would not start, until I did the calibration. Good point also to check the actual sensors which I did right away, and saw the interference indicator was low. BTW, thanks again for the testing.

Paul C
 
  • Like
Reactions: Carb63 and sar104
I'd guess it's lack of a compass error.

Either we guessed wrong or the M2 firmware is different than the MP. I was unable to repeat the flight test today due to high winds, but here is a ground test with a more carefully applied external magnetic field that significantly perturbed the earth's field but did not produce a compass interference error. The field was applied at power up, removed at -55 s, restored at -10 s before motor start, and then removed at 25 s.

73784

No evidence at all that the FC began correcting the IMU yaw value.
 
Am I reading this correctly? The aircraft accepts the distorted magnetic field as normal at start up and the disagreement happens when the distortion is no longer present. Isn't this how a post take off compass error happens?

EDIT: never mind, I only saw the discrepancy between the two. I see that IMU yaw remained unaffected.
 
  • Like
Reactions: cwlewis123
Either we guessed wrong or the M2 firmware is different than the MP. I was unable to repeat the flight test today due to high winds, but here is a ground test with a more carefully applied external magnetic field that significantly perturbed the earth's field but did not produce a compass interference error. The field was applied at power up, removed at -55 s, restored at -10 s before motor start, and then removed at 25 s.

View attachment 73784

No evidence at all that the FC began correcting the IMU yaw value.
The MP used to do the test in post #43 is running FW 0700 which is quite old. Maybe a newer FW will behave the same as your M2 test. My other MP is running the newest FW but is on semi-permanent loan to a friend. I'll talk to to him later today but it seems unlikely that he can do the test.

When I get some time I'll try duplicating the test on my M2.
 
  • Like
Reactions: Former Member
The MP used to do the test in post #43 is running FW 0700 which is quite old. Maybe a newer FW will behave the same as your M2 test. My other MP is running the newest FW but is on semi-permanent loan to a friend. I'll talk to to him later today but it seems unlikely that he can do the test.

When I get some time I'll try duplicating the test on my M2.

I'm hoping to do the flight test with that configuration this evening. I'm really curious now to see if it resets the IMU yaw on takeoff. That would be a big change in the firmware - at least if you are into the more arcane aspects of flight control.
 
Here is the flight test result under the conditions that have led to yaw/compass errors and crashed many Mavic Pros and Mavic Airs. No rebar - instead I used a small magnet taped to the landing pad to distort the magnetic field at the M2P compass. The aircraft was facing south, but reported facing northwest. No magnetic interference errors occurred on startup - I had the magnet aligned to produce a credible magnetic field strength and direction, with the interference values in the green.

The graph below uses unwrapped angles, primarily because I carelessly chose to align the aircraft south for ease of manipulating the magnetic field. Unfortunately south is, of course, at the discontinuity between +180° and –180°, resulting in a messy presentation in wrapped angle space.

73889

Note that the distorted field was steady and the IMU yaw was incorrectly initialized. The direction indicator on the GO 4 app showed the same incorrect heading. Motor start (zero seconds) was followed by takeoff at 40 seconds. I had my finger on the mode switch to go to ATTI when things went bad.

But instead, there is the incontrovertible evidence that they changed the way that the firmware deals with IMU/compass discrepancies at takeoff. As the aircraft climbs out of the distorted magnetic field and sees only the earth's magnetic field, it changes to show –180° (south) as expected. That would previously have led to an immediate 130° discrepancy between the compass and the IMU yaw but, under this firmware, the FC immediately resets the IMU yaw to match the new compass value, even though the z-axis rate gyro (green trace) detects no rotation. No discrepancy and no compass errors. There were no messages in the event stream mentioning the reset.

At 90 seconds I rotated the aircraft through a full 360° to test the system; the compass and the z-axis rate gyro both correctly detect the rotation and the IMU yaw is appropriately updated.

In my opinion this is a significant improvement, since this situation has probably produced more crashes than any other single problem. And it's a good strategy since if the compass changes rapidly on takeoff without any detected aircraft rotation, the compass is almost always going to be correct after takeoff rather than before. We have discussed this at some length on this forum. @BudWalker – perhaps the DJI guys do visit occasionally after all...
 

DJI Drone Deals

New Threads

Forum statistics

Threads
134,499
Messages
1,595,655
Members
163,022
Latest member
Freakazoid
Want to Remove this Ad? Simply login or create a free account