56 #ifndef PPRZ_ORIENTATION_CONVERSION_H
57 #define PPRZ_ORIENTATION_CONVERSION_H
69 #define ORREP_QUAT_I 0
70 #define ORREP_EULER_I 1
71 #define ORREP_RMAT_I 2
72 #define ORREP_QUAT_F 3
73 #define ORREP_EULER_F 4
74 #define ORREP_RMAT_F 5
137 return (orientation->
status);
203 return &orientation->
quat_i;
212 return &orientation->
rmat_i;
230 return &orientation->
quat_f;
239 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 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).
#define ORREP_QUAT_I
Quaternion (BFP int)
static struct FloatQuat * orientationGetQuat_f(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (float).
#define ORREP_EULER_I
zyx Euler (BFP int)
static struct Int32RMat * orientationGetRMat_i(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (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 Int32Quat * orientationGetQuat_i(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (int).
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_QUAT_F
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 FloatEulers * orientationGetEulers_f(struct OrientationReps *orientation)
Get vehicle body attitude euler angles (float).
static void orientationSetRMat_i(struct OrientationReps *orientation, struct Int32RMat *rmat)
Set vehicle body attitude from rotation matrix (int).
static struct FloatRMat * orientationGetRMat_f(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (float).
static struct Int32Eulers * orientationGetEulers_i(struct OrientationReps *orientation)
Get vehicle body attitude euler angles (int).
#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.