Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude_ref_quat_float.c File Reference

Rotorcraft attitude reference generation. More...

#include "generated/airframe.h"
#include "firmwares/rotorcraft/stabilization.h"
#include "state.h"
#include "stabilization_attitude_ref_float.h"
+ Include dependency graph for stabilization_attitude_ref_quat_float.c:

Go to the source code of this file.

Macros

#define REF_ACCEL_MAX_P   STABILIZATION_ATTITUDE_REF_MAX_PDOT
 
#define REF_ACCEL_MAX_Q   STABILIZATION_ATTITUDE_REF_MAX_QDOT
 
#define REF_ACCEL_MAX_R   STABILIZATION_ATTITUDE_REF_MAX_RDOT
 
#define DT_UPDATE   (1./PERIODIC_FREQUENCY)
 
#define STABILIZATION_ATTITUDE_REF_QUAT_INFINITESIMAL_STEP   TRUE
 

Functions

static void reset_psi_ref_from_body (void)
 
static void update_ref_quat_from_eulers (void)
 
void stabilization_attitude_ref_init (void)
 
void stabilization_attitude_ref_schedule (uint8_t idx)
 
void stabilization_attitude_ref_enter (void)
 
void stabilization_attitude_ref_update (void)
 

Variables

struct FloatEulers stab_att_sp_euler
 with INT32_ANGLE_FRAC More...
 
struct FloatQuat stab_att_sp_quat
 with INT32_QUAT_FRAC More...
 
struct FloatEulers stab_att_ref_euler
 with REF_ANGLE_FRAC More...
 
struct FloatQuat stab_att_ref_quat
 with INT32_QUAT_FRAC More...
 
struct FloatRates stab_att_ref_rate
 with REF_RATE_FRAC More...
 
struct FloatRates stab_att_ref_accel
 with REF_ACCEL_FRAC More...
 
struct FloatRefModel stab_att_ref_model [STABILIZATION_ATTITUDE_GAIN_NB]
 
static int ref_idx = STABILIZATION_ATTITUDE_GAIN_IDX_DEFAULT
 
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
 

Detailed Description

Rotorcraft attitude reference generation.

(quaternion float version)

Definition in file stabilization_attitude_ref_quat_float.c.

Macro Definition Documentation

#define DT_UPDATE   (1./PERIODIC_FREQUENCY)
#define REF_ACCEL_MAX_P   STABILIZATION_ATTITUDE_REF_MAX_PDOT
#define REF_ACCEL_MAX_Q   STABILIZATION_ATTITUDE_REF_MAX_QDOT
#define REF_ACCEL_MAX_R   STABILIZATION_ATTITUDE_REF_MAX_RDOT
#define STABILIZATION_ATTITUDE_REF_QUAT_INFINITESIMAL_STEP   TRUE

Definition at line 104 of file stabilization_attitude_ref_quat_float.c.

Function Documentation

static void reset_psi_ref_from_body ( void  )
inlinestatic

Definition at line 58 of file stabilization_attitude_ref_quat_float.c.

References FloatEulers::psi, FloatRates::r, stab_att_ref_accel, stab_att_ref_euler, stab_att_ref_rate, and stab_att_sp_euler.

Referenced by stabilization_attitude_ref_enter().

+ Here is the caller graph for this function:

void stabilization_attitude_ref_enter ( void  )

Definition at line 92 of file stabilization_attitude_ref_quat_float.c.

References reset_psi_ref_from_body(), and update_ref_quat_from_eulers().

+ Here is the call graph for this function:

void stabilization_attitude_ref_schedule ( uint8_t  idx)

Definition at line 88 of file stabilization_attitude_ref_quat_float.c.

References ref_idx.

Referenced by stabilization_attitude_gain_schedule().

+ Here is the caller graph for this function:

static void update_ref_quat_from_eulers ( void  )
inlinestatic

Definition at line 65 of file stabilization_attitude_ref_quat_float.c.

References FLOAT_QUAT_OF_RMAT, FLOAT_QUAT_WRAP_SHORTEST, FLOAT_RMAT_OF_EULERS, stab_att_ref_euler, and stab_att_ref_quat.

Referenced by stabilization_attitude_ref_enter().

+ Here is the caller graph for this function:

Variable Documentation

const float omega_p[] = STABILIZATION_ATTITUDE_REF_OMEGA_P
static
const float omega_q[] = STABILIZATION_ATTITUDE_REF_OMEGA_Q
static
const float omega_r[] = STABILIZATION_ATTITUDE_REF_OMEGA_R
static
struct FloatEulers stab_att_sp_euler
const float zeta_p[] = STABILIZATION_ATTITUDE_REF_ZETA_P
static
const float zeta_q[] = STABILIZATION_ATTITUDE_REF_ZETA_Q
static
const float zeta_r[] = STABILIZATION_ATTITUDE_REF_ZETA_R
static