mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-23 03:56:37 +08:00
ekf2: configurable velocity state constraint (EKF2_VEL_LIM)
- replace hardcoded 1000 m/s velocity state constraint with new EKF2_VEL_LIM parameter (default 100 m/s) - new velocity limit also used for GPS checks and external vision velocity
This commit is contained in:
committed by
Mathieu Bresciani
parent
4215e20120
commit
9238656a33
@@ -261,7 +261,7 @@ void Ekf::predictState(const imuSample &imu_delayed)
|
||||
_state.pos += (vel_last + _state.vel) * imu_delayed.delta_vel_dt * 0.5f;
|
||||
|
||||
// constrain states
|
||||
_state.vel = matrix::constrain(_state.vel, -1000.f, 1000.f);
|
||||
_state.vel = matrix::constrain(_state.vel, -_params.velocity_limit, _params.velocity_limit);
|
||||
_state.pos = matrix::constrain(_state.pos, -1.e6f, 1.e6f);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user