Yaw circling (toilet bowl effect) due GSF Yaw reset

Hello,I built my plane (tricopter!) and decided to fly, but the plane was behaving strangely.

When taking off, I set the plane upwind. Immediately after takeoff, the wind begins to turn the aircraft in the direction of the wind, by 180 degrees. For a while the aircraft tries to align its position with the course, but then it begins to hold the current course DOWNWIND, even though the takeoff was to start UPwind.

I decided to study the autopilot log and noticed a yaw reset event

At the beginning of takeoff, a servo that turns the plane on course. After the reset, the aircraft begins to hold the course to which it was turned after takeoff, that is, it is shifted by 180 degrees.

The fact is that because of the small space, I have to place the autopilot next to the power cable of one of the rear motors, so it has a lot of influence on takeoff. I compensate for this with gps. The EKF is configured to switch between internal compass and GPS. Therefore, I believe that I do not need to perform YAW RESET, since when switching to a fixed wing, the interference will disappear, thereby returning the correct values ​​​​to the internal compass.

How I see the situation:

  1. Takeoff
  2. The internal compass is turned off using the EKF, GPS is used
  3. During this time, the plane tries to turn itself in the right direction
  4. The YAW RESET is triggered and the aircraft is fixed on the wrong course.

Some facts:

  • During testing on a mockup, not a full-fledged aircraft, this event was not called.
  • Due to the fact that this is a reverse tricopter, and the front motor is only one against two rear motors, in the loiter mode it began to be blown away by the wind and could not hold the point.
  • I can see his turn in flight on telemetry, so switching from the internal compass to the GPS is correct and displays the correct heading, which does not require a reset.
  • I fly at the training ground, so the correct course will be on the ground, and not after taking off to a height of 5m, as is done for quadrocopters

Log when flying on mockup: (looks good!)

Log when full-fledged (you can see how desyaw has changed):

Changes on map( full-fledged). Looks like in reality. The plane was launched into the wind, stood sideways to the wind, so it keeps a roll. In reality it also turned 90deg:


It seems to me that the turning of the aircraft by the wind and the increase in the magnetic influence on takeoff cause this event. Should I disable gsf and how can I do it? Are there other solutions to this problem?

Thanks for any answer

Hello!

New test flights were carried out today. This time the flights were with the GSF turned off. He showed himself quite well, which confirmed the correctness of the calibration of the magnetometers.
(yaw arround 5-355, it’s ok for me)

BUT this time I noticed something strange! When taking off, as well as holding the altitude in the QLOITER mode (thr stick is 50%), the aircraft keeps the course without any complaints. However, when landing in QLOITER or when enable QLAND, it turns the course ~180 degrees, and due to the large yaw acceleration, this is dangerous.
I noticed that this happens when lowering the height. Any ideas?

(yaw with baro altitude and throttle PWM)

(Motors, Motor4 - front, Motor1-2 - left right)

(pitch,roll and Front motor)

Looks like a special course reversal, not any interference.
Does it work in such a way that when the aircraft descends, it changes its course towards a given point at home, and keeps the “take-off” course only during takeoff and holding at altitude (in QLOITER mode)?

I’ll be back for any hints!

Hello!
After a few days of investigation, I discovered the real problem.

The documentation states that during a vertical landing, the aircraft turns its nose into the wind.
https://ardupilot.org/plane/docs/quadplane-auto-mode.html

But I didn’t think that changing from QSTABILIZE mode to QLAND mode follows the same instructions as fixed wing approach → and vertical landing. Also, nowhere is it said that the landing in QLOITER will work similarly to QLAND and follow the same instructions for turning into the wind

And the main reason was a faulty airspeed sensor. He indicated the direction of the wind 180 degres. It was incorrectly connected, but was enabled in the autopilot settings (ARSPD_ENABLE).

I don’t think this behavior is correct. I think that if the airspeed sensor fails, it will be logical to set the wind direction to the current direction of the aircraft, so that the pilot can manually set the heading for an upwind landing.

I see only my fault in this, but I think that the idea of making this behavior of a faulty airspeed sensor is quite interesting.