Flying a survey mission in a remote part of the world, I’ve now seen two instances where Ardupilot has a sudden reset of relative altitude to 0m, which causes it to start climbing with no end in sight. The issue seems reproducible, and I may have an immediate work around, but I’d really like to know the root cause.
Unfortunately, my mission location is sensitive information for the time being, so I don’t feel comfortable posting logs unless there’s a good way to scrub lat/long data. I’ll try to capture all relevant info.
Firmware version: Copter 3.5.2, modified with some default parameters and some extra proximity sensor drivers. No changes to EKF or anything of the like.
Hardware: Aerotenna OcPoC flight controller
RangeFinder: Aerotenna uLanding radar altimeter, RangeFinder set as altitude reference
Airframe: Aerotenna RTF kit
Mission Sensor: Micasense RedEdge camera
Mission Plan: Survey ending in RTL, Takeoff waypoint prior to defined survey
Mission was started from QGroundControl (RC Transmitter is present as backup). When I commanded the mission to start, flight mode changed to Guided, then vehicle took off to 100m and began the survey mission. With the radar altimeter as altitude source, the vehicle followed the terrain with no issues.
A few minutes into the flight, the vehicle stopped at a waypoint (not the end, but a few waypoints remaining), I noticed it began to climb for no particular reason, and QGC showed relative altitude had reset to around 0m. The data suggests the radar altimeter continued working with no issue, as shown here:
Looking at CTUN.Alt and CTUN.DAlt in the next plot shows the reset to 0m altitude, which drove the controller to command a climb in an attempt to return to 100m despite the still healthy AGL measurement from the altimeter.
Looking through EKF data, the few variables that drive and/or follow the issue are NKF1.PD, NKF3.IPF, and NKF4.SH as shown in the next two plots:
This first flight I was able to recover quickly with my RC transmitter. The second flight I tried commanding RTL from QGC, and rather than coming home it just kept climbing - Alt and DAlt kept resetting to 0m despite radar altimeter still providing good AGL measurement. I recovered with RC Transmitter, but obviously the altitude estimate was messed up.
In between the two flights with this issue, I flew another survey mission wherein I armed from the RC Transmitter, commanded Auto mode from transmitter, then late in the mission I commanded RTL from QGC and the vehicle returned home with no issues.
If the issue is immediately apparent, sorry for the trouble, but I can’t seem to figure out the root cause of the issue on my own. Thank you in advance for any help.