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

Compass error

Hi Meta. Thanks for your thorough analysis. You indicate that if had chosen a 'safe launch point' (which I interpret as a point without any compass/GPS issues) I could had flown into the 'unsafe' area closer to the ship, without encountering the problems and the eventually crash ? I am new to drone flying, but fortunately the Mavic Air survived the crash, except for a few scratches.
No .. you have things a little mixed up.
The drydock looks like it would be hard to find a safe launch point.
Launching from steel or reinforced concrete surfaces is always taking a risk (and recalibrating the compass in that sort of environment will never "fix" the problem that the compass is warning you about.
It appears that the problems with your flight were not due to the launch point and were due to flying very close to the ship and having very poor GPS conditions.
When you got the If you had backed away from the ship instead of going closer, the error condition would have gone away.compass error message, how close was the drone to the ship?
 
Last edited:
Despite the big ship, I don't see any evidence of magnetic interference - yaw and magnetic yaw agree well enough throughout the flight. This looks like a case of the pilot not understanding the slow response of tripod mode:
It doesn't show up anywhere else but the verbose CSV shows a compass error showing up for the last minute of the flight.
 
It doesn't show up anywhere else but the verbose CSV shows a compass error showing up for the last minute of the flight.

Right - I saw those multiple errors, but what I meant was that they don't appear to be real - there is no significant disagreement between the compass and the gyros. I'll take a closer look at the raw magnetometer data to see if anything unusual showed up there.
 
Nobody has mentioned the artificially magnetized metal from the ships onboard power sources. That could be the culprit.
 
It doesn't show up anywhere else but the verbose CSV shows a compass error showing up for the last minute of the flight.

OK - the magnetometer data do show the presence of the ship, and the resulting increase in B field modulus almost certainly triggered the compass error messages (a threshold value was likely exceeded at around 180 seconds).

69714

However, it doesn't appear to have compromised the response of the aircraft, which remained in tripod mode and continued to respond appropriately to elevator and aileron commands:

69715

69716

Note especially the complete lack of stick inputs in the last 20 - 30 seconds - it appears to me that the aircraft was flown close to the ship and then just allowed to slowly drift into a collision. I'm not seeing any notable flight control problems.

69717
 
OK - the magnetometer data do show the presence of the ship, and the resulting increase in B field modulus almost certainly triggered the compass error messages (a threshold value was likely exceeded at around 180 seconds).

View attachment 69714

However, it doesn't appear to have compromised the response of the aircraft, which remained in tripod mode and continued to respond appropriately to elevator and aileron commands:

View attachment 69715

View attachment 69716

Note especially the complete lack of stick inputs in the last 20 - 30 seconds - it appears to me that the aircraft was flown close to the ship and then just allowed to slowly drift into a collision. I'm not seeing any notable flight control problems.

View attachment 69717
You are the real deal.
 
  • Like
Reactions: FL AV8R
OK - the magnetometer data do show the presence of the ship, and the resulting increase in B field modulus almost certainly triggered the compass error messages (a threshold value was likely exceeded at around 180 seconds).

View attachment 69714

However, it doesn't appear to have compromised the response of the aircraft, which remained in tripod mode and continued to respond appropriately to elevator and aileron commands:

View attachment 69715

View attachment 69716

Note especially the complete lack of stick inputs in the last 20 - 30 seconds - it appears to me that the aircraft was flown close to the ship and then just allowed to slowly drift into a collision. I'm not seeing any notable flight control problems.

View attachment 69717
@sar104 you know I consider you the final authority on this matter but I think I disagree here.

Starting at the compass error the two IMUs significantly disagree on the yaw direction.

Also in your graph at this same time we see large roll movements with out any aileron inputs and to a lesser degree pitch movements. Now those roll movements actually represent the largest roll movements for the totality of the flight. Shortly there after the drone runs into something.

I do think the OP was probably already close to the ship and the front sensors detect the ship as close as 1 foot but that didnt stop it from running head first into the ship.

What do you think?
69736
 

Attachments

  • Fufar Crash.PNG
    Fufar Crash.PNG
    240.9 KB · Views: 33
Last edited:
@sar104 you know I consider you the final authority on this matter but I think I disagree here.

Starting at the compass error the two IMUs significantly disagree on the yaw direction. View attachment 69735

Also in your graph at this same time we see large roll movements with out any aileron inputs and to a lesser degree pitch movements. Now those roll movements actually represent the largest roll movements for the totality of the flight. Shortly there after the drone runs into something.

I do think the OP was probably already close to the ship and the front sensors detect the ship as close as 1 foot but that didnt stop it from running head first into the ship.

What do you think?
View attachment 69736

I don't know what you are looking at. First graph, post #43 shows both IMU yaws and their interpretation of the compass data, which is pitch and roll dependent and why they are not completely identical. There are no significant discrepancies.

The pitch and roll response is typical of tripod mode - small adjustments (tripod mode) superimposed on the P-mode-induced pitch and roll. I see nothing out of the ordinary. Try integrating the pitch and roll signals w.r.t. time and you might see a more intuitive view. I haven't looked at any sensor data - what are you seeing there?

The bottom line is that the OP made no attempt to control the aircraft, and there was likely enough confusion in the GPS data to allow the slow drift that you see at the end in the position graph. There is nothing in the flight that I see characteristic of yaw errors.
 
Despite the big ship, I don't see any evidence of magnetic interference - yaw and magnetic yaw agree well enough throughout the flight. This looks like a case of the pilot not understanding the slow response of tripod mode:

View attachment 69682
I also seem to have different data then you here.69743
 

Attachments

  • 1555456304838.png
    1555456304838.png
    174 KB · Views: 4
  • 1555456315540.png
    1555456315540.png
    174 KB · Views: 4
  • 1555457407843.png
    1555457407843.png
    205.3 KB · Views: 30
Last edited:
The bottom line is that the OP made no attempt to control the aircraft, and there was likely enough confusion in the GPS data to allow the slow drift that you see at the end in the position graph. There is nothing in the flight that I see characteristic of yaw errors.
I fully agree with that part
 
I've no idea what you are looking at - the Mavic Air only has one compass.
Sorry I just assumed both IMU(0) and IMU (1) had their own compass. Learning process for me but look at the event log. Its screaming magnetic interference compass has gone crazy, oh god, oh god help me lol
 

Attachments

  • eventlog.txt
    34.9 KB · Views: 2
[L-FMU/MOTOR]mag_need_action: move drone
31162 [L-FMU/MOTOR]mag_need_action: move drone
31363 [L-FMU/MOTOR]mag_need_action: move drone
31564 [L-FMU/MOTOR]mag_need_action: move drone
31592 [L-FDI][sensor_api_info] head(2.0.31.4).|
31667 [L-FDI][CTRL]: fault on . tilt_ctrl_fail
31668 [L-RC]craft ctrl failed!!!
31691 [L-FDI][FDI] ns atti(0) heading is outlier| 31691 [L-FDI][FDI] ns atti(1) heading is outlier
31694 [L-FDI][CTRL]: fault off. tilt_ctrl_fail
31695 [L-FDI][CTRL]: fault on . tilt_ctrl_fail| 31695 [L-RC]Emergency break. rc vib!
31700 [L-BATTERY]get_cell_voltage_callback_ack failed!||
31715 [L-FDI][CTRL]: fault off. tilt_ctrl_fail
31721 [L-FDI][CTRL]: fault on . tilt_ctrl_fail
31727 [L-FDI][CTRL]: fault on . height_ctrl_fail
31730 [L-FDI][CTRL]: fault off. tilt_ctrl_fail
31737 [L-FDI][CTRL]: fault on . tilt_ctrl_fail
31741 [L-FMU/MOTOR]fault on . esc(2) is stall

It says this over and over and over. [L-FMU/MOTOR]mag_need_action: move drone
 
It says this over and over and over. [L-FMU/MOTOR]mag_need_action: move drone
That just sounds like the compass error that is present for the last minute of the flight.
Moving the drone away from the source of the magnetic interference (the ship) would have removed the error condition.
But the course that was flown/drifted just went closer and closer as shown in post #39 above.
 
Sorry I just assumed both IMU(0) and IMU (1) had their own compass. Learning process for me but look at the event log. Its screaming magnetic interference compass has gone crazy, oh god, oh god help me lol

That was what I was alluding to above - the two IMUs get the same 3-axis magnetometer data and then apply the aircraft orientation quaternion to transform to the earth frame of reference. The differences between the interpreted magnetic yaw from the two IMUs arises because they measure slightly different pitch and roll values, and so have different orientation quaternions.

As I mentioned above - it looks to me that the B field modulus exceeded a threshold as the aircraft approached the ship. I suspect that's what triggered the continuous errors.
 
  • Like
Reactions: brett8883
That just sounds like the compass error that is present for the last minute of the flight.
Moving the drone away from the source of the magnetic interference (the ship) would have removed the error condition.
But the course that was flown/drifted just went closer and closer as shown in post #39 above.

That's correct - it started at 188 seconds:

188.230 : 28654 [L-FDI]NS(0) COMPASS(0): fault on , over_large​
189.686 : 28727 [L-FMU/LED]action changed. compass out of range:need_move_drone(1)​
190.145 : 28750 [L-FMU/MOTOR]mag_need_action: move drone​

and then continued throwing the same error until the end of the flight. The FC did not like the high modulus value, even though it did not appear to cause any yaw errors.
 
  • Like
Reactions: brett8883
That's correct - it started at 188 seconds:

188.230 : 28654 [L-FDI]NS(0) COMPASS(0): fault on , over_large​
189.686 : 28727 [L-FMU/LED]action changed. compass out of range:need_move_drone(1)​
190.145 : 28750 [L-FMU/MOTOR]mag_need_action: move drone​

and then continued throwing the same error until the end of the flight. The FC did not like the high modulus value, even though it did not appear to cause any yaw errors.

I appreciate you helping me through understanding all this! Trying to get better at it. Can I ask what would it look like to have a yaw error? When one or both IMU(0) and IMU(1) have yaw values significantly different from mag yaw?
 
I appreciate you helping me through understanding all this! Trying to get better at it. Can I ask what would it look like to have a yaw error? When one or both IMU(0) and IMU(1) have yaw values significantly different from mag yaw?

Yes - exactly. Most often on takeoff as the aircraft ascends out of the distorted magnetic field, changing the magnetometer values without the rate gyros (the primary yaw measurement) seeing any rotation. It can also happen if the aircraft flies too close to ferromagnetic metal structures, such as a bridge or ship, but it did not appear to happen here. The yaw and magnetic yaw traces will then diverge. If you look at the DatCon output you will see that the difference between them has already been computed.
 
  • Like
Reactions: brett8883
Yes - exactly. Most often on takeoff as the aircraft ascends out of the distorted magnetic field, changing the magnetometer values without the rate gyros (the primary yaw measurement) seeing any rotation. It can also happen if the aircraft flies too close to ferromagnetic metal structures, such as a bridge or ship, but it did not appear to happen here. The yaw and magnetic yaw traces will then diverge. If you look at the DatCon output you will see that the difference between them has already been computed.

Got it! Thanks!
 

DJI Drone Deals

New Threads

Forum statistics

Threads
131,809
Messages
1,566,574
Members
160,677
Latest member
twixer_bear