mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 11:10:37 +08:00
land_detector: multicopter ground contact fixes, improvements, and cleanup
- if "landed" and "maybe_landed" states are false then both the "hit_ground" and the "low_thrust" condition need to be true in order to detect landing - ground contact MC NAN setpoint workaround - ground contact additionally check acceleration setpoint - schedule with vehicle_local_position updates (most updates require valid local position) - don't allow LNDMC_Z_VEL_MAX to exceed MPC_LAND_SPEED - ground contact horizontal movement checks default to failed if estimates aren't available
This commit is contained in:
@@ -1575,7 +1575,6 @@ Commander::run()
|
||||
/* Update land detector */
|
||||
if (_land_detector_sub.updated()) {
|
||||
_was_landed = _land_detector.landed;
|
||||
bool was_falling = _land_detector.freefall;
|
||||
_land_detector_sub.copy(&_land_detector);
|
||||
|
||||
// Only take actions if armed
|
||||
@@ -1596,12 +1595,6 @@ Commander::run()
|
||||
_lvel_probation_time_us = _param_com_pos_fs_prob.get() * 1_s;
|
||||
}
|
||||
}
|
||||
|
||||
if (was_falling != _land_detector.freefall) {
|
||||
if (_land_detector.freefall) {
|
||||
mavlink_log_info(&mavlink_log_pub, "Freefall detected");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user