mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 05:13:34 +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:
@@ -44,7 +44,6 @@
|
||||
namespace land_detector
|
||||
{
|
||||
|
||||
|
||||
bool RoverLandDetector::_get_ground_contact_state()
|
||||
{
|
||||
return true;
|
||||
@@ -52,14 +51,11 @@ bool RoverLandDetector::_get_ground_contact_state()
|
||||
|
||||
bool RoverLandDetector::_get_landed_state()
|
||||
{
|
||||
|
||||
_vehicle_status_sub.update(&_vehicle_status);
|
||||
|
||||
if (_vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_LAND) {
|
||||
return true; // If Landing has been requested then say we have landed.
|
||||
|
||||
} else {
|
||||
return !_actuator_armed.armed; // If we are armed we are not landed.
|
||||
return !_armed; // If we are armed we are not landed.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user