Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_indi.c File Reference
+ Include dependency graph for stabilization_indi.c:

Go to the source code of this file.

Macros

#define STABILIZATION_INDI_FILT_OMEGA   50.0
 
#define STABILIZATION_INDI_FILT_ZETA   0.55
 
#define STABILIZATION_INDI_FILT_OMEGA_R   STABILIZATION_INDI_FILT_OMEGA
 
#define STABILIZATION_INDI_FILT_ZETA_R   STABILIZATION_INDI_FILT_ZETA
 
#define STABILIZATION_INDI_MAX_RATE   6.0
 
#define STABILIZATION_INDI_MAX_R   STABILIZATION_ATTITUDE_SP_MAX_R
 
#define INDI_EST_SCALE   0.001
 

Functions

static void stabilization_indi_calc_cmd (int32_t indi_commands[], struct Int32Quat *att_err, bool rate_control)
 
static void stabilization_indi_second_order_filter_init (struct IndiFilter *filter, float omega, float zeta, float omega_r)
 
static void stabilization_indi_second_order_filter (struct IndiFilter *filter, struct FloatRates *input)
 
static void lms_estimation (void)
 
static void send_att_indi (struct transport_tx *trans, struct link_device *dev)
 
void stabilization_indi_init (void)
 
void stabilization_indi_enter (void)
 
void stabilization_indi_set_failsafe_setpoint (void)
 
void stabilization_indi_set_rpy_setpoint_i (struct Int32Eulers *rpy)
 
void stabilization_indi_set_earth_cmd_i (struct Int32Vect2 *cmd, int32_t heading)
 
void stabilization_indi_run (bool enable_integrator, bool rate_control)
 
void stabilization_indi_read_rc (bool in_flight, bool in_carefree, bool coordinated_turn)
 

Variables

struct Int32Eulers stab_att_sp_euler
 with INT32_ANGLE_FRAC More...
 
struct Int32Quat stab_att_sp_quat
 with INT32_QUAT_FRAC More...
 
static int32_t stabilization_att_indi_cmd [COMMANDS_NB]
 
struct IndiVariables indi
 

Macro Definition Documentation

#define INDI_EST_SCALE   0.001

Definition at line 87 of file stabilization_indi.c.

Referenced by lms_estimation(), and send_att_indi().

#define STABILIZATION_INDI_FILT_OMEGA   50.0

Definition at line 50 of file stabilization_indi.c.

Referenced by stabilization_indi_init().

#define STABILIZATION_INDI_FILT_OMEGA_R   STABILIZATION_INDI_FILT_OMEGA

Definition at line 59 of file stabilization_indi.c.

Referenced by stabilization_indi_init().

#define STABILIZATION_INDI_FILT_ZETA   0.55

Definition at line 54 of file stabilization_indi.c.

Referenced by stabilization_indi_init().

#define STABILIZATION_INDI_FILT_ZETA_R   STABILIZATION_INDI_FILT_ZETA

Definition at line 63 of file stabilization_indi.c.

#define STABILIZATION_INDI_MAX_R   STABILIZATION_ATTITUDE_SP_MAX_R

Definition at line 75 of file stabilization_indi.c.

#define STABILIZATION_INDI_MAX_RATE   6.0

Definition at line 67 of file stabilization_indi.c.

Function Documentation

static void send_att_indi ( struct transport_tx *  trans,
struct link_device *  dev 
)
static
void stabilization_indi_read_rc ( bool  in_flight,
bool  in_carefree,
bool  coordinated_turn 
)

Definition at line 321 of file stabilization_indi.c.

References QUAT_BFP_OF_REAL, stab_att_sp_quat, stabilization_attitude_read_rc_setpoint_quat_earth_bound_f(), and stabilization_attitude_read_rc_setpoint_quat_f().

Referenced by stabilization_attitude_read_rc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_indi_run ( bool  enable_integrator,
bool  rate_control 
)
static void stabilization_indi_second_order_filter ( struct IndiFilter filter,
struct FloatRates input 
)
static

Definition at line 343 of file stabilization_indi.c.

References IndiFilter::ddx, IndiFilter::dx, float_rates_integrate_fi(), IndiFilter::omega, IndiFilter::omega2, IndiFilter::omega2_r, IndiFilter::omega_r, FloatRates::p, FloatRates::q, FloatRates::r, IndiFilter::x, and IndiFilter::zeta.

Referenced by lms_estimation(), and stabilization_indi_calc_cmd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void stabilization_indi_second_order_filter_init ( struct IndiFilter filter,
float  omega,
float  zeta,
float  omega_r 
)
static

Definition at line 333 of file stabilization_indi.c.

References IndiFilter::omega, IndiFilter::omega2, IndiFilter::omega2_r, omega_r, IndiFilter::omega_r, and IndiFilter::zeta.

Referenced by stabilization_indi_init().

+ Here is the caller graph for this function:

void stabilization_indi_set_earth_cmd_i ( struct Int32Vect2 cmd,
int32_t  heading 
)
void stabilization_indi_set_failsafe_setpoint ( void  )

Definition at line 173 of file stabilization_indi.c.

References PPRZ_ITRIG_COS, PPRZ_ITRIG_SIN, Int32Quat::qi, Int32Quat::qx, Int32Quat::qy, Int32Quat::qz, stab_att_sp_quat, and stabilization_attitude_get_heading_i().

Referenced by stabilization_attitude_set_failsafe_setpoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stabilization_indi_set_rpy_setpoint_i ( struct Int32Eulers rpy)

Definition at line 183 of file stabilization_indi.c.

References quat_from_rpy_cmd_i(), stab_att_sp_euler, and stab_att_sp_quat.

Referenced by stabilization_attitude_set_rpy_setpoint_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct IndiVariables indi
Initial value:
= {
.attitude_max_yaw_rate = STABILIZATION_INDI_MAX_R,
.g1 = {STABILIZATION_INDI_G1_P, STABILIZATION_INDI_G1_Q, STABILIZATION_INDI_G1_R},
.g2 = STABILIZATION_INDI_G2_R,
.reference_acceleration = {
STABILIZATION_INDI_REF_ERR_P,
STABILIZATION_INDI_REF_ERR_Q,
STABILIZATION_INDI_REF_ERR_R,
STABILIZATION_INDI_REF_RATE_P,
STABILIZATION_INDI_REF_RATE_Q,
STABILIZATION_INDI_REF_RATE_R},
.est = {
.g1 = {
STABILIZATION_INDI_G1_P / INDI_EST_SCALE,
STABILIZATION_INDI_G1_Q / INDI_EST_SCALE,
STABILIZATION_INDI_G1_R / INDI_EST_SCALE},
.g2 = STABILIZATION_INDI_G2_R / INDI_EST_SCALE,
.mu = STABILIZATION_INDI_ADAPTIVE_MU,
},
.adaptive = FALSE,
}
#define STABILIZATION_INDI_MAX_RATE
#define FALSE
Definition: std.h:5
#define STABILIZATION_INDI_MAX_R
#define INDI_EST_SCALE

Definition at line 88 of file stabilization_indi.c.

int32_t stabilization_att_indi_cmd[COMMANDS_NB]
static

Definition at line 81 of file stabilization_indi.c.

Referenced by stabilization_indi_run().