wip: cleanup

This commit is contained in:
Balduin
2025-07-23 14:06:34 +02:00
parent 056aab8156
commit b4fd215b47
2 changed files with 3 additions and 7 deletions
@@ -267,12 +267,11 @@ void FlightTaskAuto::_prepareLandSetpoints()
Sticks::rotateIntoHeadingFrameXY(sticks_ne, _yaw, _land_heading);
const bool land_radius_enabled = _param_mpc_land_radius.get() > 0.0f;
const bool position_valid = !isnan(_position(0)) && !isnan(_position(1));
const bool position_valid = Vector2f(_position).isAllFinite();
float max_speed;
float max_speed = INFINITY;
if (land_radius_enabled && position_valid) {
const float distance_to_circle = math::trajectory::getMaxDistanceToCircle(_position.xy(), _initial_land_position.xy(),
_param_mpc_land_radius.get(), sticks_ne);
@@ -289,9 +288,6 @@ void FlightTaskAuto::_prepareLandSetpoints()
max_speed = 0.f;
sticks_xy.setZero();
}
} else {
max_speed = 10.0f;
}
PX4_INFO(" max speed: %.2f", (double) max_speed);
@@ -56,7 +56,7 @@ PARAM_DEFINE_INT32(MPC_LAND_RC_HELP, 0);
* When nudging is enabled (see MPC_LAND_RC_HELP), this controls
* the maximum allowed horizontal displacement from the original landing point.
*
* Setting the radius to -1 will disable this feature. Only works while local position is valid.
* Setting the radius to -1 will disable this feature. Nudging is only limited while local position is valid.
*
* @unit m
* @min -1