Flair
Framework Libre Air
Euler.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef EULER_H
14 #define EULER_H
15 
16 namespace flair {
17 namespace core {
18 class Quaternion;
19 
27 class Euler {
28 public:
38  Euler(float roll = 0, float pitch = 0, float yaw = 0);
39 
44  ~Euler();
45 
51  // todo: passer par un quaternion
52  // void RotateX(float value);
53 
59  // void RotateXDeg(float value);
60 
66  // void RotateY(float value);
67 
73  // void RotateYDeg(float value);
74 
80  // void RotateZ(float value);
81 
87  // void RotateZDeg(float value);
88 
94  void ToQuaternion(Quaternion &quaternion) const;
95 
101  Quaternion ToQuaternion(void) const;
109  static float ToDegree(float radianValue);
110 
118  static float ToRadian(float degreeValue);
119 
129  float YawDistanceFrom(float angle) const;
130 
134  float roll;
135 
139  float pitch;
140 
144  float yaw;
145 
146  Euler &operator=(const Euler &euler);
147 };
148 
149 } // end namespace core
150 } // end namespace flair
151 
152 #endif // EULER_H
namespace of the flair Framework
Definition: Ahrs.h:19
Class defining euler angles.
Definition: Euler.h:27
float pitch
pitch value
Definition: Euler.h:139
float yaw
yaw value
Definition: Euler.h:144
Euler(float roll=0, float pitch=0, float yaw=0)
Constructor.
static float ToRadian(float degreeValue)
Convert from degree to radian.
~Euler()
Destructor.
float roll
roll value
Definition: Euler.h:134
Quaternion ToQuaternion(void) const
Convert to quaternion.
static float ToDegree(float radianValue)
Convert from radian to degree.
Class defining a quaternion.
Definition: Quaternion.h:26
float YawDistanceFrom(float angle) const
Compute yaw distance.