Active Weatherwaning Caused Crash?

QHover worked perfectly, but when we tried QLoiter, the quadplane rolled right, hit terrain and flipped over. The roll happened right after weathervaning started. Reading the documentation about weathervaning says:

The basic algorithm is “yaw into the roll/pitch”. If the aircraft needs hold roll to the right in order to hold position then it will turn in that direction on the assumption that the right roll is needed in order to hold against the wind (assuming nose into the wind). Similarly, for Side Into the Wind, it will use the pitch angle and yaw appropriately, trying to zero the pitch required to hold position.

I don’t quite understand why the aircraft has banked right in order to do what should rather be a yaw action?

Any explanation would really help a lot!

Log here

Regards,
Hein

What was the wind speed and direction?

The wind was almost due South, speed 14m/s gusts to 17m/s. The a/c was pointing nose-in into the wind on take-off. I don’t understand why it would move laterally (right) to achieve weathervaning.

Had a quick look over your log. This has nothing to do with weathervaning.

Looks like your compass is very unhappy. Looking at the 2nd flight in your log, the Mag variences from the EKF are huge (2nd plot below). As a guide: V <0.3 Good, 0.3 <= V < 0.8 Poor but flyable, 0.8 <= V is unacceptable and a crash is likely.

Looking at your first flight in the log the problem was there. Mag variences are huge again:

But you got away with it then becase QStabilize is less dependant on a good heading solution from the EKF, where as QLoiter needs a heading to decompose positions, velocities, and accels into their north and east components.

Comparing the mag variances with the measured current from the batter monitor they correlate extremely well:


So this looks to me as though you have mounted both of your compasses close to high current devices/wires or batteries. I would recommend that you reposition your compass away from sources of strong EM interference.

Running MagFit may also help in this situation.

1 Like

Thanks, @IAMMATT!

I do notice a lot of warning thes due to compass. We’ve got 3 of the same aircraft (Big Shark F320) with the same issue. We try to keep the compass as far away as possible from the GPS/Compass but still we get warnings.

We’ll rewire and check again - on your graph the correlation is starkingly obvious, thank you, never thought of checking this.

I was expecting a toilet bowl effect with bad compass, not a roll to the right, though? Why would a compass error manifest into a roll right? Maybe it’s erroneous inputs into the EKF logic triggered it. Not sure why though.

Sorry, is there any solution to this phenomenon?
Because the same situation happened to me, but the compass display was normal and without interference.

We disabled weathervaning under a certain altitude to avoid the issue altogether.

Really appreciate your reply.
I want to confirm with you that to disable the wind vane at a certain altitude, the parameter name is Q_WVANE_HGT_MIN, right?
Does my Q_WVANE_HGT_MIN parameter use the default value of 0, 0 means disabled, or will the wind vane be used above 0 meters?
I would like to ask you about the height of the disabled wind vane that you set?

Hi yes I believe so, did not make the change myself, but I can see Q_WVANE_HGT_MIN,15