mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 04:53:35 +08:00
EKF: Rationalise use of rotation matrices and improve efficiency
This commit is contained in:
@@ -135,10 +135,10 @@ void Ekf::fuseVelPosHeight()
|
||||
// innovation gate size
|
||||
gate_size[5] = fmaxf(_params.baro_innov_gate, 1.0f);
|
||||
|
||||
} else if (_control_status.flags.rng_hgt && (_R_prev(2, 2) > 0.7071f)) {
|
||||
} else if (_control_status.flags.rng_hgt && (_R_to_earth(2, 2) > 0.7071f)) {
|
||||
fuse_map[5] = true;
|
||||
// use range finder with tilt correction
|
||||
_vel_pos_innov[5] = _state.pos(2) - (-math::max(_range_sample_delayed.rng * _R_prev(2, 2),
|
||||
_vel_pos_innov[5] = _state.pos(2) - (-math::max(_range_sample_delayed.rng * _R_to_earth(2, 2),
|
||||
_params.rng_gnd_clearance));
|
||||
// observation variance - user parameter defined
|
||||
R[5] = fmaxf(_params.range_noise, 0.01f);
|
||||
|
||||
Reference in New Issue
Block a user