compass calibration problem

Hello,

I'm having troubles getting the compass to calibrate properly and keep getting "Prearm: Compass not calibrated" error.

I have a Pixhawk with arducopter 3.2.1 and I use this gy-271 external compass http://img.dxcdn.com/productimages/sku_148734_1.jpg

Mission Planner calibrates only the primary compass, so I had to put offset for the 2nd compass manually looking at the logs and trying to minimize difference with 1st compass.

After I set all the offsets I keep getting the "Compass not calibrated" error and have to disable prearm check.

Compass parameters:

PARM, COMPASS_OFS_X, -5
PARM, COMPASS_OFS_Y, -93
PARM, COMPASS_OFS_Z, -101
PARM, COMPASS_DEC, 0
PARM, COMPASS_LEARN, 0
PARM, COMPASS_USE, 1
PARM, COMPASS_AUTODEC, 1
PARM, COMPASS_ORIENT, 2
PARM, COMPASS_EXTERNAL, 1
PARM, COMPASS_OFS2_X, -45
PARM, COMPASS_OFS2_Y, -68
PARM, COMPASS_OFS2_Z, -80
PARM, COMPASS_PRIMARY, 0
PARM, COMPASS_DEV_ID, 73225
PARM, COMPASS_DEV_ID2, 131594

AHRS_ORIENTATION is 8 and I had to set COMPASS_ORIENT 2 in order to have coherent measurement from mag1 and mag2, but accordingly to xyz axis printed on pcb it should be 4 or 12, I'm not sure.

I attach graphs (magx, magy, magz, magtot) from a log of me rotating the disarmed copter on all axis, blue line is mag1 (external?) and green line is mag2 (internal?).

mag.png

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Anyone have any idea why does it say it is not calibrated? What does it check to say if it is calibrated or not?

  • I am not sure that the PH can use two compass modules.  It can use two GPS units.  Where did you connect your second compass to the PH and what documentation did you find to support that?

    • I don't have 2 compass modules, one compass is on pixhawk itself and the external one is connected to i2c port. I'm pretty sure arducopter 3.2.1 supports 3 compasses as I can see parameters for 3 compasses

This reply was deleted.

Activity