EKF Altitude Strange Behavior

Hello!

In recent flights, I have noticed some strange readings in my EK3 PD and in my canonical position altitude. My aircraft is a quad-plane with a fixed wing. The error crops up during quad landing as soon as my rangefinder kicks in. As you can see in the photo, the POS altitude begins to range wildly. What’s strange is that I’ve examined my barometer data, GPS data, Z IMU data, and LiDAR data and they all look to be normal. I replaced my Pixhawk cube and the behavior persisted. This strange behavior did not seem to affect aircraft performance, the aircraft performed a routine landing. If anyone has seen this phenomena before or if anyone has any ideas for debugging this, please let me know!


A log would confirm my suspicion, please upload it. What version are you running?
Have you configured EK3_RNG_USE_HGT and EK3_RNG_USE_SPD? There was a bug in that feature that we recently fixed that sort of presented itself like this…

I think it was this one: EKF3 Rangefinder Use Bugfix by priseborough · Pull Request #22250 · ArduPilot/ardupilot · GitHub

Thank you for your reply. Here is a link to the logs:

I am running 4.2.3 and I have the following parameters set:
EK3_RNG_USE_HGT = 15
EK3_RNG_USE_SPD = 5

To configure these parameters, is giving them a value enough or is there an additional step?

Yeah, I think you are suffering from the same bug. I don’t think we have seen any fatal instance of this one. If I may ask, why have you set these parameters? Please upgrade to latest Plane version to protect yourself in any case.

Those parameters just made sense for the hardware configuration. I felt better relying on the LiDAR just before landing. Thanks, I’ll see about updating to a newer Plane version. I appreciate your help!

If, even after upgrading, you see the same issue, please enable replay logging: LOG_REPLAY = 1 and send us a log here. I’ll have a look

I’ve also been noticing some other strange EKF-related behavior. For instance, sometimes during flight I’ll have an EKF error and the aircraft will turn on its VTOL motors during fixed wing flight. Examining the logs shows that the EKF speed is below the threshold for VTOL assist, but none of the sensors reporting velocity are below the threshold. Is this related?