Bad Loiter

I have rearrange components on my OFM Seeker because the quad gave me problems. It would fly very nice for 9 out of 10 ten times and the then go balistic…(Version 3.0.1 with onboard compass)

I have now installed the external compass module from 3DR as per the instructions. I have installed the 3.1.2 firmware for the copter. Twisted the dc wires. I have done compass calibration several times.
Compassmot is 13%.
Magfield is about 300
Mag-ofs-x = 61
Mag-ofs-y = 30
Mag-ofs-z = 139

Declination is -0.266rad and seem correct for my location.

My loiter is almost non existent. This is not really the toilet bown effect, but rather a spiral outward in either direction(clock and anti clock wise)

The drone on the magnetometer is facing forward so the Compass_Orientation = none


My setting for COMPASS_EXTERNAL = 0 (internal)
Must I change this to 1 for external?

Must I physically rotate the compass on the frame to compensate for small variations or is there a variable that I can finetune the offset from the compass module to frame?

Attached is a log. I will make more if it may help. I am not an expert with these.
(I have a tricopter with same APM2.5 and external compass and it fly like a charm - 100% reliable.

This log was with pid’s from autotune. After this log I have reset the boards and load default firmware and pid’s. The default pid’s did not solve the problem. Same performance.

I’ll appreciate any help, I’m in the dark here, thanks.



Do the following checks:

  • Point the FRONT of the copter towards NORTH. X magnetometer should be BIG POSITIVE. Y magnetometer should be SMALL.
  • Point the FRONT of the copter towards WEST. Y magnetometer should be BIG POSITIVE. X magnetometer should be SMALL.
  • Point the BOTTOM of the copter towards NORTH. Z magnetometer should be BIG POSITIVE.

If any of these checks fail, your orientation is incorrect.

We do not do arbitrary rotations of the compass, you must physically align it with the flight controller.

From your log, I can tell you that your GPS and the inertial nav are not tracking each other well. This means compass, accelerometer or GPS problems.

Your log does not have MAG or IMU logging enabled. So, I can’t determine orientation for you, but I can tell you that since COMPASS_EXTERNAL is 0, you are using the internal compass, for which COMPASS_ORIENT of 0 is correct.

Your log also doesn’t have IMU logging enabled. So, I can’t tell you anything about accelerometers either.

What GPS are you using? If you are using the MTK, you will never get a decent loiter.

Hi jschall, thanks for the help. I have the ublox gps from 3DR with the external compass connected to the APM 2.5.

The problem is solved now.

The fault was a faulty Magnetometer from 3DR. (The seems that the faulty magnetometer tells the apm 2.5 that it is north all the time. If you rotate the quad fast about about a qauter turn, the compass reading will show 45deg yaw for a split second and then slowly return to north. If I turn the quad south it will also say north.)

I did not see this fault at first because I always put the quad pointing north and the see if the compass is lined up with north as well.

I replaced the Magnetometer with a spare one that was supposed to go on another quad.

I will test the loiter, rtl and auto this weekend.