Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude_ref_quat_int.c File Reference

Rotorcraft attitude reference generation. More...

+ Include dependency graph for stabilization_attitude_ref_quat_int.c:

Go to the source code of this file.

Macros

#define REF_ACCEL_MAX_P   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_PDOT, REF_ACCEL_FRAC)
 
#define REF_ACCEL_MAX_Q   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_QDOT, REF_ACCEL_FRAC)
 
#define REF_ACCEL_MAX_R   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_RDOT, REF_ACCEL_FRAC)
 
#define REF_RATE_MAX_P   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_P, REF_RATE_FRAC)
 
#define REF_RATE_MAX_Q   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_Q, REF_RATE_FRAC)
 
#define REF_RATE_MAX_R   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_R, REF_RATE_FRAC)
 
#define TWO_ZETA_OMEGA_RES   10
 
#define TWO_OMEGA_2_RES   7
 
#define DT_UPDATE   (1./PERIODIC_FREQUENCY)
 
#define F_UPDATE_RES   9
 
#define OFFSET_AND_ROUND(_a, _b)   (((_a)+(1<<((_b)-1)))>>(_b))
 

Functions

static void update_ref_model_p (void)
 
static void update_ref_model_q (void)
 
static void update_ref_model_r (void)
 
static void update_ref_model (void)
 
void stabilization_attitude_ref_set_omega_p (float omega_p)
 
void stabilization_attitude_ref_set_omega_q (float omega_q)
 
void stabilization_attitude_ref_set_omega_r (float omega_r)
 
void stabilization_attitude_ref_set_omega (struct FloatRates *omega)
 
void stabilization_attitude_ref_set_zeta_p (float zeta_p)
 
void stabilization_attitude_ref_set_zeta_q (float zeta_q)
 
void stabilization_attitude_ref_set_zeta_r (float zeta_r)
 
void stabilization_attitude_ref_set_zeta (struct FloatRates *zeta)
 
static void reset_psi_ref_from_body (void)
 
void stabilization_attitude_ref_init (void)
 
void stabilization_attitude_ref_enter (void)
 
void stabilization_attitude_ref_update (void)
 

Variables

struct Int32Eulers stab_att_sp_euler
 with INT32_ANGLE_FRAC More...
 
struct Int32Quat stab_att_sp_quat
 with INT32_QUAT_FRAC More...
 
struct Int32Eulers stab_att_ref_euler
 with REF_ANGLE_FRAC More...
 
struct Int32Quat stab_att_ref_quat
 with INT32_QUAT_FRAC More...
 
struct Int32Rates stab_att_ref_rate
 with REF_RATE_FRAC More...
 
struct Int32Rates stab_att_ref_accel
 with REF_ACCEL_FRAC More...
 
struct FloatRefModel stab_att_ref_model
 
static struct Int32Rates two_zeta_omega
 
static struct Int32Rates two_omega_2
 

Detailed Description

Rotorcraft attitude reference generation.

(quaternion int version)

Definition in file stabilization_attitude_ref_quat_int.c.

Macro Definition Documentation

#define DT_UPDATE   (1./PERIODIC_FREQUENCY)

Definition at line 163 of file stabilization_attitude_ref_quat_int.c.

#define F_UPDATE_RES   9
#define OFFSET_AND_ROUND (   _a,
  _b 
)    (((_a)+(1<<((_b)-1)))>>(_b))
#define REF_ACCEL_MAX_P   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_PDOT, REF_ACCEL_FRAC)
#define REF_ACCEL_MAX_Q   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_QDOT, REF_ACCEL_FRAC)
#define REF_ACCEL_MAX_R   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_RDOT, REF_ACCEL_FRAC)
#define REF_RATE_MAX_P   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_P, REF_RATE_FRAC)

Definition at line 38 of file stabilization_attitude_ref_quat_int.c.

#define REF_RATE_MAX_Q   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_Q, REF_RATE_FRAC)

Definition at line 39 of file stabilization_attitude_ref_quat_int.c.

#define REF_RATE_MAX_R   BFP_OF_REAL(STABILIZATION_ATTITUDE_REF_MAX_R, REF_RATE_FRAC)

Definition at line 40 of file stabilization_attitude_ref_quat_int.c.

#define TWO_ZETA_OMEGA_RES   10

Function Documentation

static void reset_psi_ref_from_body ( void  )
inlinestatic
void stabilization_attitude_ref_enter ( void  )
void stabilization_attitude_ref_init ( void  )
void stabilization_attitude_ref_set_omega ( struct FloatRates omega)
void stabilization_attitude_ref_set_omega_p ( float  omega_p)

Definition at line 82 of file stabilization_attitude_ref_quat_int.c.

References FloatRefModel::omega, omega_p, FloatRates::p, ref_idx, stabilization_attitude_ref_idx_set_omega_p(), and update_ref_model_p().

Referenced by stabilization_attitude_ref_set_omega().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_attitude_ref_set_omega_q ( float  omega_q)

Definition at line 87 of file stabilization_attitude_ref_quat_int.c.

References FloatRefModel::omega, omega_q, FloatRates::q, ref_idx, stabilization_attitude_ref_idx_set_omega_q(), and update_ref_model_q().

Referenced by stabilization_attitude_ref_set_omega().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_attitude_ref_set_omega_r ( float  omega_r)

Definition at line 92 of file stabilization_attitude_ref_quat_int.c.

References FloatRefModel::omega, omega_r, FloatRates::r, ref_idx, stabilization_attitude_ref_idx_set_omega_r(), and update_ref_model_r().

Referenced by stabilization_attitude_ref_set_omega().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_attitude_ref_set_zeta ( struct FloatRates zeta)
void stabilization_attitude_ref_set_zeta_p ( float  zeta_p)

Definition at line 103 of file stabilization_attitude_ref_quat_int.c.

References FloatRates::p, update_ref_model_p(), FloatRefModel::zeta, and zeta_p.

Referenced by stabilization_attitude_ref_set_zeta().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_attitude_ref_set_zeta_q ( float  zeta_q)

Definition at line 108 of file stabilization_attitude_ref_quat_int.c.

References FloatRates::q, update_ref_model_q(), FloatRefModel::zeta, and zeta_q.

Referenced by stabilization_attitude_ref_set_zeta().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_attitude_ref_set_zeta_r ( float  zeta_r)

Definition at line 113 of file stabilization_attitude_ref_quat_int.c.

References FloatRates::r, update_ref_model_r(), FloatRefModel::zeta, and zeta_r.

Referenced by stabilization_attitude_ref_set_zeta().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void update_ref_model ( void  )
static

Definition at line 75 of file stabilization_attitude_ref_quat_int.c.

References update_ref_model_p(), update_ref_model_q(), and update_ref_model_r().

Referenced by stabilization_attitude_ref_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void update_ref_model_p ( void  )
static
static void update_ref_model_q ( void  )
static
static void update_ref_model_r ( void  )
static

Variable Documentation

struct FloatRefModel stab_att_ref_model
Initial value:
= {
{STABILIZATION_ATTITUDE_REF_OMEGA_P, STABILIZATION_ATTITUDE_REF_OMEGA_Q, STABILIZATION_ATTITUDE_REF_OMEGA_R},
{STABILIZATION_ATTITUDE_REF_ZETA_P, STABILIZATION_ATTITUDE_REF_ZETA_Q, STABILIZATION_ATTITUDE_REF_ZETA_R}
}

Definition at line 50 of file stabilization_attitude_ref_quat_int.c.

struct Int32Eulers stab_att_sp_euler