EKF ground mag anomaly - has anyone heard of it?

Not so much !

Mike,
Did you have the same issues at 3.3.x?
I had the sae control stack (PH+GPS+etc) with 3.3.x and never had this message.

No, I had this copter flying well on 3.3 but we have it fitted with an RTK multi frequency GPS and I have been chasing problems with the SBF GPS implementation for a while so have had to keep upgrading.

There is a compass problem in here somewhere!
Last test flight with ‘Learn offsets’ turned on, the toilet bowling started and then it settled down until it stopped completely.
Loiter looked good, holding a tight position.

However

Push forward on the stick and the copter moved forward, PLUS 30deg to the left.
Same with all stick movement, 30deg divergence.

Was also getting multiple switches between mags which was causing a yaw twitch.
Obviously I have one of the 2 external mags misaligned.
Todays project.

I just updated a copter from 3.3.3 to 3.4.6, and had several of the ground mag anomaly and yaw realignment messages today. Had never seen them before today.
No flight problems, though. I’ll look at my logs when I get some time and see if things start to go crazy like they did for you guys.

So what is the diagnosis is for this issue? Is it also hardware dependent or only external environment based?

I think in my case it is working properly and related to environment…
I can place a compass on the ground in various places in my yard and the needle doesn’t point north. And I’ve always had magnetometer calibration issues around my home.
So, I think I’m arming and my compass points north-east due to whatever is under the ground here. Then after I’m up off the ground it readjusts and north points north.

Guys, did anyone go back to 3.3?
I am really contemplating that solution. I have more than 10 hous of flight and I cannot get it to fly level in windy conditions.
In PosHold it holds up to the wind for a while compensates well, holds the postion than it does a “toilet bowling” like movement (approx 1 circle) than it goes back to doing it s job and PosHold in the wind.
Also no relation to “toilet bowling” but it has several "EKF2 IMU in-flight yaw alignment complete " messages.

Any more clues?

I had several problems with compass and different drones in the last 2 years .
Sometimes I spend days to obtain a good working compass.

In my experience these problems were never connected to the firmware version (from 3.3 to 3.5.4 ) but to the hardware.

Defective I2C port , bad compass sensor, noisy power supply .

My secret weapon to understand and solve compass problems with Arducopter is the Zubax GPS that have an excellent compass on CAN bus.
Eliminating the I2C bus makes more easy to understand where is the problem.

I also keep a working external compass on I2C bus after a compass integrated on a M8N Gps was found defective.

2 Likes

I bumped into the same error, seems it has to do with the magnetic field in the hangar. I tried using a compass, but its just not facing towards the actual North from time to time. I was thinking this by solving this through the magnet declination through by adjusting the magnetic declination manually by changing the COMPASS_DEC param in Mission Planner. I don’t know if this will work, but I will let you know if it makes any difference.

1 Like

Hi, I’m having the same issues! Did it work??

Had the same issue on a location I was taking off on almost a daily basis and still does, so it could not have been a “real” problem. In my case I re flashed the rover and than copter, loaded the parameters and did all calibrations.
The problem was gone.

I’m still having this lean to left with first forward flight problem.

I’m using Pixhawk4 mini by holy bro.

I got 2 craft working fine but 3rd one leans left, then self corrects after about 10 secs of flight.

On a 4th craft I moved the GPS compass far forward as possible, but was then middle of 2 motots. This helped for that craft.

I tried using this as a solution on a fifth craft and it did not work.

The final working solution was put on a dji naza m2, and that solved all the problems.

I’ve gone from a a cheap version of pixhawk, to the most expensive our project can afford.

I’m of the opinion that there is some firmware updating required that needs to resolve these issues.

I spend a whole day or more trying to solve this lean to left issue on a craft with very little success.

I take a naza m2, and 15 mins later it is being sent to customer.

My frustration level is beyond what I can bear with pixhawk consistency.
I’ll be continuing the learning process because my customers really want the Pixhawk4 telemetry options, but I’m not able to sell any Drones when I spend days at a time on one craft.
Very disdapointing for me at moment, but my business has to move on.

If anyonw has had this leaning issue on first forward flight, and you have any practical solution to implement, please share it as it will take my life out of a living drone hell.
Thx in advance.
Gary

post your log, I will look at it.

In my case, we were mounting the Here3 without a stand, and the power wires of drone were interfering with the compass, causing an incorrect yaw reset when taking a flight, After changing the Compass Position, and increasing the stand height to move away from power wires, we were finally able to resolve the issue

It seems it’s quite common issue. Is it still relevant for the next versions?

This requires an hardware fix. It can not be fixed witjh a software update.

I just had a incident with “EKF3 IMU0 MAG0 ground mag anomaly, yaw re-aligned”. Been flying great for the past week in the same location, flew 5 min prior to this flight fine. Took off in stabilized, switched to loiter and it went crazy hard right then left, i quickly switched back into Althold then stab and it was better. Here are the logs. I’m using the latest Quad 4.1.0 beta-6 load.

File name “EKF3 IMU0 MAG0 ground mag anomaly, yaw re-aligned”

https://drive.google.com/drive/folders/12scDkGkk4NdqlhPVFec8WNyRYSdzVeqG

I have done the compass calibration and after that, I flew my drone once there was no error but after giving the power cycle I took another flight, and in that flight, it was showing ground mag anomaly I haven’t changed anything I just plugged out the battery and plugged. so is there anyone who has any idea why this occurs?

Hmm, any anyone has other iseas to resolve it?

Did you at least run the Magfit procedure to calibrate the compass and apply motor compensation (assuming you have current monitoring). This doesn’t always eliminate the error but it’s the right procedure to follow in any case.