Sensor Scol plugin
Multi platform sensors for handled devices
SO3Util.h
1//
2// SO3Util.h
3//
4
5#ifndef __So3Util__
6#define __So3Util__
7
8#include "Vector3d.h"
9#include "Quaternion.h"
10#include "Matrix3x3d.h"
11#include <math.h>
12
13// SO3 = matrice de rotation
14#ifndef M_PI
15#define M_PI 3.14159265358979323846
16#endif
17
18#define EARTH_GRAVITY (9.81f)
19
20static const double DEG_TO_RAD = M_PI / 180.0;
21static const double RAD_TO_DEG = 180.0 / M_PI;
22
24{
25 public:
26 static void sO3FromTwoVec(Vector3d a, Vector3d b, Matrix3x3d &result);
27 static void rotationPiAboutAxis(Vector3d v, Matrix3x3d &result);
28 static void sO3FromMu(Vector3d w, Matrix3x3d &result);
29 static void muFromSO3(Matrix3x3d so3, Vector3d &result);
30 static void rodriguesSo3Exp(Vector3d w, double kA, double kB, Matrix3x3d &result);
31 static void generatorField(int i, Matrix3x3d pos, Matrix3x3d &result);
32};
33
34#endif