Contast switches of Primary EKF

During a test flight for our drone, there several back to back switches of the Primary EKF (with messages like ‘EKF Changed 1’, ‘EKF Changed 0’) during the flight and the drone was slightly wobbly during that. When looking at the logs there were 4 back to back messages:
Err: EKF_PRIMARY-1,
Err: EKF_PRIMARY-0,
Err: EKF_PRIMARY-1,
Err: EKF_PRIMARY-0

I am not much of an expert with any of this. Can someone help me analyze the logs? I have attached the log file here.

Most likely noise - check your mounting and filter configuration

The primary barometer looks sketchy, you have some default parameters and some rather random looking manual PID changes. The Tune is terrible and no Notch filter configured.

Back to the beginning…

Speaking of the beginning…

Have a look at the How to methodically tune (almost) any multicopter using ArduCopter 4.4.x guide and do all the steps youd didn’t do so far. Download the .zip folder with the param files from the guide, edit each file to suit your copter and upload them one by one as you read along. The guide tells you what to do and which file is needed at any given time. Do not skip any steps! Anything that might seem like a shortcut will result in a worse tuned copter in the end.