Drone Hits Ceiling: MIS_TAKEOFF_ALT Not Respected with EKF2_HGT_REF = Range Sensor

During an indoor flight test, I observed a potentially critical issue with altitude control using an MTF01 Micro Air Optical Flow sensor. I configured the system to perform a controlled takeoff via QGroundControl with a MIS_TAKEOFF_ALT set to 0.7m, but the drone continued to ascend beyond that and hit the ceiling.

Flight Logs

Setup:
Hardware:
Flight Controller: CubePilot Cube Orange+
Airframe: Holybro X500 V2
Optical Flow + Range Sensor: MTF01 MicroAir (UART)(Link to the sensor)
Software:
PX4 Version: v1.15.4 (99c40407)
QGroundControl
Environment: Indoor (GPS connected but no signal)

Sensor Configuration Parameters Used:
MAV_1_CONFIG = GPS2
MAV_1_MODE = Normal
SER_GPS2_BAUD = 115200 8N1
EKF2_OF_CTRL = Enabled
EKF2_RNG_CTRL = Enabled (Conditional Mode)
EKF2_HGT_REF = Range sensor
SENS_FLOW_ROT = No rotation
MIS_TAKEOFF_ALT = 0.7

Observed Behavior:
The drone armed and took off (Command Given from Q Ground Control )
Expected behavior: Climb to 0.7m then hover.
Actual behavior: The drone kept ascending and collided with the ceiling.

Before the flight, I checked the distance sensor and optical flow sensor output in Mavlink Inspector

Flight Logs

Sorry, but we can’t really help with firmware that isn’t ArduPilot.

The PX4 forum is here: https://discuss.px4.io

1 Like