Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Generic Orientation Representations

This generic orientation representation consists of a struct, containing the 6 orientation representations, and a status variable. More...

+ Collaboration diagram for Generic Orientation Representations:

Data Structures

struct  OrientationReps
 

Macros

#define ORREP_QUAT_I   0
 Quaternion (BFP int) More...
 
#define ORREP_EULER_I   1
 zyx Euler (BFP int) More...
 
#define ORREP_RMAT_I   2
 Rotation Matrix (BFP int) More...
 
#define ORREP_QUAT_F   3
 Quaternion (float) More...
 
#define ORREP_EULER_F   4
 zyx Euler (float) More...
 
#define ORREP_RMAT_F   5
 Rotation Matrix (float) More...
 

Functions

void orientationCalcQuat_i (struct OrientationReps *orientation)
 
void orientationCalcRMat_i (struct OrientationReps *orientation)
 
void orientationCalcEulers_i (struct OrientationReps *orientation)
 
void orientationCalcQuat_f (struct OrientationReps *orientation)
 
void orientationCalcRMat_f (struct OrientationReps *orientation)
 
void orientationCalcEulers_f (struct OrientationReps *orientation)
 
static bool_t orienationCheckValid (struct OrientationReps *orientation)
 Test if orientations are valid. More...
 
static void orientationSetQuat_i (struct OrientationReps *orientation, struct Int32Quat *quat)
 Set vehicle body attitude from quaternion (int). More...
 
static void orientationSetRMat_i (struct OrientationReps *orientation, struct Int32RMat *rmat)
 Set vehicle body attitude from rotation matrix (int). More...
 
static void orientationSetEulers_i (struct OrientationReps *orientation, struct Int32Eulers *eulers)
 Set vehicle body attitude from euler angles (int). More...
 
static void orientationSetQuat_f (struct OrientationReps *orientation, struct FloatQuat *quat)
 Set vehicle body attitude from quaternion (float). More...
 
static void orientationSetRMat_f (struct OrientationReps *orientation, struct FloatRMat *rmat)
 Set vehicle body attitude from rotation matrix (float). More...
 
static void orientationSetEulers_f (struct OrientationReps *orientation, struct FloatEulers *eulers)
 Set vehicle body attitude from euler angles (float). More...
 
static struct Int32QuatorientationGetQuat_i (struct OrientationReps *orientation)
 Get vehicle body attitude quaternion (int). More...
 
static struct Int32RMatorientationGetRMat_i (struct OrientationReps *orientation)
 Get vehicle body attitude rotation matrix (int). More...
 
static struct Int32EulersorientationGetEulers_i (struct OrientationReps *orientation)
 Get vehicle body attitude euler angles (int). More...
 
static struct FloatQuatorientationGetQuat_f (struct OrientationReps *orientation)
 Get vehicle body attitude quaternion (float). More...
 
static struct FloatRMatorientationGetRMat_f (struct OrientationReps *orientation)
 Get vehicle body attitude rotation matrix (float). More...
 
static struct FloatEulersorientationGetEulers_f (struct OrientationReps *orientation)
 Get vehicle body attitude euler angles (float). More...
 

Detailed Description

This generic orientation representation consists of a struct, containing the 6 orientation representations, and a status variable.

The bits in the status variable indicate which representations of the orientation are up-to-date.

When a getter is used to get a certain representation, the status bit is checked to see if the current value is already available in the desired orientation representation. If the desired representation is not available, it will be calculated.

When a setter is used to set a representation, all status bits are cleared, and only the status bit for the set representation is set to one.

Macro Definition Documentation

Function Documentation

static bool_t orienationCheckValid ( struct OrientationReps orientation)
inlinestatic

Test if orientations are valid.

Definition at line 132 of file pprz_orientation_conversion.h.

References OrientationReps::status.

Referenced by stateIsAttitudeValid().

+ Here is the caller graph for this function:

static struct FloatEulers* orientationGetEulers_f ( struct OrientationReps orientation)
static

Get vehicle body attitude euler angles (float).

Definition at line 215 of file pprz_orientation_conversion.h.

References OrientationReps::eulers_f, orientationCalcEulers_f(), ORREP_EULER_F, and OrientationReps::status.

Referenced by stateGetNedToBodyEulers_f().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct Int32Eulers* orientationGetEulers_i ( struct OrientationReps orientation)
static

Get vehicle body attitude euler angles (int).

