mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
TradHeli - tiny fix for yaw_offset. Yaw_offset is used to proactively counteract rotational force caused by changing the collective pitch (i.e. rapidly climbing or decending). There was a small bug for when the collective pitch is negative (i.e. powered decent) in which case the offset was in the incorrect direction.
This commit is contained in:
parent
f90694c671
commit
498970a948
@ -145,7 +145,7 @@ static void heli_move_swash(int roll_out, int pitch_out, int coll_out, int yaw_o
|
||||
// rudder feed forward based on collective
|
||||
#if HIL_MODE == HIL_MODE_DISABLED // don't do rudder feed forward in simulator
|
||||
if( !g.heli_ext_gyro_enabled ) {
|
||||
yaw_offset = g.heli_coll_yaw_effect * (coll_out_scaled - g.heli_coll_mid);
|
||||
yaw_offset = g.heli_coll_yaw_effect * abs(coll_out_scaled - g.heli_coll_mid);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user