13 Commits

Author SHA1 Message Date
mahimayoga
879e0ea9b1 MC-hte: use allocated thrust as input for hover thrust estimator.
Improves estimates on vehicles where thrust is often saturating.
2025-01-13 11:56:09 +01:00
BazookaJoe1900
4d83badba1
fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
Daniel Agar
6135bb384b cleanup module callback registration failed errors 2022-03-23 20:44:50 -04:00
Silvan Fuhrer
2eba1847fd HTE: add new parameter HTE_THR_RANGE to define range of estimated thrust
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-02-11 17:04:14 +01:00
bresch
904ed57aba HTE: decrease sensitivity with speed
VTOL planes are getting lift from the wing when flying in MC mode at
high speed. They (and some other drones) also get extra drag when
climbing and descending at high speed, corrupting the hover thrust
estimate.

To avoid this, two speed thresholds (vertical and horizontal) are defined
above which the sensitivity of the estimator is decreased by linearly
increasing the observation noise.
2021-09-25 20:07:28 -04:00
Mathieu Bresciani
9cedb169fc
HTE: relax validity condition when already valid (#17783)
The condition to get valid requires a low variance and test ratio. but
to stay valid, only the variance is required.

Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-06-23 07:33:11 +02:00
bresch
c253badba4 HTE: remove dist_bottom validity check
Without range finder, the validity flag goes to false quite quickly and
if can be that a vehicle never starts HTE is the takeoff is too slow.
In this specific context of takeoff detection, since
the exact value is not important, we can safely ignore the validity flag.
2020-12-18 12:05:22 +01:00
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