The compass....misunderstood or easy scapegoat?

Your theory is no more valid than mine. I was simply theorizing what could happen if the home point or current location data were corrupted.
On the theory of Sensor Fusion - Why does it have to be a bad compass? It could be the IMU in your description. Do you know for a fact that the Phantom firmware is built on this concept?
Until we have hard logged data, we can only theorize and guess. The compass is, as the OP asked, a convenient scapegoat.
I have built and programmed two DIY drones, and I am unable to imagine how bad compass data can cause a flyaway. Especially one where the R/C has no control, even the throttle.

You're right that the IMU can cause a flyaway. Should any one of the fused sensors report bad data, there's no recovery. That's part of the reason the 3DR SOLO has 3 IMUs. But in percentages, the compass flyaway is much more common simply because it is much more vulnerable to interference. The number of videos online with the words TBE and flyaway in them prove that. TBE can only be caused by the compass. An IMU failure looks very different. That's not a theory.

If you want to test it, unscrew your compass, let it dangle and then try to fly. See how long you can stay in the air.

In the video I posted above, the compass is the source of the flyaway. No scapegoat there. Here's more:

The text says it all.

Calibrated while wearing a magnetic ring.

Calibrated over rebar concrete.

This one goes well for several minutes, until the Phantom is told to come home. Poor thing can't get on course to home and keeps hunting for it. Notice the rhythmic, nearly hypnotic, pattern between the gimbal and the leg. That is caused by the bad calibration data for the compass.
 
I can understand that a compass problem might cause a multirotor to go in the wrong direction if connection to the transmitter is lost and it tries to go home the wrong way. What does not make sense is why it would ignore all input from the transmitter when it is still connected, 20 feet away, and then take off at full speed in some random direction. This has happened to me more than once when I was launching from a place where I had launched many times and not had problems. Compass heading should not affect throttle.
I believe there has to be a flaw in the software design for this to happen.
I have not heard of other flight controllers having this problem.
 
I can understand that a compass problem might cause a multirotor to go in the wrong direction if connection to the transmitter is lost and it tries to go home the wrong way. What does not make sense is why it would ignore all input from the transmitter when it is still connected, 20 feet away, and then take off at full speed in some random direction. This has happened to me more than once when I was launching from a place where I had launched many times and not had problems. Compass heading should not affect throttle.
I believe there has to be a flaw in the software design for this to happen.
I have not heard of other flight controllers having this problem.

Well, not all flyaways are caused by the compass. My only point has been to refute claims that it doesn't cause any. There are IMU flyways as well but they appear to be far less common. As for not responding to remote control inputs, I cannot say. Is that with the Vision? It has a very different RC setup than the regular P2 and I know little about it.

As for the compass flyaway, it's more than just the heading getting whacked. If it was only the heading, the Phantom would probably just circle slowly. But as we see in the videos above, it's not just gently circling. It's increasing in speed as if the Phantom is falling over and trying to regain its balance.

That is also because of the compass. It is used by the Phantom to keep it stabilized. A magnetometer provides data that is used to determine what is called the gravitational vector (the direction to the center of the Earth). This and data from the gyroscope and accelerometer are critical to the stability of the craft. Attitude stability takes priority over all other flight activities for obvious reasons.

Now if the Phantom thinks the gravitational vector is somewhere it isn't and, as result, is in a state of falling over, trying to right itself, adding throttle to it simply accelerates it running away.
 
Tell me the mechanics of how bad compass data could possibly cause a fly-away?

I think that this question depends entirely upon the commands written into the firmware. None of us knows if the firmware checks to see if the compass direction agrees with the GPS detected route etc.

I am in agreement with you that most of the alleged "fly aways" are something else entirely. I watched a neighbor calibrate his compass with the phantom sitting on his car hood, then the second dance (vertical nose down) wrong as well. He did all of this within 100 feet of a cell tower and directly across the street from an airport. He then proceeded to tell me that once while flying and his battery was down to 15% that the bird flew in an un commanded direction then turned back and came back to land near him. Was this a fly away NOT.
 
I think that this question depends entirely upon the commands written into the firmware. None of us knows if the firmware checks to see if the compass direction agrees with the GPS detected route etc.

It does. We know this from the declination bug that was fixed in 3.04 (3.06?). However, checked or not, it won't stop this from happening. As I wrote above, this is more than just the heading. It is the overall stability of the bird.

There's enough information in the above videos alone to tell you that not only is the compass disagreeing with the GPS as to which way is forward, it is also disagreeing with the IMU as to which way is up!

