I am using the new Pixhawk 3 Pro flight controller PX4 firmware.
After flashing and configuration and calibration QGC shows the following error:
Critical: PREFLIGHT FAIL: MAG 2 SELFTEST FAILED
No matter how many times and where I calibrate it.
I am attaching the CAL_ parameters I’ve got.
I’m facing the same issue with the stable version of PX4 and Pixhawk 3 Pro.
The selftest failed error shows on one of the internal magnetometer only if I calibrate the system with an external ublox compass/gps module attached on the GPS port.
If I perform the complete calibration on the board alone, the system seems to work properly.
I’m still looking for the root cause and a solution to the problem.
Hi,
I have the same issue with Pixhawk 3 PRO.
You are resolved? A question: but you calibrate system without del GPS module and then you connect it at flight controller (Pixhawk 3 Pro)?
In my case If I try to start the motors when the “flight controller” status is “Ready, no GPS” (blue blinking) everything is ok. In this case, the state passes, rightly to “Armed no GPS” (Blud solid). The problem arises when the status of the flight controller changes to “Ready, GPS lock” (Green blinking). From this moment the engines can no longer be started (armed). Why? The moment I try to arm the motors, I get an error (Red Blinking) with error “PREFLIGHT CHEK MAG2 FAILED”.
The calibration took place with Flight Controller connected to the “external” GPS-COMPASS.
I would be grateful if you could help me in this regard? Could it depend on the external GPS-COMPASS?
I only use the Pixhawk 1 and unless you need multiple compasses; but when I have a GPS with a built-in compass, I disable CAL_MAG1_EN (and CAL_MAG2_EN in your case). Recalibrate as needed.
Hi @rollys,
my version firmware is 1.8.2
I have attempted to set CAL_MAG2_ID to 0… But nothing is changed.
I’m sorry, what do you mean exactly with: “You can always try reloading the stack with Master/Dev version the before calibrating”.
CAL_MAG_EN is enabled with interna mag, if I remember correctly.
Hi @rollys,
You are kind of helping me. At this moment, before doing what you have suggested to me, I’ve tried to reset all parameters and repeat all calibrations. Calibration was completed, even if during compass calibration I’ve obtained a warning of large offset for mag. Anyway, at this moment I am always able to arm the motors, but I still get “MAG 2 SELF TEST FAILURE” … What do you suggest? Could I try to test a flight or I should to follow your suggestion and install dev firmware (assuming the risk to not be able to arm motors anymore?).
Anyway, still thank you for your support.
Personally, I would not attempt any flight until it’s resolved. Large offset warning will happen when there’s more than one compass/magnetometer installed. If and when you decide to reload the firmware, just confirm you see it loading px4fmu-v4_default.px4, which is what I understand to be the compatible version for this Pro 3.
Hello @rollys ,
OK, I agree with you. We are talking about vehicles that fly, and any anomaly requires us to stay on the ground.
Only thing, I apologize, but I’m still not an expert on this platform, as I can be sure to install that firmware version. Do I have to download it? However, then on what environment should I perform compile? I suppose it has to be compiled with a target compiler for the architecture of the flight controller microcontroller. Or the one I download is a binary version that I can upload via QGroundControl? However, how do I do it?
Sorry for the many questions.
i had this message yesterday after calibrating a fixed-wing pixhack v5 setup (internal mag and external mag/gps). the qgroundcontrol artificial horizon and compass were frozen - not reading.
.
the cal was done with a usb (not wireless), so the FC was powered from the usb. somewhere in the process i also powered the FW main battery power (cant recall when). anyways, i unplugged the usb and cycled the main aircraft battery, i think i included the airspeed sensor to make sure all was ok, and the mag sensor error went away. the qgroundcontrol instruments began working.
.
may be completely coincidental to your problem, but there it is for your consideration.
Hi @1Gump,
I do not know. I tried all the combinations a bit. In these days I will resume working on it and understanding better. Will update.
I also thank you for your contribution.
Very kind.
In my opinion disabling magnetometers is not the correct way to fix it. It is just a workaround and could be safe critical for flying.
Last PX4 firmware (1.9.0 RC1) seems to fix at least my issue, give it a try.
If you are not familiar with release candidate versions just wait a few days, PX4 team is going to release the 1.9.0 stable version soon.
Hi everyone,
Thank you all for your interventions. Please, you excuse my silence, but in the last few weeks, I have had some problems.
I was pleased to see that the debate I had opened on the problem has continued.
I can’t blame anyone who says they don’t disable a magnetometer. We are always talking about UAVs objects and they, from the security point of view, must be approached with the same aeronautical risk management criteria. Luckily the last stable 1.9.0 firmware came out of 8 hours, and I proceeded to update it.
I remember you that I have a Pixhawk PRO 3 as a flight controller: with an external NEO-M8N GPS + LIS3MDL Magnetometer for Pixhawk 3 Pro external.
I have re-performed all the calibrations, starting from the type of frame (hexacopter) and so on, via all the others calibrations. However, at the end of the calibration procedure, I started to get some error messages that I report:
Parameters are missing from firmware. You may be running a firmware QGC version does not work correctly with, or your firmware has a bug in it. Missing params:
I proceeded to save on file, from qgroundcontrol, the parameters of the firmware and magically appeared. However, the monitor message has become:
2. Parameters are missing from firmware. You may be running a firmware QGC version does not work correctly with, or your firmware has a bug in it. Missing params: -1: SENS_BOARD_Y_OFF, -1: SENS_BOARD_Z_OFF, -1: SENS_BOARD_Y_OFF
At this point, accessing the parameters, I set the parameters to the default value (set to zero). However, trying a take-off, I get the following error: Compass Sensor inconsistent. Now the engines don’t even start up anymore compared to my previous posts (before updating the firmware). I don’t understand which is the problem, maybe the external GPS (primary magnetometer), or the internal magnetomer? Please note that moving the drone, azimut is correct. What could I do? Please give me help!
I’m perplexed I am attaching files with firmware parameters. I am grateful for your advice. I’m a bit desperate after all the hours and even the money spent can’t get the flight controller to go.