28 #include "generated/airframe.h"
47 ref->model.omega.p = STABILIZATION_ATTITUDE_REF_OMEGA_P;
48 ref->model.omega.q = STABILIZATION_ATTITUDE_REF_OMEGA_Q;
49 ref->model.omega.r = STABILIZATION_ATTITUDE_REF_OMEGA_R;
50 ref->model.zeta.p = STABILIZATION_ATTITUDE_REF_ZETA_P;
51 ref->model.zeta.q = STABILIZATION_ATTITUDE_REF_ZETA_Q;
52 ref->model.zeta.r = STABILIZATION_ATTITUDE_REF_ZETA_R;
90 ref->accel.p = -2. *
ref->model.zeta.p *
ref->model.omega.p *
ref->rate.p -
91 ref->model.omega.p *
ref->model.omega.p * ref_err.
phi;
92 ref->accel.q = -2. *
ref->model.zeta.q *
ref->model.omega.p *
ref->rate.q -
93 ref->model.omega.q *
ref->model.omega.q * ref_err.
theta;
94 ref->accel.r = -2. *
ref->model.zeta.r *
ref->model.omega.p *
ref->rate.r -
95 ref->model.omega.r *
ref->model.omega.r * ref_err.
psi;
static void attitude_ref_float_saturate_naive(struct FloatRates *rate, struct FloatRates *accel, struct FloatRefSat *sat)
#define FLOAT_ANGLE_NORMALIZE(_a)
#define FLOAT_EULERS_ZERO(_e)
#define FLOAT_RATES_ZERO(_r)
#define RATES_SMUL(_ro, _ri, _s)
#define EULERS_DIFF(_c, _a, _b)
#define EULERS_ADD(_a, _b)
#define RATES_ADD(_a, _b)
#define EULERS_ASSIGN(_e, _phi, _theta, _psi)
Default values for attitude reference saturation.
#define STABILIZATION_ATTITUDE_REF_MAX_P
#define STABILIZATION_ATTITUDE_REF_MAX_PDOT
#define STABILIZATION_ATTITUDE_REF_MAX_QDOT
#define STABILIZATION_ATTITUDE_REF_MAX_Q
#define STABILIZATION_ATTITUDE_REF_MAX_RDOT
#define STABILIZATION_ATTITUDE_REF_MAX_R
static void reset_psi_ref(struct AttRefEulerFloat *ref, float psi)
void attitude_ref_euler_float_enter(struct AttRefEulerFloat *ref, float psi)
void attitude_ref_euler_float_update(struct AttRefEulerFloat *ref, struct FloatEulers *sp_eulers, float dt)
void attitude_ref_euler_float_init(struct AttRefEulerFloat *ref)
Attitude reference state/output (euler float)