2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
26#include "core/Matrix.hpp"
27#include "core/CartesianVector.hpp"
28#include "core/safemath.hpp"
29#include "core/matrixmath.hpp"
70 Euler321<T>(
const T(&initial)[3]);
74 Euler321<T>(
const Euler321<T> &initial);
78 Euler321<T>(
const std::array<T, 3> &initial);
102 void toDCM(
DCM<T> &dcm_f1_f2)
const;
103 DCM<T> toDCM()
const;
106 template <
typename T>
107 Euler321<T>::Euler321() :
110 template <
typename T>
111 Euler321<T>::Euler321(
const T(&initial)[3]) :
114 template <
typename T>
115 Euler321<T>::Euler321(
const Euler321<T> &initial) :
118 template <
typename T>
119 Euler321<T>::Euler321(
const std::array<T, 3> &initial) :
122 template <
typename T>
125 int err = safeDivide(1, cos(
CartesianVector<T, 3>::values[1][0]), multiplier);
129 eulerdot_f1_f2.values[0][0] = sin(
CartesianVector<T, 3>::values[2][0])*omega_f1_f2__f1.values[1][0] + cos(
CartesianVector<T, 3>::values[2][0])*omega_f1_f2__f1.values[2][0];
132 multiply(multiplier, eulerdot_f1_f2, eulerdot_f1_f2);
137 template <
typename T>
138 void Euler321<T>::
toDCM(
DCM<T> &dcm_f1_f2)
const {
149 template <
typename T>
150 DCM<T> Euler321<T>::toDCM()
const {
Standard vector class derived from Matrix.
Definition CartesianVector.hpp:39
Class defining a direction cosine matrix inherited from Matrix.
Definition DCM.hpp:71
void toDCM(DCM< T > &dcm_f1_f2) const
Function to convert current attitude to DCM.
Definition Euler321.hpp:138
int rate(const CartesianVector< T, 3 > &omega_f1_f2__f1, Matrix< T, 3, 1 > &eulerdot_f1_f2) const
Function to calculate the rate of change in the current representation based on the omega vector.
Definition Euler321.hpp:123
Matrix math implementation.
Definition Matrix.hpp:54
#define NO_ERROR
Definition clockwerkerrors.h:31