PX4-ECL icon indicating copy to clipboard operation
PX4-ECL copied to clipboard

EKF: tilt_align and uncertainty at high pitch angles

Open CarlOlsson opened this issue 6 years ago • 3 comments

We declare tilt_align = true when the roll + pitch uncertainty is lower than 3 degrees. https://github.com/PX4/ecl/blob/c52f4bab1a1655f298778b9a815bbe3c70d91529/EKF/control.cpp#L61-L62

This does not work properly at high pitch angles in the same way as the increase in yaw uncertainty at a heading reset wasn't working before.

E.g. for a tailsitter which is booted up with the body x axis facing upwards the tilt_aligned flag is set to true when the pitch and yaw uncertainty is below 3 degrees.

Sidenote: Currently yaw_align is set to true in initialiseFilter() before tilt_align is set to true in controlFusionModes(). This leads to the fact that the magnetometer is fused before tilt_align is true

CarlOlsson avatar Feb 06 '19 14:02 CarlOlsson

@CarlOlsson I think this has been fixed by https://github.com/PX4/ecl/pull/549, https://github.com/PX4/ecl/pull/552 and https://github.com/PX4/ecl/pull/556

priseborough avatar Apr 04 '19 08:04 priseborough

No, the issue is still there.

This makes an assumption that the vehicles z axis is pointing down https://github.com/PX4/ecl/blob/f95cd4b3584d029c35b288a39180ddf25b2dd004/EKF/control.cpp#L56-L59

CarlOlsson avatar Apr 04 '19 13:04 CarlOlsson

We could use the component of the angle_err_var_vec vector perpendicular to the earth frame D axis to determine of the tilt has aligned.

priseborough avatar Aug 17 '21 09:08 priseborough