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_euler_int.c File Reference

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

#include "generated/airframe.h"
#include "firmwares/rotorcraft/stabilization.h"
#include "firmwares/rotorcraft/stabilization/stabilization_attitude_rc_setpoint.h"
#include "std.h"
#include "paparazzi.h"
#include "math/pprz_algebra_int.h"
#include "state.h"
+ Include dependency graph for stabilization_attitude_euler_int.c:

Go to the source code of this file.

Macros

#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]
 

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 176 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 173 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 174 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

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 142 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 152 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 158 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 55 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

int32_t stabilization_att_ff_cmd[COMMANDS_NB]

Definition at line 56 of file stabilization_attitude_euler_int.c.

Referenced by stabilization_attitude_run().

struct Int32AttitudeGains stabilization_gains