Attitude control is OK but a bit nervous, try ATC_ANG_LIM_TC,2
just to smooth it out a little.
It could probably benefit from an Autotune after we’ve nailed down the filter and whatever else we can find with those oscillations.
Unfortunately the log is so big I cant get it loaded up in any of the filter tools.
I think you should have these settings based on the ESC RPM I see in the log:
INS_HNTCH_FREQ,20
INS_HNTCH_BW,5
INS_HNTCH_ATT,40
INS_HNTCH_HMNCS,3
INS_HNTCH_OPTS,2
Note that the hover frequency is not 20Hz, but the notch filter will increase that 20Hz to match the ESC RPM, and suitably scale the bandwidth too. It needs to start at the minimum.
Just do a short flight next, with some variety so we can confirm the filter settings (and the extra compass settings).
Once it is correct you can disable this extra logging:
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0
Compass calibration can be further improved:
COMPASS_OFS_X,-82.439674
COMPASS_OFS_Y,28.6108
COMPASS_OFS_Z,41.395184
COMPASS_DIA_X,1.0278705
COMPASS_DIA_Y,0.99461997
COMPASS_DIA_Z,0.9775095
COMPASS_ODI_X,-0.002101466
COMPASS_ODI_Y,-0.0019167982
COMPASS_ODI_Z,-0.014957749
COMPASS_MOT_X,0.26035506
COMPASS_MOT_Y,-0.008036682
COMPASS_MOT_Z,-0.12361763
COMPASS_SCALE,1.1780409
COMPASS_ORIENT,0
COMPASS_OFS2_X,194.35925
COMPASS_OFS2_Y,-60.665848
COMPASS_OFS2_Z,294.58102
COMPASS_DIA2_X,1.1327372
COMPASS_DIA2_Y,1.0539213
COMPASS_DIA2_Z,0.8133415
COMPASS_ODI2_X,0.00088302634
COMPASS_ODI2_Y,0.12925637
COMPASS_ODI2_Z,0.09255216
COMPASS_MOT2_X,0.21520035
COMPASS_MOT2_Y,-0.02241816
COMPASS_MOT2_Z,-0.023231255
COMPASS_SCALE2,0.9521188
COMPASS_ORIENT2,6
COMPASS_MOTCT,2