I am trying to make command a GPS position to a fixed-wing from offboard. For the altitude PX4 seems to be using the barometer measurements instead of GPS. I found the parameter
EKF2_HGT_MODE and set it to GPS:1, which I hoped would change the feedback to the control to mainly use GPS. The description of the param says “Determines the primary source of height data used by the EKF”. I also double-checked the parameter through mavros and it was set correctly. However, when I set the parameter, the control still seems to follow the barometer altitude estimate, which is quite off from GPS. I tried it in simulation starting the fixed-wing plane, sending global position commands and switching to OFFBOARD mode. Result, see image.
Is there a different param that I have to set, to make offboard global position control use GPS? Why does the position control not use the global position estimate in the first place?
Thanks for your help!