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:
Daniel Agar
2020-08-02 13:37:23 -04:00
committed by GitHub
parent 63a23957b1
commit f5f2897486
13 changed files with 223 additions and 321 deletions
@@ -54,8 +54,6 @@
namespace land_detector
{
extern "C" __EXPORT int land_detector_main(int argc, char *argv[]);
static char _currentMode[12];
int LandDetector::task_spawn(int argc, char *argv[])
@@ -145,8 +143,7 @@ The module runs periodically on the HP work queue.
return 0;
}
int land_detector_main(int argc, char *argv[])
extern "C" __EXPORT int land_detector_main(int argc, char *argv[])
{
return LandDetector::main(argc, argv);
}