Definition at line 194 of file pprz_orientation_conversion.h.

References OrientationReps::eulers_i, orientationCalcEulers_i(), ORREP_EULER_I, and OrientationReps::status.

Referenced by stateGetNedToBodyEulers_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct FloatQuat* orientationGetQuat_f ( struct OrientationReps orientation)
static

Get vehicle body attitude quaternion (float).

Definition at line 201 of file pprz_orientation_conversion.h.

References orientationCalcQuat_f(), ORREP_QUAT_F, OrientationReps::quat_f, and OrientationReps::status.

Referenced by stateGetNedToBodyQuat_f().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct Int32Quat* orientationGetQuat_i ( struct OrientationReps orientation)
static

Get vehicle body attitude quaternion (int).

Definition at line 180 of file pprz_orientation_conversion.h.

References orientationCalcQuat_i(), ORREP_QUAT_I, OrientationReps::quat_i, and OrientationReps::status.

Referenced by stateGetNedToBodyQuat_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct FloatRMat* orientationGetRMat_f ( struct OrientationReps orientation)
static

Get vehicle body attitude rotation matrix (float).

Definition at line 208 of file pprz_orientation_conversion.h.

References orientationCalcRMat_f(), ORREP_RMAT_F, OrientationReps::rmat_f, and OrientationReps::status.

Referenced by stateGetNedToBodyRMat_f().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct Int32RMat* orientationGetRMat_i ( struct OrientationReps orientation)
static

Get vehicle body attitude rotation matrix (int).

Definition at line 187 of file pprz_orientation_conversion.h.

References orientationCalcRMat_i(), ORREP_RMAT_I, OrientationReps::rmat_i, and OrientationReps::status.

Referenced by stateGetNedToBodyRMat_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void orientationSetEulers_f ( struct OrientationReps orientation,
struct FloatEulers eulers 
)
inlinestatic

Set vehicle body attitude from euler angles (float).

Definition at line 172 of file pprz_orientation_conversion.h.

References EULERS_COPY, OrientationReps::eulers_f, ORREP_EULER_F, and OrientationReps::status.

Referenced by stateSetNedToBodyEulers_f().

+ Here is the caller graph for this function:

static void orientationSetEulers_i ( struct OrientationReps orientation,
struct Int32Eulers eulers 
)
inlinestatic

Set vehicle body attitude from euler angles (int).

Definition at line 151 of file pprz_orientation_conversion.h.

References EULERS_COPY, OrientationReps::eulers_i, ORREP_EULER_I, and OrientationReps::status.

Referenced by stateSetNedToBodyEulers_i().

+ Here is the caller graph for this function:

static void orientationSetQuat_f ( struct OrientationReps orientation,
struct FloatQuat quat 
)
inlinestatic

Set vehicle body attitude from quaternion (float).

Definition at line 158 of file pprz_orientation_conversion.h.

References ORREP_QUAT_F, QUAT_COPY, OrientationReps::quat_f, and OrientationReps::status.

Referenced by stateSetNedToBodyQuat_f().

+ Here is the caller graph for this function:

static void orientationSetQuat_i ( struct OrientationReps orientation,
struct Int32Quat quat 
)
inlinestatic

Set vehicle body attitude from quaternion (int).

Definition at line 137 of file pprz_orientation_conversion.h.

References ORREP_QUAT_I, QUAT_COPY, OrientationReps::quat_i, and OrientationReps::status.

Referenced by stateSetNedToBodyQuat_i().

+ Here is the caller graph for this function:

static void orientationSetRMat_f ( struct OrientationReps orientation,
struct FloatRMat rmat 
)
inlinestatic

Set vehicle body attitude from rotation matrix (float).

Definition at line 165 of file pprz_orientation_conversion.h.

References ORREP_RMAT_F, RMAT_COPY, OrientationReps::rmat_f, and OrientationReps::status.

Referenced by stateSetNedToBodyRMat_f().

+ Here is the caller graph for this function:

static void orientationSetRMat_i ( struct OrientationReps orientation,
struct Int32RMat rmat 
)
inlinestatic

Set vehicle body attitude from rotation matrix (int).

Definition at line 144 of file pprz_orientation_conversion.h.

References ORREP_RMAT_I, RMAT_COPY, OrientationReps::rmat_i, and OrientationReps::status.

Referenced by stateSetNedToBodyRMat_i().

+ Here is the caller graph for this function: