PreArm Error: check mag field xy diff 150>100

Hello all,

I am building a drone for my work and have this prearm error

PreArm: Check mag field (xy diff:139>100)
PreArm: Check mag field:  184, max 875, min 185

I read that I should recalibrate the compass so that is what I did. Error went away.

So I arm the drone and take off. Drone is in stabilize mode, has 3D GPS Fix and is hovering nicely with a bit of drift. I start a very simple mission to fly to a single way point then RTL.

As the drone starts to fly to the waypoint I see this message

EKF Failsafe: changed to LAND Mode
EKF variance

The drone loses control and crashes. :upside_down_face:

2 of the props are damaged, so nothing that can’t be fixed. However, when powering the drone on again the same mag field errors come back.

I read that the GPS needs to be mounted away from metal, wires, etc. Which I believe it is. See picture below. This is a Holybro M10 GPS module, mounted away from other components

Does anyone know how to fix this? I really need this drone working in a GPS guided mode so it can fly waypoints on its own.

Thank you in advance

To safely fly waypoints on its own the drone needs to be correctly configured and tuned.

Each drone is different, so it does need a set of parameters that is very specific to YOUR drone.

Stabalize uses a simple control loop, that is not very demanding, even an untuned copter can fly stabalize.

guided on the other hand uses a more complex control loop. Beginners make the mistake of assuming that if it does not crash in stabalize, all is fine and they can procced to fully automated missions. That is not the way physics, control loops and the universum works. Drones do need to be correctly configured to safely work in all scenarios.

Bottom line: use ArduPilot methodic configuirator software to get the job done. Or ignore that and crash a couple more times.

BTW the more steps you skip the worst it will work.

I used the Holy Bro x500v2 parameters as this is the frame/kit that I have. This is not a good enough tune to fly GPS guided?

Those are a starting point, but they also assume that all other systems are good and no errors. They don’t address calibrations and make assumptions on the components used for the build.

Let’s for a moment assume that all things were done properly. If you were able to fly in stabilized mode then it could be possible to collect a log with several 360 degree turns and throttle changes, and use that log for a MagFit compass calibration that will address dynamic differences in the drone.

No, it is not. Read my post again.