ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.02k stars 17.57k forks source link

Copter: altitude jump when EKF core switches #14224

Open rmackay9 opened 4 years ago

rmackay9 commented 4 years ago

Copter handles EKF resets of yaw and horizontal position but it does not appear to handle resets of altitude. Below is a screenshot of a real flight in which the EKF2 cores were switched using an auxiliary switch (code is here).

image

rmackay9 commented 3 years ago

This issue came up again during Copter-4.1.0-beta testing: https://discuss.ardupilot.org/t/7inch-quadcopter-ac-4-1-0-beta5-inflight-exk3-lane-switch-root-cause-analysis-request/73507/6

RickReeser commented 5 months ago

I have encountered this a couple times. In my case, I was controlling the drone in Guided using the altitude reported by GLOBAL_POSITION_INT. This lane change causes that altitude to be very wrong in some cases, which becomes a safety issue if it is being used to control the drone.

From what I can tell, it is caused by the EKF cores having different origin altitudes. Of course, it should still maintain consistent altitude even if the origins are different.