mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 19:03:33 +08:00
ekf2: improve attitude estimation without horizontal aiding
- fake_pos only if at rest or tilt variances becomes large - fake pos: don't run when grav fusion is enabled - gravity fusion enabled by default - gravity: only fuse when accel norm and lpf norm are consistent Co-authored-by: bresch <brescianimathieu@gmail.com>
This commit is contained in:
@@ -68,11 +68,9 @@ void Ekf::controlFusionModes(const imuSample &imu_delayed)
|
||||
// monitor the tilt alignment
|
||||
if (!_control_status.flags.tilt_align) {
|
||||
// whilst we are aligning the tilt, monitor the variances
|
||||
const Vector3f angle_err_var_vec = getQuaternionVariance();
|
||||
|
||||
// Once the tilt variances have reduced to equivalent of 3deg uncertainty
|
||||
// Once the tilt variances have reduced to equivalent of 3 deg uncertainty
|
||||
// and declare the tilt alignment complete
|
||||
if ((angle_err_var_vec(0) + angle_err_var_vec(1)) < sq(math::radians(3.0f))) {
|
||||
if (getTiltVariance() < sq(math::radians(3.f))) {
|
||||
_control_status.flags.tilt_align = true;
|
||||
|
||||
// send alignment status message to the console
|
||||
|
||||
Reference in New Issue
Block a user