mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_NavEKF3: allow access to quaternion for each instance
This commit is contained in:
parent
9f3c2cb704
commit
248773a7c8
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user