Flight mode change failed switching to auto mode

Hello everyone.

I have a problem trying to change fly mode from stabilize to auto. I’m working with a S500 drone. It has a Pixhawk 2.1 PX4 and I have the 3.6 copter version. I’m using a “here+” GPS and a FS-IA6B receiver and a FPV radio telemetry air module. Weel, I would like to know if anyone have and idea about what is happening with the drone. I add a figures(NSAT and HDOP) of the change modes and the log data.


1 Like

Firstly, I think you have a bit of flight tuning to do before committing to Auto.
Your hover throttle and copter balance for starters.
I would suggest you have Loiter as your first guided test mode.

As to your question, it is because you have not waited long enough for the GPS to settle so the EKF has rejected your request for Auto.
Just because the GPS says 3D Fix does not mean the EKF is happy with the data.

So the procedure on the ground is to wait for a 3D Fix, then wait a little longer, and before arming switch to Loiter or Auto and check for errors.
If the EKF has not settled, when you change to a guided mode you will get an error and a refusal to go into that mode.
It will display on your Ground Station, Telemetry, or the LED will switch from Green to Blue, or with the new firmware, flashing Yellow with failure beeps.
This has become a standard pre arming check.

So, check your modes on the ground first BEFORE arming.

1 Like

Is there any mavlink message or state that allows to precisely know when the EKF is happy about the gps positioning?

I think if there were they could code the LED easily to not go green until it was happy with the GPS.

So I am assuming you have to select the guided flight mode you want before the EKF check is done.

This is a user bug, but from the disinterest of the Devs it’s obviously not a trivial fix.
The LED has changed somewhat in the new beta so I can only hope they are working to sort this out.

You are right, its an uneasy fix because in our setup, the takeoff is completely automatized.

I suppose its a matter of trial / error until it successfully changes… Will have to code a special routine that periodically try, using mavlink commands, the flight mode change until it succeed…

Having a dedicated error message for this situation would help a bit… because even in the dataflash log there is no additional data on the flight mode change error source…

Thank you very much sir for your time.

That is right. I like to tell averybody the correct procedure to start an operation with a drone. And is as simple as start the flight in loiter always and then, once in flight switch the any other mode. The reason is simple. SAFETY. And it is true. 3D lock doesn’t mean the GPS position is full stablished. In case of using Tower app the best way to find out when is safe to start is when you see a house on the screen.

What is automating the takeoff? The mavlink message EKF_STATUS_REPORT is your friend. That message has a “flags” field which contain bits that tell you the status of the EKF. If the EKF_PRED_POS_HORIZ_ABS bit is set you should be good to go. I think just blindly trying until it succeeds is not the wisest course of action.

1 Like