mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 05:50:34 +08:00
VTOL rate control architecture improvements (#10819)
* attitude and rate setpoint message: use 3D array for thrust demand * FixedWingAttitudeControl: rework airspeed scaling * move airspeed and scaling calculation into separate method * if vtol in hover and airspeed disabled use minimum airspeed instead of trim airspeed
This commit is contained in:
@@ -261,7 +261,7 @@ GroundRoverPositionControl::control_position(const matrix::Vector2f ¤t_pos
|
||||
_att_sp.roll_body = 0.0f;
|
||||
_att_sp.pitch_body = 0.0f;
|
||||
_att_sp.yaw_body = 0.0f;
|
||||
_att_sp.thrust = 0.0f;
|
||||
_att_sp.thrust_body[0] = 0.0f;
|
||||
|
||||
} else if ((pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_POSITION)
|
||||
|| (pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_TAKEOFF)) {
|
||||
@@ -272,7 +272,7 @@ GroundRoverPositionControl::control_position(const matrix::Vector2f ¤t_pos
|
||||
_att_sp.pitch_body = 0.0f;
|
||||
_att_sp.yaw_body = _gnd_control.nav_bearing();
|
||||
_att_sp.fw_control_yaw = true;
|
||||
_att_sp.thrust = mission_throttle;
|
||||
_att_sp.thrust_body[0] = mission_throttle;
|
||||
|
||||
} else if (pos_sp_triplet.current.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
|
||||
|
||||
@@ -284,7 +284,7 @@ GroundRoverPositionControl::control_position(const matrix::Vector2f ¤t_pos
|
||||
_att_sp.pitch_body = 0.0f;
|
||||
_att_sp.yaw_body = _gnd_control.nav_bearing();
|
||||
_att_sp.fw_control_yaw = true;
|
||||
_att_sp.thrust = 0.0f;
|
||||
_att_sp.thrust_body[0] = 0.0f;
|
||||
}
|
||||
|
||||
if (was_circle_mode && !_gnd_control.circle_mode()) {
|
||||
@@ -299,7 +299,7 @@ GroundRoverPositionControl::control_position(const matrix::Vector2f ¤t_pos
|
||||
_att_sp.pitch_body = 0.0f;
|
||||
_att_sp.yaw_body = 0.0f;
|
||||
_att_sp.fw_control_yaw = true;
|
||||
_att_sp.thrust = 0.0f;
|
||||
_att_sp.thrust_body[0] = 0.0f;
|
||||
|
||||
/* do not publish the setpoint */
|
||||
setpoint = false;
|
||||
|
||||
Reference in New Issue
Block a user