[quote=“Andre-K”][quote=“jschall”]
A very bad compass could flip a copter in stabilize.[/quote]
Could you please describe the logic behind that ? - I cannot understand where /why compass would be used for stabilize mode.[/quote]
Ok…
The gyros are the primary attitude sensors of the entire system. We actually use gyros to remember which way is “down”, not the accelerometers. We simply integrate the gyro rates to figure out what our attitude angle is. However, gyros have “drift”. They give false readings as temperature changes, and a whole bunch of other things. If you only have gyros, you’ll have errors over time that will lead to attitude errors. So you need something to stop the drift. That is what we use the accelerometers for. The accelerometers point “down” when we are hovering, and we use that as a reference to determine how much the gyros have drifted, and correct for it.
However, what about yaw? Yaw gyros also drift, so we need a vector to correct the yaw drift. That is what we use the compass for. So the compass doesn’t simply tell us where north is, even if we didn’t care where north is, it still gives us an “anchor” for the yaw gyro drift.
There’s another important aspect to this. When doing high dynamic flight, such as high speed turns, the accelerometers don’t point down anymore. They point all over the place, due to the accelerations of the copter. This can actually mess up the pitch and roll gyro drift cancellation. Causing all sorts of errors in the pitch and roll angle estimation. And in fact, we used to see this about 2 years ago.
We now use the GPS to help, even in Stabilize mode! So what it does is, the GPS tells us “hey, you’ve just accelerated forward, so that gravity vector you got from the accelerometers actually had an error in it, it was pointing backwards as you accelerated forward. You must now have a gyro drift error, so go ahead and subtract that error from your gyro drift estimation.”
And here’s where the problem could occur. Say the copter is pointing north. And you accelerate to the north. Your GPS tells the attitude estimation system that you just accelerated north, in this case that aligns with “forward”. But what if your compass was backwards? The copter actually thinks it if facing south. So the acceleration compensation would actually point in the wrong direction. This would mean that not only did you have a pitch error because of the acceleration, it would be doubled, because the GPS correction is going the wrong way!
In my mind, it’s pretty inconceivable that this could actually cause a crash however.