(see threads linked at bottom for details)
At least one of these is related to running OSD / telemetry. Are you running one of these? For a test, you could get it back to happening again and then try disabling OSD / telemetry.
Another is related to bad sensor (accels) calibration with an explanation that makes sense. If you do a slow pirouette in VelocityRoam mode does it move away (say a meter or more) during the first 180 of the pirouette and come back as you approach completing the 360?
At least one of these (for me) only happens if the drone is facing south. For you it may be a different direction. For me that explains why it happens some times and not others.
If you turn off OSD and it goes away. It appears that the way the high priority telemetry protocol (1ms-2ms window for reply) is coded, that it interferes with the high priority stabilization task, or that there is am OSD buffer full issue and it waits for room in the buffer. There is a forum thread that discusses this. It is just possible that it is caused by running too slow of a data rate for the amount of OSD / telemetry data that is being sent and increasing the data rate (just for a test if that makes your OSD / telemetry unusable). I would have to refer to the thread for details; its been a while.
The slow one that happens with DJI Naza GPSs can be helped with a DJI GPS code patch (there is a forum thread that has code and binaries) that artificially removes the data smoothing that happens in the GPS. Same issue can be seen with a Ublox GPS if you set the UbxDynamicModel to Pedestrian or the like, which does a lot more smoothing than Airborne 1-2-4G. Maybe setting the GPS baud rate or report rate (UbxRate) too low might cause it too.
I have seen that the slow oscillation occurs in steps and that the steps are at the speed of the fast oscillation.
----------------------------------------
so it seems the fast oscillation is caused by bad accel calibration (test in Attitude mode with neutral tx trims or just recalibrate accels)
and the slow one is caused by telemetry/OSD (low baud rate / buffer full ?) conflicting with stabilization (disable telemetry/OSD for a test)
----------------------------------------
https://forum.librepilot.org/index.php?topic=4923.msg33063#msg33063https://forum.librepilot.org/index.php?topic=4941.msg33301#msg33301