If someone truly believes I am wrong I welcome them to take the Pepsi challenge. Unscrew the compass, leaving it plugged in and dangling. Do some fast flying in ATTI. Bring the Depends! And a cardboard box (to put the pieces in). :eek:
 
... He then proceeded to tell me that once while flying and his battery was down to 15% that the bird flew in an un commanded direction then turned back and came back to land near him. Was this a fly away NOT.
This is exactly what I would expect from bad compass data. The GPS does not detect a route. The GPS provides a position and the firmware can calculate a route between two positions. The compass provides heading information. The only time these mean anything is when the Phantom is flying from waypoint A to waypoint B. RTH, for example is flying from the current position (point A) to home (point B). The MC will calculate a heading needed to go from A to B then turn to that heading. A few milliseconds later, it does the math again. If the distance from A to B is not decreasing the MC will adjust the heading, assuming it's fighting wind. Eventually it will find a heading that will decrease the distance from A to B.

Just flying around controlling the position of the Phantom with the right stick (aileron/elevator) does not require the GPS because there's no route to calculate a heading for.

Cell towers are not a problem unless you fly into one.
 
The rebar concrete video was really hard to watch. That could have ended so badly..... so many times. :eek:
 
What I don't understand is, this is a multirotor craft.
It should be capable of flying from waypoint to waypoint, in whatever orientation the craft is configured in at the time. HL is again a good example.

HL doesn't care which way the craft is facing, but it manages to navigate from point A to point B.
It appears that in HL, the IMU calculates the proper direction to travel back to the Homepoint using just GPS data.

Help me understand....
 
Last edited:
This is an interesting debate. My understanding that there are several sensors which on their own carry out the following
  • Barometer for height
  • Gyro for stabilisation and orientation
  • GPS coordinates for positioning and orientation
  • GPS Doppler effect for speed
  • Compass for orientation and stability
  • Accelerometer for stabilisation
The software combines readings from these sensors to get it really accurate. If any of them are providing readings that are well away from what they should be then height, stabilisation, orientation and positioning will be wrong and send the phantom off to die.

Arguably, a flyaway can be caused by any of the sensors and that the ideal software would be intelligent enough to calculate that a sensor is disagreeing with another and take action. What the action should be is another thing.
 
Last edited:
What I don't understand is, this is a multirotor craft.
It should be capable of flying from waypoint to waypoint, in whatever orientation the craft is configured in at the time. HL is again a good example.

HL doesn't care which way the craft is facing, but it manages to navigate from point A to point B.
It appears that in HL, the IMU calculates the proper direction to travel back to the Homepoint using just GPS data.

Help me understand....

I would have thought that given two coordinates is not enough. It would still need some orientation information to work out the relative angle to fly ? Or maybe that is bollocks.
 
The more I read, the better I understand the role of the compass.

But, I would think that in a RTH or HL situation, the IMU takes heading data based off the compass. Then calculates the route.
If the compass data is wrong, then the craft would eventually move farther from its intended waypoint.
IMO, at some point, the IMU should recognize the distance to the waypoint is increasing and it should take action to correct itself.

These compass related 'flyaways' assume that the IMU reads the compass data, calculates the heading, route and just blindly fly's off on the bad heading. Meanwhile, the IMU never notices its getting nowhere fast and doesn't use GPS data to recalculate and get the craft heading in the correct direction and starting to shorten the distance???

That is what I now don't understand.
 
Last edited:
The first video above shows that when the operator put S2 into HL mode and pulled back on the stick, the craft headed home.

That video makes me think that HL and maybe RTH ignore compass data and rely only on GPS data to get back to homepoint.

If the compass data was bad, then way did it return home in HL mode.
 
Just flying around controlling the position of the Phantom with the right stick (aileron/elevator) does not require the GPS because there's no route to calculate a heading for.

In ATTI mode, this may be true. In GPS mode, it is not. GPS mode is essentially flying small high-frequency waypoints.

I would have thought that given two coordinates is not enough. It would still need some orientation information to work out the relative angle to fly ? Or maybe that is bollocks.

If by "orientation" you mean heading, you are correct.

Some related information that I've picked up over the past 18 months:

The IMU is simply a combination of accelerometer and gyro. It only provides inertial data to the FC so it can maintain vertical orientation (like what our inner ear does for us when we are standing).

These two sensors alone can do the job of keeping your Phantom upright as is the case in some FCs. But IMUs are inertial and have no absolute reference point. The gyro is subject to drift and the accelerometer to vibration. “Fusing" their data with 3 axis magnetometer data improves the ability for the Phantom to stand perfectly upright. The mag has absolute reference to the Earth and doesn't drift or react to vibration.

