Compass onboard calibration with Pixracer/Plane 3.7.1

Is onboard mag calibration supported on Pixracer? I can do “live calibration” for all 3 compasses OK.
However, when I try to do onboard calibration, several issues happen:

  1. Mission Planner (I use version 1.3.43) has “Fitness” combo box empty.
  2. When I hit “Start” on onboard mag calibration, the progress gets to 20%-30 % quickly and then the gets stuck. At this point the Pixracer board seems to be not responding and not sending any data to the MP and I need to power cycle it to get it back online. HItting “cancel” button in MP also has no effect.
    Setting COMPASS_CAL_FIT to 20 has no effect.
    My configuration:
    ArduPlane V3.7.1
    Drotek XL as external compass
    AHRS_ORIENTATION=4 (pixracer is turned backwards) and COMPASS_ORIENTATION=4 (external compass is facing forward)
    I use the ESP8266 Mavlink to connect Pixracer to MP
    Attached are my param files.
    Any help will be appreciated.

AP3.7.1.param (11.0 KB)

Even though the progress bar stops does the board keep beeping like it does when you do onboard cal?

@DonLakeFlyer The comment that its not responding to any data from MP makes it sound like its locked up, or is trying to reboot… Would have to see a tlog though to be sure. This is the second comment of problems with ESP/Pixracers and compass cal though.

Can you use “Onboard Calibration” on the Plane firmware? It states…

Copter-3.4 (and higher) supports “Onboard Calibration” meaning that the calibration routine runs on the flight controller.

Yes, indeed Plane 3.7.1 does not seem to support onboard calibration. Loading Copter firmware made it work. Thanks for the hint!

Plane 3.7 does have the onboard compass calibration, but it is missing a couple of fix up patches that made it into Copter 3.4, so it is possible for it to complete without ever telling you. Plane doesn’t have a stick gesture way to start the calibration though.

I’m having exactly the same issue. Cant calibrate the compasses, its driving me mad.

Is there a way I can frig it just to get the plane to arm?



It did not look the Plane calibration was completing - the off diagonal parameters were all zeros after I rebooted. Do you know if copying onboard calibration results (COMPASS_ODI_* and COMPASS_DIA_*) from Copter 3.4 to Plane 3.7.1 will work as it is supposed?

That should be fine, although I’d actually rather track down the source of the problem :slight_smile:

How did you assess that the calibration had completed? The most reliable way to see if it completed is that after you think you have completed the calibration you could try to arm the aircraft. Provided you have the arming checks enabled you would get a message telling you a reboot is required after the compass calibration has completed. The other way is by listening to the buzzer tones to assess if it has completed, but that of course is only possible if you have a buzzer connected.


I cannot get a successful compass calibration with 3.7.1. Have tried multiple PCs, Pixhawks, GPS/Compasses. It always hangs in the same place - screenshot below


Can you post a .tlog of attempting to do the compass calibration?

Hi WS,

Sorry for the slow reply. Tlog with compass calibration attempt attached. This is a new HKPilot32 connected with a USB cable.
2017-01-29 11-33-19.tlog (66.8 KB)

@bchristal Does the autopilot go entirely unresponsive for you when this happens? (IE does the main LED stop blinking and you stop receiving mavlink packets?)

The tlog you provided only has 6 MAG_CAL_PROGRESS messages, with percentages of 2, 8, 14, 19, 25, 30. They are coming in at ~0.5 second intervals which is logical for the connection. The log then dies right before the last message should come in. The only thing left at that point is a single heartbeat from the GCS. So either you disconnected instantly or the autopilot locked up. (I’m guessing the latter happened?)

1 Like

I disconnected as soon as the compass calibration progress locked up. I did just test Live Calibration and that will complete.

Freezes here.

@bchristal @himagain @vadim @DonLakeFlyer I finally acquired a Pixracer, I confirmed the problem exists with Plane 3.7.1, however this has been resolved on master (and the 3.8 beta2). I did calibrations with only the onboard compasses (1 and 2) and reached a successful calibration result.

1 Like

Thanks WS. Just tested. 3.8b2 successfully completes Onboard Mag Calibration for the on board compass on an HKpilot32.