AP_NavEKF2: allow access to quaternion for each instance

This commit is contained in:
Andrew Tridgell 2017-04-15 20:36:34 +10:00
parent 835aa56777
commit 9f3c2cb704
2 changed files with 4 additions and 3 deletions

View File

@ -1033,10 +1033,11 @@ void NavEKF2::getRotationBodyToNED(Matrix3f &mat) const
}
// return the quaternions defining the rotation from NED to XYZ (body) axes
void NavEKF2::getQuaternion(Quaternion &quat) const
void NavEKF2::getQuaternion(int8_t instance, Quaternion &quat) const
{
if (instance < 0 || instance >= num_cores) instance = primary;
if (core) {
core[primary].getQuaternion(quat);
core[instance].getQuaternion(quat);
}
}

View File

@ -179,7 +179,7 @@ public:
void getRotationBodyToNED(Matrix3f &mat) const;
// return the quaternions defining the rotation from NED to XYZ (body) axes
void getQuaternion(Quaternion &quat) const;
void getQuaternion(int8_t instance, Quaternion &quat) const;
// return the innovations for the specified instance
// An out of range instance (eg -1) returns data for the the primary instance