Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_AHRS: View: get_gyro_latest should include pitch trim. #20059

Merged
merged 1 commit into from Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions libraries/AP_AHRS/AP_AHRS_View.cpp
Expand Up @@ -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
Expand Down