mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 21:55:34 +08:00
ekf2: EKF vehicle_at_rest always require some rotation in addition to vibration metrics
This commit is contained in:
@@ -87,9 +87,8 @@ bool EstimatorInterface::checkIfVehicleAtRest(float dt, const imuSample &imu)
|
||||
{
|
||||
// detect if the vehicle is not moving when on ground
|
||||
if (!_control_status.flags.in_air) {
|
||||
if ((_vibe_metrics(1) * 4.0E4f > _params.is_moving_scaler)
|
||||
|| (_vibe_metrics(2) * 2.1E2f > _params.is_moving_scaler)
|
||||
|| ((imu.delta_ang.norm() / dt) > 0.05f * _params.is_moving_scaler)) {
|
||||
if (((_vibe_metrics(1) * 4.0e4f > _params.is_moving_scaler) || (_vibe_metrics(2) * 2.1e2f > _params.is_moving_scaler))
|
||||
&& ((imu.delta_ang.norm() / dt) > 0.05f * _params.is_moving_scaler)) {
|
||||
|
||||
_time_last_move_detect_us = imu.time_us;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user