Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude_euler_int.c File Reference

Rotorcraft attitude stabilization in euler int version. More...

+ Include dependency graph for stabilization_attitude_euler_int.c:

Go to the source code of this file.

Macros

#define USE_ATTITUDE_REF   1
 explicitly define to zero to disable attitude reference generation More...
 
#define STABILIZATION_ATTITUDE_PHI_FFDGAIN   0
 explicitly define to zero to disable feed-forward rate term by default More...
 
#define STABILIZATION_ATTITUDE_THETA_FFDGAIN   0
 
#define STABILIZATION_ATTITUDE_PSI_FFDGAIN   0
 
#define OFFSET_AND_ROUND(_a, _b)   (((_a)+(1<<((_b)-1)))>>(_b))
 
#define OFFSET_AND_ROUND2(_a, _b)   (((_a)+(1<<((_b)-1))-((_a)<0?1:0))>>(_b))
 
#define MAX_SUM_ERR   4000000
 
#define CMD_SHIFT   11
 

Functions

static void reset_psi_ref_from_body (void)
 
static void send_att (struct transport_tx *trans, struct link_device *dev)
 
static void send_att_ref (struct transport_tx *trans, struct link_device *dev)
 
void stabilization_attitude_init (void)
 
void stabilization_attitude_read_rc (bool in_flight, bool in_carefree, bool coordinated_turn)
 
void stabilization_attitude_enter (void)
 
void stabilization_attitude_set_failsafe_setpoint (void)
 
void stabilization_attitude_set_rpy_setpoint_i (struct Int32Eulers *rpy)
 
void stabilization_attitude_set_earth_cmd_i (struct Int32Vect2 *cmd, int32_t heading)
 
void stabilization_attitude_run (bool in_flight)
 

Variables

struct Int32AttitudeGains stabilization_gains
 
struct Int32Eulers stabilization_att_sum_err
 
int32_t stabilization_att_fb_cmd [COMMANDS_NB]
 
int32_t stabilization_att_ff_cmd [COMMANDS_NB]
 
struct Int32Eulers stab_att_sp_euler
 with INT32_ANGLE_FRAC More...
 
struct AttRefEulerInt att_ref_euler_i
 

Detailed Description

Rotorcraft attitude stabilization in euler int version.

Definition in file stabilization_attitude_euler_int.c.

Macro Definition Documentation

#define CMD_SHIFT   11
#define MAX_SUM_ERR   4000000

Definition at line 210 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

#define OFFSET_AND_ROUND (   _a,
  _b 
)    (((_a)+(1<<((_b)-1)))>>(_b))

Definition at line 207 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

#define OFFSET_AND_ROUND2 (   _a,
  _b 
)    (((_a)+(1<<((_b)-1))-((_a)<0?1:0))>>(_b))

Definition at line 208 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

#define STABILIZATION_ATTITUDE_PHI_FFDGAIN   0

explicitly define to zero to disable feed-forward rate term by default

Definition at line 45 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_init().

#define STABILIZATION_ATTITUDE_PSI_FFDGAIN   0

Definition at line 51 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_init().

#define STABILIZATION_ATTITUDE_THETA_FFDGAIN   0

Definition at line 48 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_init().

#define USE_ATTITUDE_REF   1

explicitly define to zero to disable attitude reference generation

Definition at line 40 of file stabilization_attitude_euler_int.c.

Function Documentation

static void reset_psi_ref_from_body ( void  )
inlinestatic
static void send_att ( struct transport_tx *  trans,
struct link_device *  dev 
)
static
static void send_att_ref ( struct transport_tx *  trans,
struct link_device *  dev 
)
static
void stabilization_attitude_enter ( void  )
void stabilization_attitude_read_rc ( bool  in_flight,
bool  in_carefree,
bool  coordinated_turn 
)

Definition at line 171 of file stabilization_attitude_euler_int.c.

References stab_att_sp_euler, and stabilization_attitude_read_rc_setpoint_eulers().

+ Here is the call graph for this function:

void stabilization_attitude_set_earth_cmd_i ( struct Int32Vect2 cmd,
int32_t  heading 
)
void stabilization_attitude_set_failsafe_setpoint ( void  )

Definition at line 183 of file stabilization_attitude_euler_int.c.

References Int32Eulers::phi, Int32Eulers::psi, stab_att_sp_euler, stateGetNedToBodyEulers_i(), and Int32Eulers::theta.

+ Here is the call graph for this function:

void stabilization_attitude_set_rpy_setpoint_i ( struct Int32Eulers rpy)

Definition at line 190 of file stabilization_attitude_euler_int.c.

References stab_att_sp_euler.

Variable Documentation

int32_t stabilization_att_fb_cmd[COMMANDS_NB]

Definition at line 71 of file stabilization_attitude_euler_int.c.

Referenced by send_att(), and stabilization_attitude_run().

int32_t stabilization_att_ff_cmd[COMMANDS_NB]

Definition at line 72 of file stabilization_attitude_euler_int.c.

Referenced by send_att(), and stabilization_attitude_run().

struct Int32AttitudeGains stabilization_gains