diff --git a/src/modules/land_detector/FixedwingLandDetector.cpp b/src/modules/land_detector/FixedwingLandDetector.cpp index 2b04f2be4b7f..f91046a95905 100644 --- a/src/modules/land_detector/FixedwingLandDetector.cpp +++ b/src/modules/land_detector/FixedwingLandDetector.cpp @@ -71,19 +71,14 @@ bool FixedwingLandDetector::_get_landed_state() } else if (hrt_elapsed_time(&_vehicle_local_position.timestamp) < 1_s) { - float val; + float val = 0.0f; - if (!_vehicle_local_position.v_xy_valid) { - // set _velocity_xy_filtered to 0 if data is invalid - val = 0.0f; - - } else { + if (_vehicle_local_position.v_xy_valid) { // Horizontal velocity complimentary filter. val = 0.97f * _velocity_xy_filtered + 0.03f * sqrtf(_vehicle_local_position.vx * _vehicle_local_position.vx + _vehicle_local_position.vy * _vehicle_local_position.vy); } - if (PX4_ISFINITE(val)) { _velocity_xy_filtered = val; } diff --git a/src/modules/land_detector/land_detector_params_fw.c b/src/modules/land_detector/land_detector_params_fw.c index 348f263eb39d..6ab78fb8678c 100644 --- a/src/modules/land_detector/land_detector_params_fw.c +++ b/src/modules/land_detector/land_detector_params_fw.c @@ -104,9 +104,9 @@ PARAM_DEFINE_FLOAT(LNDFW_AIRSPD_MAX, 6.00f); PARAM_DEFINE_FLOAT(LNDFW_TRIG_TIME, 2.f); /** - * Fixed-wing land detector: max rotation + * Fixed-wing land detector: max rotational speed * - * Maximum allowed angular velocity around each axis allowed in the landed state. + * Maximum allowed norm of the angular velocity in the landed state. * * @unit deg/s * @decimal 1 diff --git a/src/modules/land_detector/land_detector_params_mc.c b/src/modules/land_detector/land_detector_params_mc.c index 121b365bb55a..1d61a7e00bb2 100644 --- a/src/modules/land_detector/land_detector_params_mc.c +++ b/src/modules/land_detector/land_detector_params_mc.c @@ -76,9 +76,9 @@ PARAM_DEFINE_FLOAT(LNDMC_Z_VEL_MAX, 0.25f); PARAM_DEFINE_FLOAT(LNDMC_XY_VEL_MAX, 1.5f); /** - * Multicopter max rotation + * Multicopter max rotational speed * - * Maximum allowed angular velocity around each axis allowed in the landed state. + * Maximum allowed norm of the angular velocity (roll, pitch) in the landed state. * * @unit deg/s * @decimal 1