Added axis angle attitude representation. (#25)

This commit is contained in:
James Goppert
2016-07-05 20:59:42 -04:00
committed by GitHub
parent 3320d57f63
commit 0f41af271a
7 changed files with 243 additions and 2 deletions
+19
View File
@@ -27,6 +27,10 @@ class Quaternion;
template<typename Type>
class Euler;
template<typename Type>
class AxisAngle;
/**
* Direction cosine matrix class
*
@@ -129,6 +133,21 @@ public:
dcm(2, 2) = cosPhi * cosThe;
}
/**
* Constructor from axis angle
*
* This sets the transformation matrix from frame 2 to frame 1 where the rotation
* from frame 1 to frame 2 is described by a 3-2-1 intrinsic Tait-Bryan rotation sequence.
*
*
* @param euler euler angle instance
*/
Dcm(const AxisAngle<Type> & aa) {
Dcm &dcm = *this;
dcm = Quaternion<Type>(aa);
}
Vector<Type, 3> vee() const { // inverse to Vector.hat() operation
const Dcm &A(*this);
Vector<Type, 3> v;