mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
AP_NavEKF: implemented getRotationBodyToNED()
This commit is contained in:
parent
8c5cde4efd
commit
33673c954d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user