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