mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-26 01:00:36 +08:00
refactor(vtol_att_control): build standard VTOL transition attitude setpoint in one line
Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Balduin <balduin@auterion.com>
This commit is contained in:
1 parent
b4e9cd6648
commit
6eac7a08af
1 file changed
+2
-5
@@ -170,8 +170,7 @@ void Standard::update_transition_state()
|
||||
// ramp up FW_PSP_OFF
|
||||
pitch_body = math::radians(_param_fw_psp_off.get()) * (1.0f - mc_weight);
|
||||
_v_att_sp->thrust_body[0] = _pusher_throttle;
|
||||
const Quatf q_sp(Eulerf(roll_body, pitch_body, yaw_body));
|
||||
q_sp.copyTo(_v_att_sp->q_d);
|
||||
Quatf(Eulerf(roll_body, pitch_body, yaw_body)).copyTo(_v_att_sp->q_d);
|
||||
|
||||
} else if (_common_vtol_mode == mode::TRANSITION_TO_MC) {
|
||||
|
||||
@@ -191,9 +190,7 @@ void Standard::update_transition_state()
|
||||
roll_body = mc_weight * roll_body + (1.0f - mc_weight) * roll_body_fw;
|
||||
}
|
||||
|
||||
const Quatf q_sp(Eulerf(roll_body, pitch_body, yaw_body));
|
||||
|
||||
q_sp.copyTo(_v_att_sp->q_d);
|
||||
Quatf(Eulerf(roll_body, pitch_body, yaw_body)).copyTo(_v_att_sp->q_d);
|
||||
|
||||
_pusher_throttle = 0.0f;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user