6 Commits

Author SHA1 Message Date
bresch
690c1158ad HTE: do not update the estimator during fast up/down motions
Drag and prop wash effects produce significant forces at high speed
that can bias the estimator when applied for an extended period of time
2020-12-18 12:05:22 +01:00
bresch
39251daf28 HTE: pull status from class instead of returning struct 2020-12-18 12:05:22 +01:00
bresch
652cc4350e HTE: empty braces initialization of struct 2020-12-18 12:05:22 +01:00
bresch
d532bc9555 HTE: only run in air
the _landed flag only is not enough to tell if the drone is still touching
the ground, so an additional check based on the altitude AGL is required.

to have this in_air detection correctly updated, the module needs to be
scheduled on the vehicle_local_position message as no setpoint is
produced in non-assisted modes.
2020-12-18 12:05:22 +01:00
Daniel Agar
ba640acfcc
mc_hover_thrust_estimator: validity flag and other small improvements/fixes
- track and publish validity based on hover thrust variance, innovation test ratio, and hysteresis
 - only publish on actual updates or becoming inactive
 - fix dt (previous timestamp wasn't being saved)
 - use local position timestamp (corresponding) to accel data rather than current time to avoid unnecessary timing jitter
 - check local position validity before using
 - mc_hover_thrust_estimator: move from wq:lp_default -> wq:nav_and_controllers to ensure the hover thrust estimator runs after the position controller and uses the same vehicle_local_position data
 - land_detector: check hover thrust estimate validity and adjust low throttle thresholds if hover thrust is available
 - mc_pos_control: only use hover thrust estimate if valid
2020-08-03 10:30:52 -04:00
Daniel Agar
f9794e99f8
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>
2020-03-11 21:20:54 -04:00