forked from Archive/PX4-Autopilot
MC land detector: remove LNDMC_THR_RANGE param
- no airframe changes the default - it does not make much sense to be able to configure the 0.1 threshold but the 0.3 threshold for ground contact detection cannot be configured.
This commit is contained in:
parent
d69cba5db9
commit
a9def8be93
|
@ -75,7 +75,6 @@ MulticopterLandDetector::MulticopterLandDetector()
|
|||
_paramHandle.maxRotation = param_find("LNDMC_ROT_MAX");
|
||||
_paramHandle.maxVelocity = param_find("LNDMC_XY_VEL_MAX");
|
||||
_paramHandle.maxClimbRate = param_find("LNDMC_Z_VEL_MAX");
|
||||
_paramHandle.throttleRange = param_find("LNDMC_THR_RANGE");
|
||||
_paramHandle.minThrottle = param_find("MPC_THR_MIN");
|
||||
_paramHandle.hoverThrottle = param_find("MPC_THR_HOVER");
|
||||
_paramHandle.minManThrottle = param_find("MPC_MANTHR_MIN");
|
||||
|
@ -121,7 +120,6 @@ void MulticopterLandDetector::_update_params()
|
|||
_params.maxRotation_rad_s = math::radians(_params.maxRotation_rad_s);
|
||||
param_get(_paramHandle.minThrottle, &_params.minThrottle);
|
||||
param_get(_paramHandle.hoverThrottle, &_params.hoverThrottle);
|
||||
param_get(_paramHandle.throttleRange, &_params.throttleRange);
|
||||
param_get(_paramHandle.minManThrottle, &_params.minManThrottle);
|
||||
param_get(_paramHandle.freefall_acc_threshold, &_params.freefall_acc_threshold);
|
||||
param_get(_paramHandle.freefall_trigger_time, &_params.freefall_trigger_time);
|
||||
|
@ -320,7 +318,7 @@ bool MulticopterLandDetector::_has_low_thrust()
|
|||
bool MulticopterLandDetector::_has_minimal_thrust()
|
||||
{
|
||||
// 10% of throttle range between min and hover once we entered ground contact
|
||||
float sys_min_throttle = _params.minThrottle + (_params.hoverThrottle - _params.minThrottle) * _params.throttleRange;
|
||||
float sys_min_throttle = _params.minThrottle + (_params.hoverThrottle - _params.minThrottle) * 0.1f;
|
||||
|
||||
// Determine the system min throttle based on flight mode
|
||||
if (!_control_mode.flag_control_climb_rate_enabled) {
|
||||
|
|
|
@ -101,7 +101,6 @@ private:
|
|||
param_t maxRotation;
|
||||
param_t minThrottle;
|
||||
param_t hoverThrottle;
|
||||
param_t throttleRange;
|
||||
param_t minManThrottle;
|
||||
param_t freefall_acc_threshold;
|
||||
param_t freefall_trigger_time;
|
||||
|
@ -115,7 +114,6 @@ private:
|
|||
float maxRotation_rad_s;
|
||||
float minThrottle;
|
||||
float hoverThrottle;
|
||||
float throttleRange;
|
||||
float minManThrottle;
|
||||
float freefall_acc_threshold;
|
||||
float freefall_trigger_time;
|
||||
|
|
|
@ -81,22 +81,6 @@ PARAM_DEFINE_FLOAT(LNDMC_ROT_MAX, 20.0f);
|
|||
*/
|
||||
PARAM_DEFINE_FLOAT(LNDMC_FFALL_THR, 2.0f);
|
||||
|
||||
/**
|
||||
* Multicopter sub-hover throttle scaling
|
||||
*
|
||||
* The range between throttle_min and throttle_hover is scaled
|
||||
* by this parameter to define how close to minimum throttle
|
||||
* the current throttle value needs to be in order to get
|
||||
* accepted as landed.
|
||||
*
|
||||
* @min 0.05
|
||||
* @max 0.5
|
||||
* @decimal 2
|
||||
*
|
||||
* @group Land Detector
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(LNDMC_THR_RANGE, 0.1f);
|
||||
|
||||
/**
|
||||
* Multicopter free-fall trigger time
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue