Here is an interesting question that I would like to share:
Is the estimation of the terrain altitude considering the attitude of the UAV?
Any pointer to the code?
What happens if I put the altimeter on a stabilized gimbal such that it always point downward?
@Zouritte If you have a stabilized range finder, you would have to remove the projection to the vertical axis : https://github.com/PX4/ecl/blob/master/EKF/terrain_estimator.cpp#L122 and maybe increase range_cos_max_tilt depending of how much your gimbal can move.
If you want to implement it properly and push it back to PX4, you should also consider having a parameter to choose whether the sensor is stabilized of fixed to the drone.