mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Add parameter for terrain timeout
This commit is contained in:
parent
4df0054873
commit
ab69681744
@ -243,6 +243,7 @@ struct parameters {
|
||||
float wind_vel_p_noise_scaler{0.5f}; ///< scaling of wind process noise with vertical velocity
|
||||
float terrain_p_noise{5.0f}; ///< process noise for terrain offset (m/sec)
|
||||
float terrain_gradient{0.5f}; ///< gradient of terrain used to estimate process noise due to changing position (m/m)
|
||||
float terrain_timeout{10.f}; ///< maximum time for invalid bottom distance measurements before resetting terrain estimate (s)
|
||||
|
||||
// initialization errors
|
||||
float switch_on_gyro_bias{0.1f}; ///< 1-sigma gyro bias uncertainty at switch on (rad/sec)
|
||||
|
||||
@ -166,7 +166,8 @@ void Ekf::fuseHagl()
|
||||
|
||||
} else {
|
||||
// If we have been rejecting range data for too long, reset to measurement
|
||||
if (isTimedOut(_time_last_hagl_fuse, (uint64_t)10E6)) {
|
||||
const uint64_t timeout = static_cast<uint64_t>(_params.terrain_timeout * 1e6f);
|
||||
if (isTimedOut(_time_last_hagl_fuse, timeout)) {
|
||||
_terrain_vpos = _state.pos(2) + meas_hagl;
|
||||
_terrain_var = obs_variance;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user