move hover_thrust_estimator to new module (mc_hover_thrust_estimator)

* MC_HTE: unitialize with hover_thrust parameter
* MC_HTE: constrain hover thrust setter between 0.1 and 0.9
* MC_HTE: integrate with land detector and velocity controller
* MCHoverThrustEstimator: Always publish an estimate even when not fusing measurements. This is required as the land detector and the position controller need to receive a hover thrust value.

* MC_HTE: use altitude agl threshold to start the estimator
local_position.z is relative to the origin of the EKF while dist_bottom
is above ground

Co-authored-by: bresch <brescianimathieu@gmail.com>
This commit is contained in:
Daniel Agar
2020-03-11 21:20:54 -04:00
committed by GitHub
co-authored by bresch
parent 4b9e6964f4
commit f9794e99f8
74 changed files with 419 additions and 141 deletions
@@ -48,6 +48,7 @@
#include <uORB/topics/vehicle_attitude.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/vehicle_local_position_setpoint.h>
#include <uORB/topics/hover_thrust_estimate.h>
#include "LandDetector.h"
@@ -102,6 +103,7 @@ private:
param_t hoverThrottle;
param_t minManThrottle;
param_t landSpeed;
param_t useHoverThrustEstimate;
} _paramHandle{};
struct {
@@ -109,6 +111,7 @@ private:
float hoverThrottle;
float minManThrottle;
float landSpeed;
bool useHoverThrustEstimate;
} _params{};
uORB::Subscription _actuator_controls_sub{ORB_ID(actuator_controls_0)};
@@ -118,6 +121,7 @@ private:
uORB::Subscription _vehicle_control_mode_sub{ORB_ID(vehicle_control_mode)};
uORB::Subscription _vehicle_local_position_sub{ORB_ID(vehicle_local_position)};
uORB::Subscription _vehicle_local_position_setpoint_sub{ORB_ID(vehicle_local_position_setpoint)};
uORB::Subscription _hover_thrust_estimate_sub{ORB_ID(hover_thrust_estimate)};
actuator_controls_s _actuator_controls {};
battery_status_s _battery_status {};