Hi everyone, what if i want to set my altitude just based on the rangefinder measurement? i tried to select Rangefinder in EK3_SRC1_POSZ, then i set EK3_RNG_I_GATE = 300, RNGFND1_GNDCLEAR = 28 (which is actually the height measured by the sensor while the drone is on GND), RNG_FND1_MIN_CM = 30. However, the alt parameter i see on the HUD in quick is not 28cm while on the ground but something like 38. Any suggestion? what am i doing wrong?
I don’t have an exact answer but I imagine the difference is that the altitude shown in the HUD is the alt-above-home which is reset to zero when the vehicle is armed so it may not be exactly the same as the alt-above-origin which is what the EKF will interpret the altitude as.
By the way, using a rangefinder for altitude estimation is not a good idea unless the vehicle is indoors in an environment with a flat floor and no obstacles on the ground.
If instead you’re trying to do “terrain following” or “surface tracking” those features are all done in the “control” part of AP and don’t require the EKF to use the lidar at all actually.
Thank you for the answer. I am actually working indoor. I understand the difference. Since i am working with uwb, the starting altitude is 263 (wrt sea level), but then, when the anchors set and the second EKF origin starts, the altitude behaves in a strange way. Especially if a try to redefine the origine and home on the map