I spent the whole week doing tests and with the changes I got a good result.
Initially I increased the INS_ACCEL_FILTER filter to 20 and I noticed the motors involuntary revs up in seconds, so I reduced it to 10 again.
I increased ATC_RAT_YAW_P to 2 but the oscillations were maintained, so I started to reduce the value and did a flight to check if I would have stabilization problems.
These were the values I came up with:
ATC_RAT_YAW_I = 0,04
ATC_RAT_YAW_P = 0,4
ATC_RAT_PIT_D = 0,004
ATC_RAT_RLL_D = 0,004
ATC_ANG_YAW_P = 7
ATC_ANG_PIT_P = 8,54
ATC_ANG_RLL_P = 11
INS_HNTCH_FREQ = 46
Reducing ATC_RAT_YAW_I and ATC_RAT_YAW_P reduced the oscillations, but the motors momentarily increased the revs as if they had high INS_ACCEL_FILTER, as I mentioned earlier, so I had to reduce ATC_RAT_PIT_D and ATC_RAT_RLL_D too.
To make it clearer what I’m talking about, below is an image of the log.
This situation was occurring very often before reducing values ATC_RAT_PIT_D and ATC_RAT_RLL_D.
To compensate for the reductions that were made in ATC_RAT, I made increments in ATC_ANG_YAW_P, ATC_ANG_PIT_P and ATC_ANG_RLL_P. I noticed improvements, especially in Yaw which was very soft in the answers.
After making all the adjustments I worked again on the INS_HNTCH_FREQ.
Analyzing the LOG, the oscillation is seen, but with a much lower value that is not perceptible to the naked eye.
This is the log of the last flight I took today.
https://drive.google.com/file/d/1b303TzCdricKO9BxLRX0acqKM8ty6ZKj/view?usp=sharing