|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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) | |
| #define | ORREP_EULER_I 1 |
| zyx Euler (BFP int) | |
| #define | ORREP_RMAT_I 2 |
| Rotation Matrix (BFP int) | |
| #define | ORREP_QUAT_F 3 |
| Quaternion (float) | |
| #define | ORREP_EULER_F 4 |
| zyx Euler (float) | |
| #define | ORREP_RMAT_F 5 |
| Rotation Matrix (float) | |
| #define | ORREP_EULER_ZXY_F 6 |
| zxy Euler (float) | |
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) |
| void | orientationCalcEulersZxy_f (struct OrientationReps *orientation) |
| static bool | orienationCheckValid (struct OrientationReps *orientation) |
| Test if orientations are valid. | |
| static void | orientationSetIdentity (struct OrientationReps *orientation) |
| Set to identity orientation. | |
| static void | orientationSetQuat_i (struct OrientationReps *orientation, struct Int32Quat *quat) |
| Set vehicle body attitude from quaternion (int). | |
| static void | orientationSetRMat_i (struct OrientationReps *orientation, struct Int32RMat *rmat) |
| Set vehicle body attitude from rotation matrix (int). | |
| static void | orientationSetEulers_i (struct OrientationReps *orientation, struct Int32Eulers *eulers) |
| Set vehicle body attitude from euler angles (int). | |
| static void | orientationSetQuat_f (struct OrientationReps *orientation, struct FloatQuat *quat) |
| Set vehicle body attitude from quaternion (float). | |
| static void | orientationSetRMat_f (struct OrientationReps *orientation, struct FloatRMat *rmat) |
| Set vehicle body attitude from rotation matrix (float). | |
| 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 struct Int32RMat * | orientationGetRMat_i (struct OrientationReps *orientation) |
| Get vehicle body attitude rotation matrix (int). | |
| static struct Int32Eulers * | orientationGetEulers_i (struct OrientationReps *orientation) |
| Get vehicle body attitude euler angles (int). | |
| static struct FloatQuat * | orientationGetQuat_f (struct OrientationReps *orientation) |
| Get vehicle body attitude quaternion (float). | |
| static struct FloatRMat * | orientationGetRMat_f (struct OrientationReps *orientation) |
| Get vehicle body attitude rotation matrix (float). | |
| static struct FloatEulers * | orientationGetEulers_f (struct OrientationReps *orientation) |
| Get vehicle body attitude euler angles (float). | |
| static struct FloatEulers * | orientationGetEulersZxy_f (struct OrientationReps *orientation) |
| Get orientation as ZXY euler angles (float). | |
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.
| struct OrientationReps |
Definition at line 80 of file pprz_orientation_conversion.h.
Collaboration diagram for OrientationReps:| Data Fields | ||
|---|---|---|
| struct FloatEulers | eulers_f |
Orienation in zyx euler angles. Units: rad |
| struct Int32Eulers | eulers_i |
Orientation in zyx euler angles. Units: rad in BFP with INT32_ANGLE_FRAC |
| struct FloatEulers | eulers_zxy_f |
Orientation in zxy euler angles. Units: rad |
| struct FloatQuat | quat_f |
Orientation as quaternion. Units: unit length quaternion |
| struct Int32Quat | quat_i |
Orientation quaternion. Units: INT32_QUAT_FRAC |
| struct FloatRMat | rmat_f |
Orientation rotation matrix. Units: rad |
| struct Int32RMat | rmat_i |
Orientation rotation matrix. Units: rad in BFP with INT32_TRIG_FRAC |
| uint8_t | status |
Holds the status bits for all orientation representations. When the corresponding bit is set, the representation is already computed. |
| #define ORREP_EULER_F 4 |
zyx Euler (float)
Definition at line 73 of file pprz_orientation_conversion.h.
| #define ORREP_EULER_I 1 |
zyx Euler (BFP int)
Definition at line 70 of file pprz_orientation_conversion.h.
| #define ORREP_EULER_ZXY_F 6 |
zxy Euler (float)
Definition at line 75 of file pprz_orientation_conversion.h.
| #define ORREP_QUAT_F 3 |
Quaternion (float)
Definition at line 72 of file pprz_orientation_conversion.h.
| #define ORREP_QUAT_I 0 |
Quaternion (BFP int)
Definition at line 69 of file pprz_orientation_conversion.h.
| #define ORREP_RMAT_F 5 |
Rotation Matrix (float)
Definition at line 74 of file pprz_orientation_conversion.h.
| #define ORREP_RMAT_I 2 |
Rotation Matrix (BFP int)
Definition at line 71 of file pprz_orientation_conversion.h.
|
inlinestatic |
Test if orientations are valid.
Definition at line 143 of file pprz_orientation_conversion.h.
References OrientationReps::status.
Referenced by stateIsAttitudeValid().
Here is the caller graph for this function:| void orientationCalcEulers_f | ( | struct OrientationReps * | orientation | ) |
Definition at line 173 of file pprz_orientation_conversion.c.
References OrientationReps::eulers_f, EULERS_FLOAT_OF_BFP, OrientationReps::eulers_i, float_eulers_of_quat(), float_eulers_of_rmat(), foo, ORREP_EULER_F, ORREP_EULER_I, ORREP_QUAT_F, ORREP_QUAT_I, ORREP_RMAT_F, ORREP_RMAT_I, OrientationReps::quat_f, QUAT_FLOAT_OF_BFP, OrientationReps::quat_i, OrientationReps::rmat_f, RMAT_FLOAT_OF_BFP, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by orientationGetEulers_f().
Here is the call graph for this function:
Here is the caller graph for this function:| void orientationCalcEulers_i | ( | struct OrientationReps * | orientation | ) |
Definition at line 98 of file pprz_orientation_conversion.c.
References EULERS_BFP_OF_REAL, OrientationReps::eulers_f, OrientationReps::eulers_i, foo, int32_eulers_of_quat(), int32_eulers_of_rmat(), ORREP_EULER_F, ORREP_EULER_I, ORREP_QUAT_F, ORREP_QUAT_I, ORREP_RMAT_F, ORREP_RMAT_I, QUAT_BFP_OF_REAL, OrientationReps::quat_f, OrientationReps::quat_i, RMAT_BFP_OF_REAL, OrientationReps::rmat_f, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by orientationGetEulers_i().
Here is the call graph for this function:
Here is the caller graph for this function:| void orientationCalcEulersZxy_f | ( | struct OrientationReps * | orientation | ) |
Definition at line 198 of file pprz_orientation_conversion.c.
References OrientationReps::eulers_zxy_f, float_eulers_of_quat_zxy(), foo, orientationCalcQuat_f(), ORREP_EULER_ZXY_F, ORREP_QUAT_F, OrientationReps::quat_f, and OrientationReps::status.
Referenced by orientationGetEulersZxy_f().
Here is the call graph for this function:
Here is the caller graph for this function:| void orientationCalcQuat_f | ( | struct OrientationReps * | orientation | ) |
Definition at line 123 of file pprz_orientation_conversion.c.
References OrientationReps::eulers_f, EULERS_FLOAT_OF_BFP, OrientationReps::eulers_i, float_quat_of_eulers(), float_quat_of_rmat(), foo, ORREP_EULER_F, ORREP_EULER_I, ORREP_QUAT_F, ORREP_QUAT_I, ORREP_RMAT_F, ORREP_RMAT_I, OrientationReps::quat_f, QUAT_FLOAT_OF_BFP, OrientationReps::quat_i, OrientationReps::rmat_f, RMAT_FLOAT_OF_BFP, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by orientationCalcEulersZxy_f(), and orientationGetQuat_f().
Here is the call graph for this function:
Here is the caller graph for this function:| void orientationCalcQuat_i | ( | struct OrientationReps * | orientation | ) |
Definition at line 48 of file pprz_orientation_conversion.c.
References EULERS_BFP_OF_REAL, OrientationReps::eulers_f, OrientationReps::eulers_i, foo, int32_quat_of_eulers(), int32_quat_of_rmat(), ORREP_EULER_F, ORREP_EULER_I, ORREP_QUAT_F, ORREP_QUAT_I, ORREP_RMAT_F, ORREP_RMAT_I, QUAT_BFP_OF_REAL, OrientationReps::quat_f, OrientationReps::quat_i, RMAT_BFP_OF_REAL, OrientationReps::rmat_f, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by orientationGetQuat_i().
Here is the call graph for this function:
Here is the caller graph for this function:| void orientationCalcRMat_f | ( | struct OrientationReps * | orientation | ) |
Definition at line 148 of file pprz_orientation_conversion.c.
References OrientationReps::eulers_f, EULERS_FLOAT_OF_BFP, OrientationReps::eulers_i, float_rmat_of_eulers, float_rmat_of_quat(), foo, ORREP_EULER_F, ORREP_EULER_I, ORREP_QUAT_F, ORREP_QUAT_I, ORREP_RMAT_F, ORREP_RMAT_I, OrientationReps::quat_f, QUAT_FLOAT_OF_BFP, OrientationReps::quat_i, OrientationReps::rmat_f, RMAT_FLOAT_OF_BFP, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by orientationGetRMat_f().
Here is the call graph for this function:
Here is the caller graph for this function:| void orientationCalcRMat_i | ( | struct OrientationReps * | orientation | ) |
Definition at line 73 of file pprz_orientation_conversion.c.
References EULERS_BFP_OF_REAL, OrientationReps::eulers_f, OrientationReps::eulers_i, foo, int32_rmat_of_eulers, int32_rmat_of_quat(), ORREP_EULER_F, ORREP_EULER_I, ORREP_QUAT_F, ORREP_QUAT_I, ORREP_RMAT_F, ORREP_RMAT_I, QUAT_BFP_OF_REAL, OrientationReps::quat_f, OrientationReps::quat_i, RMAT_BFP_OF_REAL, OrientationReps::rmat_f, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by orientationGetRMat_i().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get vehicle body attitude euler angles (float).
Definition at line 251 of file pprz_orientation_conversion.h.
References OrientationReps::eulers_f, foo, orientationCalcEulers_f(), ORREP_EULER_F, and OrientationReps::status.
Referenced by imu_SetBodyToImuCurrent(), imu_SetBodyToImuPhi(), imu_SetBodyToImuPsi(), imu_SetBodyToImuTheta(), set_body_state_from_quat(), and stateGetNedToBodyEulers_f().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get vehicle body attitude euler angles (int).
Definition at line 224 of file pprz_orientation_conversion.h.
References OrientationReps::eulers_i, foo, 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:
|
inlinestatic |
Get orientation as ZXY euler angles (float).
Definition at line 260 of file pprz_orientation_conversion.h.
References OrientationReps::eulers_zxy_f, foo, orientationCalcEulersZxy_f(), ORREP_EULER_ZXY_F, and OrientationReps::status.
Referenced by stateGetNedToBodyEulersZxy_f().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get vehicle body attitude quaternion (float).
Definition at line 233 of file pprz_orientation_conversion.h.
References foo, orientationCalcQuat_f(), ORREP_QUAT_F, OrientationReps::quat_f, and OrientationReps::status.
Referenced by send_windtunnel_meas(), and stateGetNedToBodyQuat_f().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get vehicle body attitude quaternion (int).
Definition at line 206 of file pprz_orientation_conversion.h.
References foo, orientationCalcQuat_i(), ORREP_QUAT_I, OrientationReps::quat_i, and OrientationReps::status.
Referenced by set_body_state_from_quat(), and stateGetNedToBodyQuat_i().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get vehicle body attitude rotation matrix (float).
Definition at line 242 of file pprz_orientation_conversion.h.
References foo, orientationCalcRMat_f(), ORREP_RMAT_F, OrientationReps::rmat_f, and OrientationReps::status.
Referenced by ahrs_vectornav_propagate(), ins_vectornav_propagate(), and stateGetNedToBodyRMat_f().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Get vehicle body attitude rotation matrix (int).
Definition at line 215 of file pprz_orientation_conversion.h.
References foo, orientationCalcRMat_i(), ORREP_RMAT_I, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by imu_bebop_event(), imu_init(), imu_set_body_to_imu_eulers(), imu_set_defaults_accel(), imu_set_defaults_gyro(), imu_set_defaults_mag(), mag_pitot_parse_msg(), and stateGetNedToBodyRMat_i().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Set vehicle body attitude from euler angles (float).
Definition at line 197 of file pprz_orientation_conversion.h.
References EULERS_COPY, OrientationReps::eulers_f, ORREP_EULER_F, and OrientationReps::status.
Referenced by ctrl_windtunnel_init(), imu_bebop_init(), imu_init(), imu_set_body_to_imu_eulers(), ins_vectornav_init(), mag_pitot_init(), and stateSetNedToBodyEulers_f().
Here is the caller graph for this function:
|
inlinestatic |
Set vehicle body attitude from euler angles (int).
Definition at line 173 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:
|
inlinestatic |
Set to identity orientation.
Definition at line 149 of file pprz_orientation_conversion.h.
References int32_quat_identity(), ORREP_QUAT_I, OrientationReps::quat_i, and OrientationReps::status.
Here is the call graph for this function:
|
inlinestatic |
Set vehicle body attitude from quaternion (float).
Definition at line 181 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:
|
inlinestatic |
Set vehicle body attitude from quaternion (int).
Definition at line 157 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:
|
inlinestatic |
Set vehicle body attitude from rotation matrix (float).
Definition at line 189 of file pprz_orientation_conversion.h.
References foo, ORREP_RMAT_F, RMAT_COPY, OrientationReps::rmat_f, and OrientationReps::status.
Referenced by stateSetNedToBodyRMat_f().
Here is the caller graph for this function:
|
inlinestatic |
Set vehicle body attitude from rotation matrix (int).
Definition at line 165 of file pprz_orientation_conversion.h.
References foo, ORREP_RMAT_I, RMAT_COPY, OrientationReps::rmat_i, and OrientationReps::status.
Referenced by stateSetNedToBodyRMat_i().
Here is the caller graph for this function: