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;
static void orientationSetQuat_f(struct OrientationReps *orientation, struct FloatQuat *quat)
Set vehicle body attitude from quaternion (float).
static struct Int32RMat * orientationGetRMat_i(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (int).
static void orientationSetIdentity(struct OrientationReps *orientation)
Set to identity orientation.
#define ORREP_EULER_F
zyx Euler (float)
static struct Int32Eulers * orientationGetEulers_i(struct OrientationReps *orientation)
Get vehicle body attitude euler angles (int).
struct FloatRMat rmat_f
Orientation rotation matrix.
static struct FloatRMat * orientationGetRMat_f(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (float).
struct FloatQuat quat_f
Orientation as quaternion.
static bool orienationCheckValid(struct OrientationReps *orientation)
Test if orientations are valid.
void orientationCalcQuat_i(struct OrientationReps *orientation)
#define RMAT_COPY(_o, _i)
struct FloatEulers eulers_f
Orienation in zyx euler angles.
void orientationCalcRMat_f(struct OrientationReps *orientation)
static void orientationSetQuat_i(struct OrientationReps *orientation, struct Int32Quat *quat)
Set vehicle body attitude from quaternion (int).
struct Int32Quat quat_i
Orientation quaternion.
#define QUAT_COPY(_qo, _qi)
#define ORREP_QUAT_F
Quaternion (float)
static void orientationSetEulers_i(struct OrientationReps *orientation, struct Int32Eulers *eulers)
Set vehicle body attitude from euler angles (int).
#define ORREP_QUAT_I
Quaternion (BFP int)
#define ORREP_EULER_I
zyx Euler (BFP int)
Paparazzi floating point algebra.
static void orientationSetRMat_i(struct OrientationReps *orientation, struct Int32RMat *rmat)
Set vehicle body attitude from rotation matrix (int).
#define ORREP_RMAT_F
Rotation Matrix (float)
struct Int32RMat rmat_i
Orientation rotation matrix.
void orientationCalcEulers_i(struct OrientationReps *orientation)
static void int32_quat_identity(struct Int32Quat *q)
initialises a quaternion to identity
uint8_t status
Holds the status bits for all orientation representations.
static struct Int32Quat * orientationGetQuat_i(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (int).
void orientationCalcQuat_f(struct OrientationReps *orientation)
static struct FloatEulers * orientationGetEulers_f(struct OrientationReps *orientation)
Get vehicle body attitude euler angles (float).
#define ORREP_RMAT_I
Rotation Matrix (BFP int)
void orientationCalcRMat_i(struct OrientationReps *orientation)
#define EULERS_COPY(_a, _b)
static void orientationSetRMat_f(struct OrientationReps *orientation, struct FloatRMat *rmat)
Set vehicle body attitude from rotation matrix (float).
struct Int32Eulers eulers_i
Orientation in zyx euler angles.
void orientationCalcEulers_f(struct OrientationReps *orientation)
static struct FloatQuat * orientationGetQuat_f(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (float).
Paparazzi fixed point algebra.
static void orientationSetEulers_f(struct OrientationReps *orientation, struct FloatEulers *eulers)
Set vehicle body attitude from euler angles (float).