AP_NavEKF: use exact matrix for trim rotation

This commit is contained in:
Jonathan Challinger 2016-08-09 11:33:21 -07:00 committed by Andrew Tridgell
parent 5ff78b8e47
commit 3eba985afd

View File

@ -4345,9 +4345,8 @@ void NavEKF_core::setWindVelStates()
// return the transformation matrix from XYZ (body) to NED axes
void NavEKF_core::getRotationBodyToNED(Matrix3f &mat) const
{
Vector3f trim = _ahrs->get_trim();
state.quat.rotation_matrix(mat);
mat.rotateXYinv(trim);
mat = mat * _ahrs->get_rotation_vehicle_body_to_autopilot_body();
}
// return the innovations for the NED Pos, NED Vel, XYZ Mag and Vtas measurements