AP_AHRS: rotate if none zero pitch trim

This commit is contained in:
IamPete1 2019-03-14 17:40:57 +00:00 committed by Andrew Tridgell
parent eab7d08021
commit d78275c0a3

View File

@ -59,7 +59,7 @@ void AP_AHRS_View::update(bool skip_ins_update)
rot_body_to_ned = ahrs.get_rotation_body_to_ned();
gyro = ahrs.get_gyro();
if (!is_zero(y_angle)) {
if (!is_zero(y_angle + _pitch_trim_deg)) {
Matrix3f &r = rot_body_to_ned;
r.transpose();
r = rot_view * r;