mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-12 02:48:28 -04:00
AC_AttitudeControl: apply EKF Z gain scaler
for flying with DCM
This commit is contained in:
parent
a427abab0d
commit
10574f5188
@ -962,6 +962,7 @@ void AC_PosControl::update_z_controller()
|
||||
float pos_target_zf = _pos_target.z;
|
||||
|
||||
_vel_target.z = _p_pos_z.update_all(pos_target_zf, curr_alt, _limit.pos_down, _limit.pos_up);
|
||||
_vel_target.z *= AP::ahrs_navekf().getEkfControlScaleZ();
|
||||
|
||||
_pos_target.z = pos_target_zf;
|
||||
|
||||
@ -972,6 +973,7 @@ void AC_PosControl::update_z_controller()
|
||||
|
||||
const Vector3f& curr_vel = _inav.get_velocity();
|
||||
_accel_target.z = _pid_vel_z.update_all(_vel_target.z, curr_vel.z, _motors.limit.throttle_lower, _motors.limit.throttle_upper);
|
||||
_accel_target.z *= AP::ahrs_navekf().getEkfControlScaleZ();
|
||||
|
||||
// add feed forward component
|
||||
_accel_target.z += _accel_desired.z;
|
||||
|
Loading…
Reference in New Issue
Block a user