During flight, the yaw deflected

When I fly a circular pattern, the yaw of the aircraft slowly deflects. When rotating clockwise, the yaw deflects to the right. When moving counterclockwise, the yaw deflects to the left. I don't know why.

This is the log

I set up the plane to never change direction

@rmackay9 Hello can you help me?

Is it a copter, or is it a plane? Provide pictures and a .bin log file.

No one can guess what the problem is, we need more information.

1 Like

This is a quadcopter drone. It is making a circular motion clockwise or counterclockwise at a frequency of 10hz.

Remove the access requirement on that log please

1 Like

Sorry, I forgot to remove the restriction

@xfacta @amilcarlucas

I would say it is because of compass calibration.
See if you can do some yaw on the spot, some circles and a figure 8.
Throw in a couple of ascents and descents for good measure.
We can use magfit to improve the compass calibration.

I believe you need to do a better job of the initial parameters and tuning though. Start with these:

ARMING_CHECK,1
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2
INS_ACCEL_FILTER,10
INS_HNTCH_ENABLE,1
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.43
INS_HNTCH_FREQ,180
INS_HNTCH_BW,90
INS_HNTCH_FM_RAT,0.7
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
LOG_BITMASK,180222
LOG_REPLAY,0

A small copter is quite well understood and doesnt need a lot of extra logging - that can easily confuse the issue when we might not be experienced in using the extra logging to it’s fullest extent.

If this is a 5inch, then I can give you PIDs that will probably work slightly better - but the best thing to do is another test flight to gather data, improve the tuning, improve the compass calibration, then move on to more advanced features as required.

Personally I think you should be flying the copter with RC control for the purposes of tuning - take it away or ignore the RC control once tuning is great.

I use version 4.0.3 and fly with the same hardware and route, but there will be no change in heading. Is it caused by the difference between versions 4.0.3 and 4.4?Version 4.0.3 uses ek2, and version 4.4 uses ek3. It seems that ek3 is easier to change yaw.