mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FW land detector: only use LNDFW_ROT_MAX if speeds are not valid
The rotational speed threshold on fixed-wing vehicles is triggering easily if the plane is lifted prior to takeoff (hand-launch), and can cause issues for the auto takeoff state machine. Thus if either airspeed or groundspeed is valid, it's better to rely on these for land detection, and only use the rotational speed if they're invalid. Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
parent
fa3f255301
commit
921dc67824
@ -121,7 +121,9 @@ bool FixedwingLandDetector::_get_landed_state()
|
||||
const float vel_xy_max_threshold = airspeed_invalid ? 0.7f * _param_lndfw_vel_xy_max.get() :
|
||||
_param_lndfw_vel_xy_max.get();
|
||||
|
||||
const float max_rotation_threshold = math::radians(_param_lndfw_rot_max.get()) ;
|
||||
// only use the max rotational threshold if neither airspeed nor groundspeed can be used for landing detection
|
||||
const float max_rotation_threshold = (!_vehicle_local_position.v_xy_valid
|
||||
&& airspeed_invalid) ? math::radians(_param_lndfw_rot_max.get()) : INFINITY;
|
||||
|
||||
// Crude land detector for fixedwing.
|
||||
landDetected = _airspeed_filtered < _param_lndfw_airspd.get()
|
||||
|
||||
@ -107,6 +107,7 @@ PARAM_DEFINE_FLOAT(LNDFW_TRIG_TIME, 2.f);
|
||||
* Fixed-wing land detector: max rotational speed
|
||||
*
|
||||
* Maximum allowed norm of the angular velocity in the landed state.
|
||||
* Only used if neither airspeed nor groundspeed can be used for landing detection.
|
||||
*
|
||||
* @unit deg/s
|
||||
* @decimal 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user