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

Compass Interference Question

LeafPeeper

Well-Known Member
Joined
Jul 4, 2017
Messages
309
Reactions
187
Not sure how you guys feel about cross posting, but I thought I'd give it a shot. I posted this earlier on the DJI forum.

One of the things that bugs (scares) me about my Mavic is the complete dependence on the compass. I'm afraid to do the real things I want - like taking it off from inside my garage or from the back of my truck because I know compass interference could cause issues. So with that in mind, can someone who is more experienced explain something to me?

Assuming the compass has been calibrated properly at an earlier point/date (ie: no interference), WHEN does the firmware/software take a baseline heading (where it has to be interference free)? Is it at the time of takeoff, or when updating the GPS RTH point? For example, does it need to be read before the bird is in the air, or is a new heading registered every time the GPS home point is updated?

I would love to be able to connect, take off from inside my garage (where I know there is compass interference), fly outside over my driveway a ways, then manually update the RTH point (so I have it if I need it), then feel secure that the compass heading was re-read and is ok, regardless of the compass interference that existed inside my garage. Same with taking off from the bed of a truck...I know there would be interference, so can one just take off, fly a distance out, and reset the homepoint and have the compass heading be re-registered?

KNOWING when and how the compass is used would help me in making takoff/flight decisions more intelligently.
Thoughts?

Thanks,
LP
 
As far as I know...

Compass is needed so aircraft knows what direction is it facing.
You need no interference to take off. If interference is strong around you Mavic won't start and will say to calibrate/relocate.
Also, when RTH is activated, so your aircraft can turn in home direction, no compass could cause serious problems here.

I guess that some interference in-flight are acceptable.

About garage take-off: if you will be able to take off (as I said mavic won't start if interference is strong), the rest of your plan will work - you can gain GPS connection, and update RTH point outside
 
Based on personal (near catastrophic) experience; do not launch anywhere near ferrous material. Ever.

You can launch away from your car, and then sit inside to control. But don't launch from within five meters of it. It's not worth the risk.
 
So that says interference is an issue BEFORE leaving the ground...after that, it's fair game (although I realize that interference later could confuse it). That's a shame. Definitely a design link as far as I'm concerned. Maybe I'll just stick to quads without GPS and compasses....

LP
 
Also, when RTH is activated, so your aircraft can turn in home direction, no compass could cause serious problems here.

This part still bugs me. I know it's true, but it seems like a bad design decision. If I was lost in the woods with a GPS and no compass, I would start moving and see how my position changed relative to the GPS coordinates - and then determine which direction to keep moving. I see no reason why the firmware couldn't support this same thing....lose the compass, just move, anywhere, and adjust direction based on how the GPS coords change. Seems stupid to go right to ATTI mode.

LP
 
The compass is used to initialize the IMU yaw parameter (i.e. its initial heading) when the aircraft is powered up. If that is incorrect, due to a locally distorted magnetic field, then when it takes off a variety of conflicts may occur:

If the magnetic distortion is locally significant and not limited to the takeoff point, then subsequent yaw maneuvers will not produce the expected change in heading - i.e. the compass and rate gyro headings will disagree. That can have very bad effects on flight control. At best it will switch to ATTI. At worst it will lose attitude control and crash. We've seen both those results.

If the aircraft rapidly flies out of the distorted region then the measured magnetic heading will change without the aircraft actually rotating, again leading to disagreement between the compass and IMU. The FC will attempt to correct that, and may or may not succeed. If it fails it will switch to ATTI.

So, taking off where there is known magnetic distortion is not a good idea. It may get fixed in the air, or it may not. It's certainly inviting flight problems.
 
  • Like
Reactions: LeafPeeper
Compass calibration provides correction to your location based on the normal magnetic variation from true north. It varies very little unless you fly 200-300 miles from the place you did the last calibration. That is another reason they are now advising not to do calibration unless necessary, it introduces the possibility of human screw up. It is important to do the calibration away from any metallic objects that would distort the calibration results. Other types of interferences can effect your flight but unlikely unless you get near a transmission line or a very large piece of ferious material...iron bridge. Very unlikely your car would cause that. I have flown off, and landed on, the back of my truck’s bed cover for several years.
 
The compass is used to initialize the IMU yaw parameter (i.e. its initial heading) when the aircraft is powered up. If that is incorrect, due to a locally distorted magnetic field, then when it takes off a variety of conflicts may occur:

If the magnetic distortion is locally significant and not limited to the takeoff point, then subsequent yaw maneuvers will not produce the expected change in heading

That's the clearest explanation I've seen.

In my case, nothing occurred for a few moments after takeoff as I hadn't told the Mavic to do anything but rise. As soon as I told it to turn, GPS lock was lost and only throttle was responding.
 
It is primarily to correct for the earth’s magnetic variations. If you use a compass that is not corrected for the earth’s magnetic variations (think a simple pocket compass) and try to navigate, over the course of 200 miles or more, you will be off course. Flying within 200 miles of any point, does not cause a signifigsnt issue because the variations in the earth’s magnetic variation are very small over that distance. So in order for the GPS date to be accurately reflected in a flight path direction, the compass needs to be corrected for the local magnetic variation. Doing it frequently and unnecessarily only introduces the possibility of a bad/human calibration. You don’t want to calibrate the compass where it would be influenced by something other than the earth’s magnetic field. Other types of “interferences” talked of in these forums is totally different.
 
Agreed - thank you sar104. I think the answer sucks, but at least it helps me understand. Definitely room for improvement with future designs if you ask me.

LP

I'm not sure what could be done differently. There is no way for the aircraft to know orientation without compass data, and the FC subsequently uses the compass as a low-gain adjustment to correct for bias and drift in the rate gyros. I think that they have done a good job making it as robust as possible.
 
It is primarily to correct for the earth’s magnetic variations. If you use a compass that is not corrected for the earth’s magnetic variations (think a simple pocket compass) and try to navigate, over the course of 200 miles or more, you will be off course. Flying within 200 miles of any point, does not cause a signifigsnt issue because the variations in the earth’s magnetic variation are very small over that distance. So in order for the GPS date to be accurately reflected in a flight path direction, the compass needs to be corrected for the local magnetic variation. Doing it frequently and unnecessarily only introduces the possibility of a bad/human calibration. You don’t want to calibrate the compass where it would be influenced by something other than the earth’s magnetic field. Other types of “interferences” talked of in these forums is totally different.

Just to be clear - calibration has nothing to do with magnetic declination. In fact the calibration process itself would have no way to measure declination even if you wanted it to, because it has no other azimuth reference than magnetic north. Instead, a geomagnetic model is included in the firmware to calculate declination as a function of location.

And ferromagnetic materials at the takeoff point have a demonstrated history of causing flight issues, from loss of control to switching to ATTI mode if the FC cannot resolve the IMU/compass discrepancy. These effects are plainly apparent in many log files associated with magnetic interference, and so your anecdotal experience of no problems taking off from your vehicle is not indicative that it is generally not going to cause problems.
 
I'm not sure what could be done differently. There is no way for the aircraft to know orientation without compass data, and the FC subsequently uses the compass as a low-gain adjustment to correct for bias and drift in the rate gyros. I think that they have done a good job making it as robust as possible.

I already suggested what could be done differently. On a hike, we could all survive just fine without a compass provided we had GPS, and wouldn't necessarily need to know which direction we were facing. All we'd need to know is that we were moving in the 'right' direction. The GPS receiver/processor is doing nothing but reading the time signals from the various sats and using them to identify your location on the planet. If the compass was hosed and confusing the drone, there's no reason why the drone couldn't just move and note how its coordinates changed. I don't care how it is oriented, or which direction it went. Once it saw it's position change via the GPS coordinates, it could adjust to move (and face) in the direction that minimized the difference between it's current and home coordinates. It seems that if we could do it walking in the woods, I don't see why it would be 'impossible' to code it up. Either I'm missing something obvious, or I'm not being clear...

LP
 
I already suggested what could be done differently. On a hike, we could all survive just fine without a compass provided we had GPS, and wouldn't necessarily need to know which direction we were facing. All we'd need to know is that we were moving in the 'right' direction. The GPS receiver/processor is doing nothing but reading the time signals from the various sats and using them to identify your location on the planet. If the compass was hosed and confusing the drone, there's no reason why the drone couldn't just move and note how its coordinates changed. I don't care how it is oriented, or which direction it went. Once it saw it's position change via the GPS coordinates, it could adjust to move (and face) in the direction that minimized the difference between it's current and home coordinates. It seems that if we could do it walking in the woods, I don't see why it would be 'impossible' to code it up. Either I'm missing something obvious, or I'm not being clear...

LP

I think what you are missing is that, particularly for a quadcopter, it does matter how it is oriented in order for it to be able to operate a workable sensor fusion scheme, otherwise it has no way to detect constant rotation, it cannot distinguish rate gyro drift/bias from wind effects and it simply cannot control yaw. It can get by with no GPS, but without a compass it cannot even control attitude. Even a track is no use if it is rotating but doesn't know it.
 
I think what you are missing is that, particularly for a quadcopter, it does matter how it is oriented in order for it to be able to operate a workable sensor fusion scheme, otherwise it has no way to detect constant rotation, it cannot distinguish rate gyro drift/bias from wind effects and it simply cannot control yaw. It can get by with no GPS, but without a compass it cannot even control attitude. Even a track is no use if it is rotating but doesn't know it.

AH! THAT's what I was missing. Ok, thanks Sar... It still sucks...

LP
 
  • Like
Reactions: sar104
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
131,224
Messages
1,561,021
Members
160,177
Latest member
InspectorTom