AP_NavEKF: implemented getRotationBodyToNED()

This commit is contained in:
Andrew Tridgell 2014-01-02 13:05:49 +11:00
parent 8c5cde4efd
commit 33673c954d

View File

@ -2110,4 +2110,11 @@ void NavEKF::calcEarthRateNED(Vector3f &omega, float latitude) const
omega.z = -earthRate*sinf(latitude);
}
void NavEKF::getRotationBodyToNED(Matrix3f &mat) const
{
Quaternion q(states[0], states[1], states[2], states[3]);
q.rotation_matrix(mat);
}
#endif // HAL_CPU_CLASS