mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Helicopter: use absolute value for yaw compensation from collective pitch
This commit is contained in:
parent
608ab9ff9c
commit
554d965a2d
@ -137,8 +137,8 @@ void ActuatorEffectivenessHelicopter::updateSetpoint(const matrix::Vector<float,
|
||||
float pitch_cmd = control_sp(ControlAxis::PITCH);
|
||||
|
||||
actuator_sp(0) = throttle;
|
||||
|
||||
actuator_sp(1) = control_sp(ControlAxis::YAW) + collective_pitch * _geometry.yaw_collective_pitch_scale;
|
||||
actuator_sp(1) = control_sp(ControlAxis::YAW)
|
||||
+ fabsf(collective_pitch) * _geometry.yaw_collective_pitch_scale;
|
||||
|
||||
for (int i = 0; i < _geometry.num_swash_plate_servos; i++) {
|
||||
actuator_sp(_first_swash_plate_servo_index + i) = collective_pitch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user