-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Hi,
Cool project! I'm trying to build something similar but written in Rust and targeting the Raspberry Pi Pico. It's still early days and I'm now trying to figure out the altitude/vertical speed estimation algorithm.
I currently have something similar to your KF2 filter without acceleration input but the response to vertical speed changes is not as fast as I want. I'm considering adding an IMU and AHRS to obtain vertical acceleration and use this as an input in the altitude KF, similar to your KF3+ filters (excellent write-up btw!).
I noticed your project uses the Mahony AHRS. This filter, and also the Madgwick AHSR, is known to be susceptible to attitude drift when there is horizontal acceleration because it's not able to distinguish this from gravity. I haven't done any tests myself but I imagine this would be a problem when making turns in a thermal. If the AHRS incorrectly estimates you're flying level then the acceleration felt in the turn is fed into the altitude KF, leading to an over estimation of the vertical speed. I'm curious how you managed to solve this problem, or if it's not a problem at all in practice.
Your altitude KF includes an acceleration bias term. Is this to capture this bias in the vertical acceleration cause by attitude drift of the AHRS? Or does it serve another purpose?