PX4 Firmware
PX4 Autopilot Software http://px4.io
hatvee.cpp
Go to the documentation of this file.
1 #include "test_macros.hpp"
2 #include <matrix/math.hpp>
3 
4 using namespace matrix;
5 
6 int main()
7 {
8  Euler<float> euler(0.1f, 0.2f, 0.3f);
9  Dcm<float> R(euler);
10  Dcm<float> skew = R - R.T();
11  Vector3<float> w = skew.vee();
12  Vector3<float> w_check(0.1348f, 0.4170f, 0.5647f);
13 
14  TEST(isEqual(w, w_check));
15  TEST(isEqual(skew, w.hat()));
16  return 0;
17 }
18 
19 /* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */
Matrix< Type, N, M > T() const
Definition: Matrix.hpp:368
int main()
Definition: hatvee.cpp:6
Vector< Type, 3 > vee() const
Definition: Dcm.hpp:165
bool isEqual(const Matrix< Type, M, N > &x, const Matrix< Type, M, N > &y, const Type eps=1e-4f)
Definition: Matrix.hpp:571
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
Definition: integration.cpp:8
Euler angles class.
Definition: AxisAngle.hpp:18
#define TEST(X)
Definition: test_macros.hpp:14
Dcm< Type > hat() const
Definition: Vector3.hpp:119