Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Rotorcraft attitude reference generation. More...
#include "generated/airframe.h"
#include "firmwares/rotorcraft/stabilization/stabilization_attitude_ref_quat_float.h"
#include "firmwares/rotorcraft/stabilization/stabilization_attitude_ref_defaults.h"
Go to the source code of this file.
Macros | |
#define | STABILIZATION_ATTITUDE_REF_QUAT_INFINITESIMAL_STEP TRUE |
default to fast but less precise quaternion integration More... | |
Functions | |
static void | reset_psi_ref (struct AttRefQuatFloat *ref, float psi) |
void | attitude_ref_quat_float_init (struct AttRefQuatFloat *ref) |
void | attitude_ref_quat_float_enter (struct AttRefQuatFloat *ref, float psi) |
void | attitude_ref_quat_float_update (struct AttRefQuatFloat *ref, struct FloatQuat *sp_quat, float dt) |
void | attitude_ref_quat_float_idx_set_omega_p (struct AttRefQuatFloat *ref, uint8_t idx, float omega) |
void | attitude_ref_quat_float_idx_set_omega_q (struct AttRefQuatFloat *ref, uint8_t idx, float omega) |
void | attitude_ref_quat_float_idx_set_omega_r (struct AttRefQuatFloat *ref, uint8_t idx, float omega) |
void | attitude_ref_quat_float_set_omega_p (struct AttRefQuatFloat *ref, float omega) |
void | attitude_ref_quat_float_set_omega_q (struct AttRefQuatFloat *ref, float omega) |
void | attitude_ref_quat_float_set_omega_r (struct AttRefQuatFloat *ref, float omega) |
void | attitude_ref_quat_float_schedule (struct AttRefQuatFloat *ref, uint8_t idx) |
Variables | |
static const float | omega_p [] = STABILIZATION_ATTITUDE_REF_OMEGA_P |
static const float | zeta_p [] = STABILIZATION_ATTITUDE_REF_ZETA_P |
static const float | omega_q [] = STABILIZATION_ATTITUDE_REF_OMEGA_Q |
static const float | zeta_q [] = STABILIZATION_ATTITUDE_REF_ZETA_Q |
static const float | omega_r [] = STABILIZATION_ATTITUDE_REF_OMEGA_R |
static const float | zeta_r [] = STABILIZATION_ATTITUDE_REF_ZETA_R |
Rotorcraft attitude reference generation.
(quaternion float version)
Definition in file stabilization_attitude_ref_quat_float.c.
#define STABILIZATION_ATTITUDE_REF_QUAT_INFINITESIMAL_STEP TRUE |
default to fast but less precise quaternion integration
Definition at line 37 of file stabilization_attitude_ref_quat_float.c.
void attitude_ref_quat_float_enter | ( | struct AttRefQuatFloat * | ref, |
float | psi | ||
) |
Definition at line 80 of file stabilization_attitude_ref_quat_float.c.
References reset_psi_ref().
Referenced by stabilization_attitude_enter().
void attitude_ref_quat_float_idx_set_omega_p | ( | struct AttRefQuatFloat * | ref, |
uint8_t | idx, | ||
float | omega | ||
) |
Definition at line 156 of file stabilization_attitude_ref_quat_float.c.
References idx, AttRefQuatFloat::model, FloatRefModel::omega, FloatRates::p, and FloatRefModel::two_omega2.
Referenced by attitude_ref_quat_float_set_omega_p().
void attitude_ref_quat_float_idx_set_omega_q | ( | struct AttRefQuatFloat * | ref, |
uint8_t | idx, | ||
float | omega | ||
) |
Definition at line 162 of file stabilization_attitude_ref_quat_float.c.
References idx, AttRefQuatFloat::model, FloatRefModel::omega, FloatRates::q, and FloatRefModel::two_omega2.
Referenced by attitude_ref_quat_float_set_omega_q().
void attitude_ref_quat_float_idx_set_omega_r | ( | struct AttRefQuatFloat * | ref, |
uint8_t | idx, | ||
float | omega | ||
) |
Definition at line 168 of file stabilization_attitude_ref_quat_float.c.
References idx, AttRefQuatFloat::model, FloatRefModel::omega, FloatRates::r, and FloatRefModel::two_omega2.
Referenced by attitude_ref_quat_float_set_omega_r().
void attitude_ref_quat_float_init | ( | struct AttRefQuatFloat * | ref | ) |
Definition at line 57 of file stabilization_attitude_ref_quat_float.c.
References AttRefQuatFloat::accel, AttRefQuatFloat::cur_idx, AttRefQuatFloat::euler, FLOAT_EULERS_ZERO, float_quat_identity(), FLOAT_RATES_ZERO, FloatRefSat::max_accel, FloatRefSat::max_rate, AttRefQuatFloat::model, FloatRefModel::omega, omega_p, omega_q, omega_r, FloatRates::p, FloatRates::q, AttRefQuatFloat::quat, FloatRates::r, AttRefQuatFloat::rate, RATES_ASSIGN, AttRefQuatFloat::saturation, STABILIZATION_ATTITUDE_GAIN_NB, STABILIZATION_ATTITUDE_REF_MAX_P, STABILIZATION_ATTITUDE_REF_MAX_PDOT, STABILIZATION_ATTITUDE_REF_MAX_Q, STABILIZATION_ATTITUDE_REF_MAX_QDOT, STABILIZATION_ATTITUDE_REF_MAX_R, STABILIZATION_ATTITUDE_REF_MAX_RDOT, FloatRefModel::two_omega2, FloatRefModel::zeta, zeta_p, zeta_q, and zeta_r.
Referenced by stabilization_attitude_init().
void attitude_ref_quat_float_schedule | ( | struct AttRefQuatFloat * | ref, |
uint8_t | idx | ||
) |
Definition at line 193 of file stabilization_attitude_ref_quat_float.c.
References AttRefQuatFloat::cur_idx, and idx.
Referenced by stabilization_attitude_gain_schedule(), and stabilization_attitude_init().
void attitude_ref_quat_float_set_omega_p | ( | struct AttRefQuatFloat * | ref, |
float | omega | ||
) |
Definition at line 174 of file stabilization_attitude_ref_quat_float.c.
References attitude_ref_quat_float_idx_set_omega_p(), and AttRefQuatFloat::cur_idx.
void attitude_ref_quat_float_set_omega_q | ( | struct AttRefQuatFloat * | ref, |
float | omega | ||
) |
Definition at line 179 of file stabilization_attitude_ref_quat_float.c.
References attitude_ref_quat_float_idx_set_omega_q(), and AttRefQuatFloat::cur_idx.
void attitude_ref_quat_float_set_omega_r | ( | struct AttRefQuatFloat * | ref, |
float | omega | ||
) |
Definition at line 184 of file stabilization_attitude_ref_quat_float.c.
References attitude_ref_quat_float_idx_set_omega_r(), and AttRefQuatFloat::cur_idx.
void attitude_ref_quat_float_update | ( | struct AttRefQuatFloat * | ref, |
struct FloatQuat * | sp_quat, | ||
float | dt | ||
) |
Definition at line 86 of file stabilization_attitude_ref_quat_float.c.
References AttRefQuatFloat::accel, attitude_ref_float_saturate_naive(), AttRefQuatFloat::cur_idx, AttRefQuatFloat::euler, float_eulers_of_quat(), float_quat_comp(), float_quat_derivative(), float_quat_differential(), float_quat_inv_comp(), float_quat_normalize(), float_quat_wrap_shortest(), AttRefQuatFloat::model, FloatRefModel::omega, FloatRates::p, FloatRates::q, AttRefQuatFloat::quat, QUAT_ADD, QUAT_COPY, QUAT_SMUL, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, FloatRates::r, AttRefQuatFloat::rate, RATES_ADD, RATES_SMUL, AttRefQuatFloat::saturation, FloatRefModel::two_omega2, and FloatRefModel::zeta.
Referenced by stabilization_attitude_run().
|
inlinestatic |
Definition at line 139 of file stabilization_attitude_ref_quat_float.c.
References AttRefQuatFloat::accel, AttRefQuatFloat::euler, float_quat_of_eulers(), float_quat_wrap_shortest(), FloatEulers::psi, AttRefQuatFloat::quat, FloatRates::r, and AttRefQuatFloat::rate.
Referenced by attitude_ref_quat_float_enter().
|
static |
Definition at line 42 of file stabilization_attitude_ref_quat_float.c.
Referenced by attitude_ref_quat_float_init(), and attitude_ref_quat_int_set_omega_p().
|
static |
Definition at line 44 of file stabilization_attitude_ref_quat_float.c.
Referenced by attitude_ref_quat_float_init(), and attitude_ref_quat_int_set_omega_q().
|
static |
Definition at line 46 of file stabilization_attitude_ref_quat_float.c.
Referenced by attitude_ref_quat_float_init(), and attitude_ref_quat_int_set_omega_r().
|
static |
Definition at line 43 of file stabilization_attitude_ref_quat_float.c.
Referenced by attitude_ref_quat_float_init(), and attitude_ref_quat_int_set_zeta_p().
|
static |
Definition at line 45 of file stabilization_attitude_ref_quat_float.c.
Referenced by attitude_ref_quat_float_init(), and attitude_ref_quat_int_set_zeta_q().
|
static |
Definition at line 47 of file stabilization_attitude_ref_quat_float.c.
Referenced by attitude_ref_quat_float_init(), and attitude_ref_quat_int_set_zeta_r().