In OFFBOARD mode PX4 height estimation is biased

  1. Experiment 1 (height estimation in position mode is normal)
    (1) Experiment content: use the remote control in position mode to control the drone fixed point.
    (2) Experimental phenomenon: the drone can achieve fixed-point hovering.
    (3) The log shows that although the GPS altitude value has drifted, the barometer altitude value is similar to the fused altitude value, and a good estimation of the UAV altitude can be made in position mode.
    (4) Log file: log_93_2022-11-27-18-00-50.ulg

  2. Experiment 2 (Height estimation anomaly in OFFBOARD mode)
    (1) Experiment content: Using MAVROS under OFFBOARD, the drone was first raised to a height of 3m and then moved along the edge of a square with a side length of 10m.
    (2) Experimental phenomena: During the flight, the UAV had very little horizontal deviation and a large deviation of about 2~3m in height. It seemed to fly at a height of 5~6m.
    (3) Log shows: The flight log shows that the barometer test value increased slowly up to about 6m. However, after the drone took off, the altitude after fusion kept showing about 3m. The actual flight phenomena were similar to the barometer results. The barometer was chosen as the main reference source for the flight control EKF2_HGT_MODE.
    (4) Log file: log_91_2022-11-27-17-55-28.ulg

LOG: LOGS - Google Drive

PS. my hardware is pixhawk 6c and the firmware is PX4 1.13.1. although the GPS value is drifting, I see that the GPS can search nearly 20 satellites every time. the horizontal accuracy factor of GPS is also less than 0.8. I don’t know how to judge the GPS positioning quality.