mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 08:13:56 -04:00
AP_NavEKF: use exact matrix for trim rotation
This commit is contained in:
parent
5ff78b8e47
commit
3eba985afd
@ -4345,9 +4345,8 @@ void NavEKF_core::setWindVelStates()
|
|||||||
// return the transformation matrix from XYZ (body) to NED axes
|
// return the transformation matrix from XYZ (body) to NED axes
|
||||||
void NavEKF_core::getRotationBodyToNED(Matrix3f &mat) const
|
void NavEKF_core::getRotationBodyToNED(Matrix3f &mat) const
|
||||||
{
|
{
|
||||||
Vector3f trim = _ahrs->get_trim();
|
|
||||||
state.quat.rotation_matrix(mat);
|
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
|
// return the innovations for the NED Pos, NED Vel, XYZ Mag and Vtas measurements
|
||||||
|
Loading…
Reference in New Issue
Block a user