AP_NavEKF3: allow access to quaternion for each instance

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

View File

@ -1037,10 +1037,11 @@ void NavEKF3::getRotationBodyToNED(Matrix3f &mat) const
}
// return the quaternions defining the rotation from NED to XYZ (body) axes
void NavEKF3::getQuaternion(Quaternion &quat) const
void NavEKF3::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

@ -170,7 +170,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