Arduino Filters master
Filter library for Arduino
Public Member Functions | Static Public Member Functions | Public Attributes | Related Functions | List of all members
EulerAngles Struct Reference

#include <AH/Math/Quaternion.hpp>

Detailed Description

Struct for Euler angles of floating point numbers.

EulerAngles provides the conversions between Euler angles and quaternions. It also has an implementation of the following operators:

Definition at line 291 of file Quaternion.hpp.

+ Collaboration diagram for EulerAngles:

Public Member Functions

 EulerAngles ()=default
 Create Euler angles that are initialized to (0 0 0), or upright. More...
 
 EulerAngles (float yaw, float pitch, float roll)
 Create Euler angles with the given values for yaw, pitch and roll. More...
 
 EulerAngles (Quaternion q)
 Create Euler angles from the given quaternion. More...
 
 operator Quaternion () const
 Implicitly convert these Euler angles to a quaternion. More...
 
bool operator== (EulerAngles rhs) const
 Equality check. More...
 
bool operator!= (EulerAngles rhs) const
 Inequality check. More...
 

Static Public Member Functions

static EulerAngles quat2eul (Quaternion q)
 Convert the given quaternion to Euler angles. More...
 
static Quaternion eul2quat (EulerAngles eulerAngles)
 Convert the given Euler angles to a quaternion. More...
 

Public Attributes

float yaw = 0.0
 Z : drone Z = world +Z. More...
 
float pitch = 0.0
 Y': drone Y = world -X. More...
 
float roll = 0.0
 X": drone X = world +Y. More...
 

Related Functions

(Note that these are not member functions.)

Print & operator<< (Print &os, EulerAngles e)
 Printing. More...
 

Constructor & Destructor Documentation

◆ EulerAngles() [1/3]

EulerAngles ( )
default

Create Euler angles that are initialized to (0 0 0), or upright.

◆ EulerAngles() [2/3]

EulerAngles ( float  yaw,
float  pitch,
float  roll 
)
inline

Create Euler angles with the given values for yaw, pitch and roll.

Definition at line 299 of file Quaternion.hpp.

◆ EulerAngles() [3/3]

EulerAngles ( Quaternion  q)
inline

Create Euler angles from the given quaternion.

Definition at line 302 of file Quaternion.hpp.

Member Function Documentation

◆ operator Quaternion()

operator Quaternion ( ) const
inline

Implicitly convert these Euler angles to a quaternion.

Definition at line 305 of file Quaternion.hpp.

◆ operator==()

bool operator== ( EulerAngles  rhs) const
inline

Equality check.

Definition at line 308 of file Quaternion.hpp.

◆ operator!=()

bool operator!= ( EulerAngles  rhs) const
inline

Inequality check.

Definition at line 313 of file Quaternion.hpp.

◆ quat2eul()

static EulerAngles quat2eul ( Quaternion  q)
inlinestatic

Convert the given quaternion to Euler angles.

Definition at line 316 of file Quaternion.hpp.

◆ eul2quat()

static Quaternion eul2quat ( EulerAngles  eulerAngles)
inlinestatic

Convert the given Euler angles to a quaternion.

Definition at line 331 of file Quaternion.hpp.

Member Data Documentation

◆ yaw

float yaw = 0.0

Z : drone Z = world +Z.

Definition at line 292 of file Quaternion.hpp.

◆ pitch

float pitch = 0.0

Y': drone Y = world -X.

Definition at line 293 of file Quaternion.hpp.

◆ roll

float roll = 0.0

X": drone X = world +Y.

Definition at line 294 of file Quaternion.hpp.


The documentation for this struct was generated from the following file: