Servers by jDrones

ArduCopter EKF2 IMU2 Switching to Compass 0,2 abruptly with slow oscillations in pitch midflight

I am using a hexacopter with CubeBlack mounted on a Kore Carrier Board, with a Herelink installed, which is flying normally up to some time ~7 minutes in loiter, after which the speed is slowing down (oscillating actually) to 1 m/s or so from 5m/s repeatedly. after looking at the dataflash logs, the message “EKF2 IMU2 Switching to compass 0”, “EKF2 IMU2 Switching to compass 1” are appearing at each twitch, Apart from that, the log Auto Analyzer shows "Test: Compass = FAIL - Large change in mag_field (320.41%)
Max mag field length (1402.83) > recommended (550.00)
" .
The Slow Pitch oscillations worsens in Autonomous Modes such as RTL, and Auto.

The Logs can be found at

And here are some Pictures from the Log Graphs.

I am still not able to figure out what’s been causing this, Please let me know how to resolve this issue, Thanks.

Your parameters appear to be at the defaults.
Go through the Wiki tuning page here

Once you have done that do an autotune.
Looking at DES v Actual you can see just how hard the copter is working to maintain stability.
make sure your frame is up to it, and all props are level.

Hi, Mike
The graph looks good than mission planner logs plot. Which tool you using for logs plotting?

I talked to Philip @proficnc, and I was recommended to Preheat the FC 15 Minutes Prior to flight using a Power Pack Connected to USB Port of CubeBlack (and removing the power pack thereafter). and then rebooting before the actual flight

We followed the same procedure to wait for 15 minutes, and we faced another issue in a previously working drone with no other modification apart from plugging the power pack,

In the same series of flight procedure, during the actual flight, The Here3 Got disconnected Somehow, causing a EKF Failsafe and finally a crash.
The 5V Power Supply on Kore Carrier Board on CAN1 and TELEM2 port burned out and the TF03 Connected to it also burned, causing a huge financial loss.

Although, when we tested the same Here3 on CAN2, its working just fine.

I am really curious what would have gone wrong, and what’s the solution to both of these problems.
Logs -

Yes, Indeed the Copter was not tuned and was on default params, but I didn’t tuned it, because I wanted to be clear on whether this Compass Switching is because of the same issue. because I hadn’t encountered any Compass Error on an untuned Copter before.

Ok, For anyone revisiting this section,

  1. Do not use Large vehicle mag cal, instead use the usual onboard compass calibration.
  2. make sure the GPS/MAG is at a good distance away from power/RF Wires.
  3. Wait for 15 minutes, but rather than using a power pack, plug in the batteries instead, as in my case the 2A port fried up my FC.

Hopefully, Things will turn out great afterward, fewer crashes eventually,
It’s really sad, I wasted a lot of money in crashes just to debug, only because the hardware and manufacturer support is so weak.

Servers by jDrones