mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 06:00:34 +08:00
pusher_assist: keep pitch setpoint VT_PITCH_MIN (#25871)
* pusher_assist: keep pitch setpoint VT_PITCH_MIN resetting the pitch setpoint to zero made little sense, because we lose the forward thrust component of the hover motors, while the pusher throttle was calculated to be applied in addition to the hover forward component * pusher assist: change default min pitches to 0 To make for a smoother transition for users who don't care much about pitch when pusher-assisting and were fine with it (mostly) being at zero
This commit is contained in:
@@ -365,7 +365,7 @@ PARAM_DEFINE_FLOAT(VT_B_DEC_I, 0.1f);
|
||||
* @decimal 1
|
||||
* @group VTOL Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(VT_PITCH_MIN, -5.0f);
|
||||
PARAM_DEFINE_FLOAT(VT_PITCH_MIN, 0.0f);
|
||||
|
||||
/**
|
||||
* Minimum pitch angle during hover landing.
|
||||
@@ -380,7 +380,7 @@ PARAM_DEFINE_FLOAT(VT_PITCH_MIN, -5.0f);
|
||||
* @decimal 1
|
||||
* @group VTOL Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(VT_LND_PITCH_MIN, -5.0f);
|
||||
PARAM_DEFINE_FLOAT(VT_LND_PITCH_MIN, 0.0f);
|
||||
|
||||
/**
|
||||
* Spoiler setting while landing (hover)
|
||||
|
||||
@@ -515,12 +515,8 @@ float VtolType::pusher_assist()
|
||||
// limit forward actuation to [0, 0.9]
|
||||
forward_thrust = math::constrain(forward_thrust, 0.0f, 0.9f);
|
||||
|
||||
// Set the pitch to 0 if the pitch limit is negative (pitch down), but allow a positive (pitch up) pitch.
|
||||
// This can be used for tiltrotor to make them hover with a positive angle of attack
|
||||
const float pitch_new = pitch_setpoint_min > 0.f ? pitch_setpoint_min : 0.f;
|
||||
|
||||
// create corrected desired body z axis in heading frame
|
||||
const Dcmf R_tmp = Eulerf(roll_new, pitch_new, 0.0f);
|
||||
const Dcmf R_tmp = Eulerf(roll_new, pitch_setpoint_min, 0.0f);
|
||||
Vector3f tilt_new(R_tmp(0, 2), R_tmp(1, 2), R_tmp(2, 2));
|
||||
|
||||
// rotate the vector into a new frame which is rotated in z by the desired heading
|
||||
|
||||
Reference in New Issue
Block a user