Publish orbit status whenever the vehicle is in loiter

This commit moves the publish orbit status to be published whenever the vehicle is considering a loiter setpoint
This commit is contained in:
Jaeyoung-Lim
2022-01-19 11:57:55 +01:00
committed by Daniel Agar
parent 19c98b8841
commit dec5e7e9c8
@@ -843,10 +843,6 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c
_att_sp.pitch_reset_integral = false;
_att_sp.yaw_reset_integral = false;
if (pos_sp_curr.valid && pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
publishOrbitStatus(pos_sp_curr);
}
position_setpoint_s current_sp = pos_sp_curr;
if (_vehicle_status.in_transition_to_fw) {
@@ -893,6 +889,8 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c
case position_setpoint_s::SETPOINT_TYPE_LOITER:
control_auto_loiter(now, dt, curr_pos, ground_speed, pos_sp_prev, current_sp, pos_sp_next);
publishOrbitStatus(pos_sp_curr);
break;
case position_setpoint_s::SETPOINT_TYPE_LAND: