Skip to content

Commit

Permalink
AP_NavEKF: use exact matrix for trim rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall authored and tridge committed Oct 12, 2016
1 parent 5ff78b8 commit 3eba985
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libraries/AP_NavEKF/AP_NavEKF_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3eba985

Please sign in to comment.