mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Fw Pos C: always reset pos_sp type from LOITER to POSITION if far away
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
920d6d84b5
commit
3369b5ee2f
@ -753,7 +753,6 @@ FixedwingPositionControl::control_position(const hrt_abstime &now, const Vector2
|
||||
} else if (pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
|
||||
// LOITER: use SETPOINT_TYPE_POSITION to get to SETPOINT_TYPE_LOITER
|
||||
if ((dist >= 0.f)
|
||||
&& (dist_z > 2.f * _param_fw_clmbout_diff.get())
|
||||
&& (dist_xy > 2.f * math::max(acc_rad, fabsf(pos_sp_curr.loiter_radius)))) {
|
||||
// SETPOINT_TYPE_LOITER -> SETPOINT_TYPE_POSITION
|
||||
position_sp_type = position_setpoint_s::SETPOINT_TYPE_POSITION;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user