Hi, I am using 4.6.0.25 on a quad for indoor flights on a flat surface. I use external vision position for autonomous navigation and have a rangefinder which I have configured as the main source for altitude. The issue I face is that sometimes the vision position does not initialize exactly in (0,0,0) and when this happens I am surprisingly getting bad altitude estimations in the EKF. I initially thought this could be caused by the baro, but it does not seem to be the case as the estimation is initialized close to the vision position estimation. Any help is very much appreciated.
The first step os to update to 4.6.3 and retest
Hi all,
After looking carefully at the EKF outputs during system initialization, I noticed that EKF’s Z is initialized using EXT_NAV’s Z, regardless of the fact that the rangefinder has been configured as the main source of altitude. I understand this is an undesired behavior.
I would like to use EXT_NAV only for X and Y and I would like EXT_NAV’s Z measurements to be either complete disregarded or at least have a much lower weight on the estimated Z output.
By the way, I tested both 4.6.0.15 and 4.6.3 and the issue persists.
Your help is very much appreciated.
And the second step is to show your PARAMS and a log.bin from your test
You can download the files from my dropbox here: Dropbox
Sorry if my lua script for battery management is too verbose and thank you very much for your help!
Hi, were you able to check my files?
Any ideas of what is happening here? Thank you
I am no expert in this but your rangefinder shows steady quality: -1
Hi,
As per the log, the EKF altitude is correctly following the rangefinder readings, and there doesn’t seem to be any issue in this flight.
If you have logs from the problematic (bad) flight, please share those as well so we can analyze further. Additionally, if possible, please try a flight at around 1 meter altitude to better observe the behavior.
For indoor flights, if you want the EKF to rely on the rangefinder height, please set the following parameter:
EK3_RNG_USE_HGT = 70
You may need to optimize this value further (lower or higher) depending on your rangefinder’s performance and sensitivity to lighting conditions. Hopefully, this should help improve the results.