mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mc_pos_control: do not do tilt compensation when hor velocity is controlled
- fixed a bug where tilt compensation was done also when the horizontal velocity was controlled. This is not needed because in this case the controller outputs a 3D thrust vector. Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
parent
f15d1ce5e7
commit
aabf753ecb
@ -1891,8 +1891,8 @@ MulticopterPositionControl::task_main()
|
||||
}
|
||||
}
|
||||
|
||||
if (_control_mode.flag_control_altitude_enabled) {
|
||||
/* thrust compensation for altitude only control modes */
|
||||
if (_control_mode.flag_control_climb_rate_enabled && !_control_mode.flag_control_velocity_enabled) {
|
||||
/* thrust compensation when vertical velocity but not horizontal velocity is controlled */
|
||||
float att_comp;
|
||||
|
||||
if (_R(2, 2) > TILT_COS_MAX) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user