It does have its own issues though. It is vulnerable to interference in the form of localized ferrous material, so called "hard iron" and "soft iron”. One is on your bird, the other in the general vicinity of where you fly your bird. This is why we calibrate the compass. To compensate for both what’s on the bird and what’s in the magnetic neighborhood. This is magnetic deviation. Rotating the compass 360 degrees allows it to see where there are non-linear anomalies. We do it twice to account for both vertical and horizontal magnetic anomalies.

And if you've been on this site long enough, you'd know all about this one. In addition to local interference, the magnetic map of the Earth is not uniform. This is where declination and inclination come in. Declination is the difference between true north and magnetic north in a given location. For example, if you’re in California, and you turn your handheld compass to North, you’re actually 12 degrees to the west (or is it east?) of true north. Inclination is similar but with respect to the vertical magnetic field.
 
I've posted this here before, but this is why you calibrate when you change location:

Magnetic-Anomaly-Map-of-US-640.jpg
 
Well, I'm convinced (not that I needed very much convincing) that bad compass data is the root of all evil.

It does indeed look like the compass accuracy is a critical flight component and it uses the data along with gyro data to keep everything in balance during flight.
Let's look at ATTI mode, hovering with no wind... the NAZA is doing a good job of balancing the centre of mass to maintain a level flight. The compass not only provides horizontal direction data but also vertical direction data.. this with the IMU enables the whole system to balance.

Imagine trying to balance a yard broom on your hand with the heavy end upwards.. pretty easy... minor steady corrections. Now close your eyes... if you were "Chuck Norris" and had ultra fast reflexes you could still balance for a short time but as time goes by the positional errors would be too great and end up in the broom doing a TBE into your face!

If the vertical component of the compass data was out of whack, then TBE would be so great as to cause a steep tilt of the air frame and resultant dive into the ground.
Flying over buildings that have large motors in the aircon units may also result in a large compass deviation and crash due to the resultant change in the local magnetic field that it can't cope with.

What's needed is a better, more smart, compass that can do self calibrations during flight.
 
Well, I'm convinced (not that I needed very much convincing) that bad compass data is the root of all evil.

It does indeed look like the compass accuracy is a critical flight component and it uses the data along with gyro data to keep everything in balance during flight.
Let's look at ATTI mode, hovering with no wind... the NAZA is doing a good job of balancing the centre of mass to maintain a level flight. The compass not only provides horizontal direction data but also vertical direction data.. this with the IMU enables the whole system to balance.

Imagine trying to balance a yard broom on your hand with the heavy end upwards.. pretty easy... minor steady corrections. Now close your eyes... if you were "Chuck Norris" and had ultra fast reflexes you could still balance for a short time but as time goes by the positional errors would be too great and end up in the broom doing a TBE into your face!

If the vertical component of the compass data was out of whack, then TBE would be so great as to cause a steep tilt of the air frame and resultant dive into the ground.
Flying over buildings that have large motors in the aircon units may also result in a large compass deviation and crash due to the resultant change in the local magnetic field that it can't cope with.

What's needed is a better, more smart, compass that can do self calibrations during flight.

Not that it is by any means a silver bullet, but I know that some fighter aircraft (and surely others too) use redundancy to try and spot and eliminate inertial navigation errors. As well as multiple transducers they often have multiple flight computers all chatting to each other trying to iron out any anomolies.
 
What's needed is a better, more smart, compass that can do self calibrations during flight.

The problem here is detecting when the compass is being interfered with. The "mod" value you see in the Phantom assistant gives you an idea. It is effectively √(x ² + y ² + z ²) which represents the total magnetic field. If the number goes higher or lower than what is realistically possible in the natural world, it's easy to tell that there's interference. That's when you get the red and yellow lights. The problem is when the interference is small enough to be realistic but big enough to throw all the measurements off.

Not that it is by any means a silver bullet, but I know that some fighter aircraft (and surely others too) use redundancy to try and spot and eliminate inertial navigation errors. As well as multiple transducers they often have multiple flight computers all chatting to each other trying to iron out any anomolies.

The 3DR SOLO has 3 IMUs. Not only does that provide significant redundancy but it also improves accuracy. Maybe enough so that the SOLO doesn't rely as much or at all on the compass for stability. Curious to see if it suffers from TBE.

I think it was Pixhawk (the FC used by SOLO) where I read that you can have a simple 2D matrix lookup table that resolves the declination issue. That is what I repeated over and over like a broken record to DJI back when the Phantoms didn't fly straight because of declination.
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
143,087
Messages
1,467,537
Members
104,965
Latest member
cokersean20