From 9c3103e33b9a065f0e0e38e9be1259a47aaf55e8 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Fri, 11 Feb 2022 22:26:28 +0000 Subject: [PATCH] AP_AHRS: View: get_gyro_latest should include pitch trim. --- libraries/AP_AHRS/AP_AHRS_View.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/AP_AHRS/AP_AHRS_View.cpp b/libraries/AP_AHRS/AP_AHRS_View.cpp index a8517077a8bad..2adbd8d38588a 100644 --- a/libraries/AP_AHRS/AP_AHRS_View.cpp +++ b/libraries/AP_AHRS/AP_AHRS_View.cpp @@ -84,9 +84,7 @@ void AP_AHRS_View::update() // return a smoothed and corrected gyro vector using the latest ins data (which may not have been consumed by the EKF yet) Vector3f AP_AHRS_View::get_gyro_latest(void) const { - Vector3f gyro_latest = ahrs.get_gyro_latest(); - gyro_latest.rotate(rotation); - return gyro_latest; + return rot_view * ahrs.get_gyro_latest(); } // rotate a 2D vector from earth frame to body frame