VTOL pusher assist: return vehicle to level position

This commit is contained in:
Sander Smeets
2017-07-10 21:15:08 +02:00
committed by Lorenz Meier
parent 81c46b6f92
commit 70178266f0
+2 -2
View File
@@ -391,8 +391,8 @@ void Standard::update_mc_state()
_pusher_throttle = (sinf(-pitch_forward) - sinf(_params_standard.down_pitch_max))
* _v_att_sp->thrust * _params_standard.forward_thrust_scale;
// limit desired pitch
float pitch_new = -_params_standard.down_pitch_max;
// return the vehicle to level position
float pitch_new = 0;
// create corrected desired body z axis in heading frame
matrix::Dcmf R_tmp = matrix::Eulerf(roll_new, pitch_new, 0.0f);