diff --git a/src/lib/flight_tasks/tasks/FlightTask/FlightTask.cpp b/src/lib/flight_tasks/tasks/FlightTask/FlightTask.cpp index 58038977d3..2ee5151a7c 100644 --- a/src/lib/flight_tasks/tasks/FlightTask/FlightTask.cpp +++ b/src/lib/flight_tasks/tasks/FlightTask/FlightTask.cpp @@ -164,7 +164,7 @@ void FlightTask::_evaluateVehicleLocalPosition() void FlightTask::_evaluateDistanceToGround() { - // Altitude above ground is by default just the negation of the current local position in D-direction. + // Altitude above ground is local z-position or altitude above home or distance sensor altitude depending on what's available _dist_to_ground = -_position(2); if (PX4_ISFINITE(_dist_to_bottom)) { diff --git a/src/lib/flight_tasks/tasks/FlightTask/FlightTask.hpp b/src/lib/flight_tasks/tasks/FlightTask/FlightTask.hpp index 9ff10180ab..d65e1b48c2 100644 --- a/src/lib/flight_tasks/tasks/FlightTask/FlightTask.hpp +++ b/src/lib/flight_tasks/tasks/FlightTask/FlightTask.hpp @@ -211,7 +211,7 @@ protected: matrix::Vector3f _position; /**< current vehicle position */ matrix::Vector3f _velocity; /**< current vehicle velocity */ float _yaw = 0.f; /**< current vehicle yaw heading */ - float _dist_to_bottom = 0.0f; /**< current height above ground level */ + float _dist_to_bottom = 0.f; /**< current height above ground level */ float _dist_to_ground = 0.f; /**< equals _dist_to_bottom if valid, height above home otherwise */ /** diff --git a/src/modules/mc_pos_control/mc_pos_control_params.c b/src/modules/mc_pos_control/mc_pos_control_params.c index 6b237ca115..642cb98e85 100644 --- a/src/modules/mc_pos_control/mc_pos_control_params.c +++ b/src/modules/mc_pos_control/mc_pos_control_params.c @@ -352,6 +352,7 @@ PARAM_DEFINE_FLOAT(MPC_LAND_SPEED, 0.7f); /** * Maximum horizontal velocity during landing + * Set the value higher than the otherwise expected maximum to disable any slowdown. * * @unit m/s * @min 0 @@ -692,11 +693,12 @@ PARAM_DEFINE_FLOAT(MPC_YAWRAUTO_MAX, 45.0f); /** * Altitude for 1. step of slow landing (descend) * - * Below this altitude descending velocity gets limited - * to a value between "MPC_Z_VEL_MAX" and "MPC_LAND_SPEED" - * to enable a smooth descent experience. - * The horizontal velocity also gets limited to a value + * Below this altitude: + * - descending velocity gets limited to a value + * between "MPC_Z_VEL_MAX" and "MPC_LAND_SPEED" + * - horizontal velocity gets limited to a value * between "MPC_VEL_MANUAL" and "MPC_LAND_VEL_XY" + * for a smooth descent and landing experience. * Value needs to be higher than "MPC_LAND_ALT2" * * @unit m