mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 05:13:33 +08:00
Navigator: Support straight line mission landings (#23576)
* introduced altitude acceptance radius in position setpoint for fixed wing guidance - allows navigator to explicitly set the altitude acceptance radius - needed for staright line landing support * added ignore_alt_acceptance to position setpoint message to allow guidance logic to ignore altitude error on waypoint - can be useful to prevent loitering at a waypoint within a mission landing sequence * only set altitude acceptance radius to infinity for a waypoint inside a mission landing for fixed wing vehicles * navigator: return altitude acceptance radius from triplet if it's valid * FixedWingPositionControl: check if alt acceptance radius provided in position setpoint is larger 0 --------- Signed-off-by: RomanBapst <bapstroman@gmail.com> Co-authored-by: Alvaro Fernandez <alvaro@auterion.com>
This commit is contained in:
co-authored by
Alvaro Fernandez
parent
03aec2e188
commit
c94c1ce4d2
@@ -1116,9 +1116,14 @@ float Navigator::get_default_acceptance_radius()
|
||||
float Navigator::get_altitude_acceptance_radius()
|
||||
{
|
||||
if (get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING) {
|
||||
|
||||
const position_setpoint_s &curr_sp = get_position_setpoint_triplet()->current;
|
||||
const position_setpoint_s &next_sp = get_position_setpoint_triplet()->next;
|
||||
|
||||
if (!force_vtol() && next_sp.type == position_setpoint_s::SETPOINT_TYPE_LAND && next_sp.valid) {
|
||||
if ((PX4_ISFINITE(curr_sp.alt_acceptance_radius) && curr_sp.alt_acceptance_radius > FLT_EPSILON)) {
|
||||
return curr_sp.alt_acceptance_radius;
|
||||
|
||||
} else if (!force_vtol() && next_sp.type == position_setpoint_s::SETPOINT_TYPE_LAND && next_sp.valid) {
|
||||
// Use separate (tighter) altitude acceptance for clean altitude starting point before FW landing
|
||||
return _param_nav_fw_altl_rad.get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user