diff --git a/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp b/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp index b33c8e8405..0c56c77ef4 100644 --- a/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp +++ b/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp @@ -54,11 +54,12 @@ void AC_AttitudeControl::angleef_rp_rateef_y(float roll_angle_ef, float pitch_an } // angleef_rpy - attempts to maintain a roll, pitch and yaw angle (all earth frame) -void AC_AttitudeControl::angleef_rpy(float roll_angle_ef, float pitch_angle_ef, float yaw_rate_ef) +void AC_AttitudeControl::angleef_rpy(float roll_angle_ef, float pitch_angle_ef, float yaw_angle_ef) { // set earth-frame angle targets _angle_ef_target.x = roll_angle_ef; _angle_ef_target.y = pitch_angle_ef; + _angle_ef_target.z = yaw_angle_ef; // convert earth-frame angle targets to earth-frame rate targets angle_to_rate_ef_roll(); diff --git a/libraries/AC_AttitudeControl/AC_AttitudeControl.h b/libraries/AC_AttitudeControl/AC_AttitudeControl.h index 95d7fc2bd4..b788c3f757 100644 --- a/libraries/AC_AttitudeControl/AC_AttitudeControl.h +++ b/libraries/AC_AttitudeControl/AC_AttitudeControl.h @@ -80,7 +80,7 @@ public: void angleef_rp_rateef_y(float roll_angle_ef, float pitch_angle_ef, float yaw_rate_ef); // angleef_rpy - attempts to maintain a roll, pitch and yaw angle (all earth frame) - void angleef_rpy(float roll_angle_ef, float pitch_angle_ef, float yaw_rate_ef); + void angleef_rpy(float roll_angle_ef, float pitch_angle_ef, float yaw_angle_ef); // // angle controller (earth-frame) methods