Pixhawk 4 mini Preflight Fail


Dear people,

A PixHawk 4 mini was bought and first I load the Px4 Pro v1.8.2 Stable then I had some issues, afterwards I was told by holybro that 1.8.2 is not supported, that I shall use the "Developer Build (Master)" into the PixHawk 4 mini and then I loaded the version master and I have calibrated the sensors in Qgroundcontrol station

However when I try to arm the drone I get the following error:

FCU: Preflight Fail: Compass Sensors inconsistent
FCU: Not arming: Preflight checks failed

I appreciate any help,



Good day, what kind of gps + compass you have installed on your drone?
You can solve the issue disabling the compass but first you must find which one is external or internal, you can do this using the nsh console following this command :

type ? followed by enter
ls / obj (enter)

type : listener sensor_mag - 0
listener sensor_mag - 1
listener sensor_mag - 2
for every command there is the correspondent result: if its external you wil will find external, if not you will find false.

For disable the compass type in the search box, compass 0 or 1 or 2 or 3.

Try one by one and test it without props.

Just let me know



Thank you for the answer,

I have

GPS: ublox Neo-M8N GPS/GLONASS receiver; integrated magnetometer IST8310

On-board sensors:
-Accel/Gyro: ICM-20689
-Accel/Gyro: BMI055
-Magnetometer: IST8310
-Barometer: MS5611

After done what you suggested me:

nsh> listener sensor_mag -i 0
is_external: True

nsh> listener sensor_mag -i 1
is_external: False

It means that the sensor_mag1 is internal, right?

And, it has to be disable, right?

I did not get how to disable it, you mentioned in the search box, which box is that one, and what to type.

What found is in the Parameters tab the parameter called:

CAL_MAG1_EN = Enable well I guess it is a matter of disable and run the calibration of the compass again, right.

Or, how it shall be?


Well, I have changed the

CAL_MAG1_EN = Enable to CAL_MAG1_EN = False

then, I calibrated the compass again, then I have also changed the


for the safety switch that is in the GPS.

I could armed the drone, and I did not have any errors:

But, well the questions here are:

  • What effect has in the real fly of the drone the fact that the sensor_mag1 has been disable.

  • Since the version Px4 Pro v1.8.2 Stable does not support the PixHawk 4 mini, and I have load the Developer Build (Master), but this version is for developers and not stable and it has not been try in real test yet.

    Is it reliable to use this version for a real flight?

Thank you :slight_smile:


Good day,
in the Parameters tab just type CAL_MAG1_EN and disable it coz its the internal compass inside your fc, better use the external due the interferences you can have inside your fc. After every parameters you have modify test few hours the behavior of the drone.

Me i always install the master coz i have fully access to the parameters. Version 1.8.2 its already well tested



I see,

  • Well, as far I do understand you in the setup there are two compasses, one in the FCU (PeixHawk 4 mini) which is the internal and one in the GPS which is the external, right?


  • Just using the external compass would be enough, right?


  • The V1.8.2 is already well tested and stable, but it does not work properly in the PixHawk 4 mini, so I am force to use the Master :slight_smile: And I hope is stable enough for real flights :), is it?

  • And thank you for your help :slight_smile:


the external compass is the one inside the gps. in my opinion better use the external so you will not have interferences like the compass in the fcu. The external is already enough.
Have a good flight…



Thank you for the mail.

Just been thinking if it is convenient to calibrate the PID controler of the PX4 or just leave it with the values it has.

If it needs to be calibrate it, how shall be done?

Thank you.


if during the flight you see your drone is sluggish or twitchy you can adjust with the tuning option . For now in px4 you don’t have the autotune



Ok, thank you, I am planning to calibrate the drone again and then try a manual flight and then autonomous flight under mission mode and qgroundcontrol.

So, if in case I see the drone sluggish or twitchy and if PX4 I can not autotune the PID parameters, how can be done then.

I have a question.

  • I would like the drone to plan a trajectory and follow it in autonomous mode avoiding obstacles. And, somehow started using avoidance in gazebo+rviz for now. Then the idea is to translate the simulation into a real flight. What do you think? Is that a good option? or Is there another package?

Thank you



Hi :slight_smile:

I have re calibrated the drone and I have try some position flight mode and some mission plan mode with a small propellers so the drone wont fly yet :slight_smile: and I got a warning:

FCU: Preflight: GPS Horizontal Pos Drift too high

Do you have some clue about this warning?

Thank you :slight_smile:


just send pls how did you installed the gps module, maybe must be repositioned



The PixHawk 4 mini is on the top surface of the drone just over the center of gravity and the GPS comes with two sticks, one is 14 cm and the other one is 9 cm.

First, I positioned the GPS in front of the GPS at the distance of 6cm and at height of 14cm, then I changed the GPS to the lower stick which is 9cm height. And then I re calibrate the sensors again.

In a few words, the GPS on the top surface of the drone at horizontal distance from the pixhawk of 6cm and at height of 9cm.

I have tried to arm the drone again, in mission mode and manual mode but with small propellers so the drone did not fly and I still get the following issue:

  • When I arm the drone I get the following warnings:

              - `GPS Horizontal Pos Drift too high`
               - GPS   Speed accuracy too law
                  the vehicle has failed to pre-arm
                  check in order to arm the vehicle
                  resolve the failure

I can see in the GPS status:

     – GPS count 11
     – GPS lock 3D GPS Lock
     – HDOP 0.9
     – VDOP 1.4

     Do you have a clue how to solve these warnings?

i need to check the log and just attach a picture about how did you install your gps module.
i suspect a small issue with the EKF2 filter



I have thinking that since I have a companion computer
(Jetson TX2) with USB3, that could prompt the issue, because I read


USB 3 is known to be an effective GPS jamming source. The **jamming
indicator** should be around or below 40. Values around 80 or higher 
are too high and the setup must be inspected.

And there is a new PX4 version V1.9 stable, which I load it and I re calibrate everything again, and I have also enabled the CAL_MAG1_EN

Then I have covered the GPS with aluminum paper as you can see it in the picture.

I made some tests in mission and manual mode, with small propellers so the drone did not fly.

And, the GPS position was good and I did not get any warning.

I believe that noise from the JetsonTX2 USB3 was causing the problem.


I have another issue, maybe you could help me :slight_smile:

I use EKF2 and I have Set

 SENS_FLOW_ROT to 270 degrees, default 
 EKF2_AID_MASK to use optical flow and GPS
 EKF2_HGT_MODE to use the range finder

The question is:

How can I check that the PX4FLOW sensor is working correctly together with the GPS ?

In other words, I guess that I shall get a position [xyz] that comes from the combination of both the GPS and the PX4FLOW , right?
So far I can see in the mavlink inspector the:


You must fix the cables and instead of use the aluminum paper better use a shield material.
you must eliminate every noise.



Thank you for your advise, I must get shield material, but for now I think I will make some few tests with the aluminum paper :slight_smile:

By the way, Do you have experience with the PX4FLOW?

If yes, How can I check that the PX4FLOW sensor is working correctly together with the GPS ?



Might be possible for you to recommend a shield material for my specific case.

If possible to share a link where to buy it.

Thank you.


You can buy it from mrobotics.io.