56#ifndef PPRZ_ORIENTATION_CONVERSION_H
57#define PPRZ_ORIENTATION_CONVERSION_H
70#define ORREP_EULER_I 1
73#define ORREP_EULER_F 4
75#define ORREP_EULER_ZXY_F 6
145 return (orientation->
status);
211 return &orientation->
quat_i;
220 return &orientation->
rmat_i;
238 return &orientation->
quat_f;
247 return &orientation->
rmat_f;
#define EULERS_COPY(_a, _b)
#define RMAT_COPY(_o, _i)
#define QUAT_COPY(_qo, _qi)
static void int32_quat_identity(struct Int32Quat *q)
initialises a quaternion to identity
struct FloatEulers eulers_f
Orienation in zyx euler angles.
struct Int32Quat quat_i
Orientation quaternion.
uint8_t status
Holds the status bits for all orientation representations.
struct FloatRMat rmat_f
Orientation rotation matrix.
struct Int32RMat rmat_i
Orientation rotation matrix.
struct FloatEulers eulers_zxy_f
Orientation in zxy euler angles.
struct Int32Eulers eulers_i
Orientation in zyx euler angles.
struct FloatQuat quat_f
Orientation as quaternion.
static void orientationSetIdentity(struct OrientationReps *orientation)
Set to identity orientation.
static void orientationSetRMat_f(struct OrientationReps *orientation, struct FloatRMat *rmat)
Set vehicle body attitude from rotation matrix (float).
void orientationCalcRMat_f(struct OrientationReps *orientation)
void orientationCalcQuat_f(struct OrientationReps *orientation)
static void orientationSetQuat_f(struct OrientationReps *orientation, struct FloatQuat *quat)
Set vehicle body attitude from quaternion (float).
static struct Int32Eulers * orientationGetEulers_i(struct OrientationReps *orientation)
Get vehicle body attitude euler angles (int).
#define ORREP_QUAT_I
Quaternion (BFP int)
#define ORREP_EULER_I
zyx Euler (BFP int)
#define ORREP_EULER_F
zyx Euler (float)
static bool orienationCheckValid(struct OrientationReps *orientation)
Test if orientations are valid.
static void orientationSetEulers_f(struct OrientationReps *orientation, struct FloatEulers *eulers)
Set vehicle body attitude from euler angles (float).
static struct FloatRMat * orientationGetRMat_f(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (float).
static struct FloatEulers * orientationGetEulersZxy_f(struct OrientationReps *orientation)
Get orientation as ZXY euler angles (float).
void orientationCalcEulersZxy_f(struct OrientationReps *orientation)
static void orientationSetQuat_i(struct OrientationReps *orientation, struct Int32Quat *quat)
Set vehicle body attitude from quaternion (int).
void orientationCalcEulers_f(struct OrientationReps *orientation)
void orientationCalcRMat_i(struct OrientationReps *orientation)
#define ORREP_EULER_ZXY_F
zxy Euler (float)
#define ORREP_QUAT_F
Quaternion (float)
static struct FloatQuat * orientationGetQuat_f(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (float).
void orientationCalcEulers_i(struct OrientationReps *orientation)
void orientationCalcQuat_i(struct OrientationReps *orientation)
static void orientationSetEulers_i(struct OrientationReps *orientation, struct Int32Eulers *eulers)
Set vehicle body attitude from euler angles (int).
#define ORREP_RMAT_I
Rotation Matrix (BFP int)
static struct Int32Quat * orientationGetQuat_i(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (int).
static void orientationSetRMat_i(struct OrientationReps *orientation, struct Int32RMat *rmat)
Set vehicle body attitude from rotation matrix (int).
static struct Int32RMat * orientationGetRMat_i(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (int).
static struct FloatEulers * orientationGetEulers_f(struct OrientationReps *orientation)
Get vehicle body attitude euler angles (float).
#define ORREP_RMAT_F
Rotation Matrix (float)
Paparazzi floating point algebra.
Paparazzi fixed point algebra.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.