Paparazzi UAS  v5.8.2_stable-0-g6260b7c
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 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)
 
void stabilization_attitude_init (void)
 
void stabilization_attitude_read_rc (bool_t in_flight, bool_t in_carefree, bool_t 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_t 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 195 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 192 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 193 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

#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
void stabilization_attitude_enter ( void  )
void stabilization_attitude_read_rc ( bool_t  in_flight,
bool_t  in_carefree,
bool_t  coordinated_turn 
)

Definition at line 156 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 168 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 175 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 60 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

int32_t stabilization_att_ff_cmd[COMMANDS_NB]

Definition at line 61 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

struct Int32AttitudeGains stabilization_gains