mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 04:57:34 +08:00
Move variable declaration to better place &
remove airspeed_innov_var_temp variable. setting to global variable even when fusion is aborted is okay
This commit is contained in:
committed by
Mathieu Bresciani
parent
05855b7fc1
commit
b5765eb3b4
+2
-2
@@ -1279,8 +1279,6 @@ void Ekf::controlFakePosFusion()
|
||||
// Fuse synthetic position observations every 200msec
|
||||
if (isTimedOut(_time_last_fake_pos, (uint64_t)2e5)) {
|
||||
|
||||
Vector3f fake_pos_obs_var;
|
||||
|
||||
// Reset position and velocity states if we re-commence this aiding method
|
||||
if (isTimedOut(_time_last_fake_pos, (uint64_t)4e5)) {
|
||||
resetHorizontalPosition();
|
||||
@@ -1294,6 +1292,8 @@ void Ekf::controlFakePosFusion()
|
||||
}
|
||||
_time_last_fake_pos = _time_last_imu;
|
||||
|
||||
Vector3f fake_pos_obs_var;
|
||||
|
||||
if (_control_status.flags.in_air && _control_status.flags.tilt_align) {
|
||||
fake_pos_obs_var(0) = fake_pos_obs_var(1) = sq(fmaxf(_params.pos_noaid_noise, _params.gps_pos_noise));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user