Skip to content

Commit

Permalink
Standard: fill att_sp.thrust[0] with _pusher_thr value during transit…
Browse files Browse the repository at this point in the history
…ion to FW (#21520)

Once passed the transition and in FW mode, it takes some ms unitl the FW att sp is updated
by the FW att controller. During this time the last published attitude sp is kept bein used,
which is the one that was published during transition. So let's fill the thrust[0] of it.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
  • Loading branch information
sfuhrer authored Apr 27, 2023
1 parent f76399b commit bfc1e36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/vtol_att_control/standard.cpp
Original file line number Diff line number Diff line change
@@ -226,6 +226,8 @@ void Standard::update_transition_state()
// ramp up FW_PSP_OFF
_v_att_sp->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(_v_att_sp->roll_body, _v_att_sp->pitch_body, _v_att_sp->yaw_body));
q_sp.copyTo(_v_att_sp->q_d);

0 comments on commit bfc1e36

Please sign in to comment.