diff --git a/libraries/AP_Math/quaternion.cpp b/libraries/AP_Math/quaternion.cpp index 403158c74b..946bc97dc5 100644 --- a/libraries/AP_Math/quaternion.cpp +++ b/libraries/AP_Math/quaternion.cpp @@ -464,7 +464,7 @@ void Quaternion::rotate(const Vector3f &v) // convert this quaternion to a rotation vector where the direction of the vector represents // the axis of rotation and the length of the vector represents the angle of rotation -void Quaternion::to_axis_angle(Vector3f &v) +void Quaternion::to_axis_angle(Vector3f &v) const { const float l = sqrtf(sq(q2)+sq(q3)+sq(q4)); v = Vector3f(q2,q3,q4); diff --git a/libraries/AP_Math/quaternion.h b/libraries/AP_Math/quaternion.h index 25ca6cf398..0848f11eed 100644 --- a/libraries/AP_Math/quaternion.h +++ b/libraries/AP_Math/quaternion.h @@ -89,7 +89,7 @@ public: // convert this quaternion to a rotation vector where the direction of the vector represents // the axis of rotation and the length of the vector represents the angle of rotation - void to_axis_angle(Vector3f &v); + void to_axis_angle(Vector3f &v) const; // create a quaternion from a rotation vector where the direction of the vector represents // the axis of rotation and the length of the vector represents the angle of rotation