Consider a scenario where a high endurance plane is given a single waypoint command that is 10+ km away. Due to the curvature of the earth, would the plane loose altitude while en route? Do Ardupilot’s controllers use a reference height based on a tangent plane coordinate system (which would cause an altitude loss over large distances), or do they use an altitude in WGS84, MSL, etc?
The EKF fuses readings from sensors, in this case GPS, Baro, terrain data, and will try to maintain the desired altitude as reported by those sensors - meaning the copter or plane should approximately follow the globe curve.