mirror of https://github.com/ArduPilot/ardupilot
AP_NavEKF2: allow access to quaternion for each instance
This commit is contained in:
parent
835aa56777
commit
9f3c2cb704
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue