summaryrefslogtreecommitdiffhomepage
path: root/compat/euler.hpp
blob: 147f4c5031bf80742bd0bff43a9f06e9e67c9c9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include "export.hpp"
#include "simple-mat.hpp"

namespace euler {

template<int h_, int w_> using dmat = Mat<double, h_, w_>;

using dvec2 = Mat<double, 2, 1>;
using dvec3 = Mat<double, 3, 1>;

using rmat = dmat<3, 3>;
using euler_t = dmat<3, 1>;

rmat OTR_COMPAT_EXPORT euler_to_rmat(const euler_t& input);

euler_t OTR_COMPAT_EXPORT rmat_to_euler(const rmat& R);

void OTR_COMPAT_EXPORT tait_bryan_to_matrices(const euler_t& input,
                                                   rmat& r_roll,
                                                   rmat& r_pitch,
                                                   rmat& r_yaw);

rmat OTR_COMPAT_EXPORT quaternion_to_mat(const dmat<1, 4>& q);
//rmat OTR_COMPAT_EXPORT quaternion_to_mat(const dmat<4, 1>& q);

} // end ns euler