HTE: add new parameter HTE_THR_RANGE to define range of estimated thrust

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2022-02-11 14:19:50 +01:00
committed by Mathieu Bresciani
parent 34805e43fd
commit 2eba1847fd
5 changed files with 33 additions and 6 deletions
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
* Copyright (c) 2020-2022 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -86,6 +86,11 @@ void MulticopterHoverThrustEstimator::updateParams()
}
_hover_thrust_ekf.setAccelInnovGate(_param_hte_acc_gate.get());
_hover_thrust_ekf.setMinHoverThrust(math::constrain(_param_mpc_thr_hover.get() - _param_hte_thr_range.get(), 0.f,
0.8f));
_hover_thrust_ekf.setMaxHoverThrust(math::constrain(_param_mpc_thr_hover.get() + _param_hte_thr_range.get(), 0.2f,
0.9f));
}
void MulticopterHoverThrustEstimator::Run()