Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
stabilization_rate.c File Reference
+ Include dependency graph for stabilization_rate.c:

Go to the source code of this file.

Macros

#define MAX_SUM_ERR   40000
 
#define STABILIZATION_RATE_IGAIN_P   0
 
#define STABILIZATION_RATE_IGAIN_Q   0
 
#define STABILIZATION_RATE_IGAIN_R   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 STABILIZATION_RATE_DEADBAND_P   0
 
#define STABILIZATION_RATE_DEADBAND_Q   0
 
#define STABILIZATION_RATE_DEADBAND_R   200
 
#define ROLL_RATE_DEADBAND_EXCEEDED()
 
#define PITCH_RATE_DEADBAND_EXCEEDED()
 
#define YAW_RATE_DEADBAND_EXCEEDED()
 

Functions

static void send_rate (struct transport_tx *trans, struct link_device *dev)
 
void stabilization_rate_init (void)
 
void stabilization_rate_read_rc (void)
 
void stabilization_rate_read_rc_switched_sticks (void)
 
void stabilization_rate_enter (void)
 
void stabilization_rate_run (bool in_flight)
 

Variables

struct FloatRates stabilization_rate_sp
 
struct FloatRates stabilization_rate_gain
 
struct FloatRates stabilization_rate_igain
 
struct FloatRates stabilization_rate_sum_err
 
struct FloatRates stabilization_rate_fb_cmd
 

Detailed Description

Rate stabilization for rotorcrafts.

Control loops for angular velocity.

Definition in file stabilization_rate.c.

Macro Definition Documentation

◆ MAX_SUM_ERR

#define MAX_SUM_ERR   40000

Definition at line 40 of file stabilization_rate.c.

◆ OFFSET_AND_ROUND

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

Definition at line 64 of file stabilization_rate.c.

◆ OFFSET_AND_ROUND2

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

Definition at line 65 of file stabilization_rate.c.

◆ PITCH_RATE_DEADBAND_EXCEEDED

#define PITCH_RATE_DEADBAND_EXCEEDED ( )

◆ ROLL_RATE_DEADBAND_EXCEEDED

#define ROLL_RATE_DEADBAND_EXCEEDED ( )

◆ STABILIZATION_RATE_DEADBAND_P

#define STABILIZATION_RATE_DEADBAND_P   0

Definition at line 75 of file stabilization_rate.c.

◆ STABILIZATION_RATE_DEADBAND_Q

#define STABILIZATION_RATE_DEADBAND_Q   0

Definition at line 78 of file stabilization_rate.c.

◆ STABILIZATION_RATE_DEADBAND_R

#define STABILIZATION_RATE_DEADBAND_R   200

Definition at line 81 of file stabilization_rate.c.

◆ STABILIZATION_RATE_IGAIN_P

#define STABILIZATION_RATE_IGAIN_P   0

Definition at line 43 of file stabilization_rate.c.

◆ STABILIZATION_RATE_IGAIN_Q

#define STABILIZATION_RATE_IGAIN_Q   0

Definition at line 47 of file stabilization_rate.c.

◆ STABILIZATION_RATE_IGAIN_R

#define STABILIZATION_RATE_IGAIN_R   0

Definition at line 51 of file stabilization_rate.c.

◆ YAW_RATE_DEADBAND_EXCEEDED

#define YAW_RATE_DEADBAND_EXCEEDED ( )
Value:

Definition at line 92 of file stabilization_rate.c.

Function Documentation

◆ send_rate()

static void send_rate ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 99 of file stabilization_rate.c.

References dev, FloatRates::p, FloatRates::q, FloatRates::r, stabilization_cmd, stabilization_rate_fb_cmd, stabilization_rate_sp, and stabilization_rate_sum_err.

Referenced by stabilization_rate_init().

+ Here is the caller graph for this function:

◆ stabilization_rate_enter()

void stabilization_rate_enter ( void  )

Definition at line 182 of file stabilization_rate.c.

Referenced by guidance_h_mode_changed().

+ Here is the caller graph for this function:

◆ stabilization_rate_init()

void stabilization_rate_init ( void  )

Definition at line 115 of file stabilization_rate.c.

◆ stabilization_rate_read_rc()

void stabilization_rate_read_rc ( void  )

Definition at line 137 of file stabilization_rate.c.

Referenced by guidance_h_read_rc().

+ Here is the caller graph for this function:

◆ stabilization_rate_read_rc_switched_sticks()

void stabilization_rate_read_rc_switched_sticks ( void  )

Definition at line 160 of file stabilization_rate.c.

Referenced by guidance_h_read_rc().

+ Here is the caller graph for this function:

◆ stabilization_rate_run()

void stabilization_rate_run ( bool  in_flight)

Definition at line 187 of file stabilization_rate.c.

Referenced by guidance_h_run().

+ Here is the caller graph for this function:

Variable Documentation

◆ stabilization_rate_fb_cmd

struct FloatRates stabilization_rate_fb_cmd

Definition at line 72 of file stabilization_rate.c.

Referenced by send_rate(), and stabilization_rate_run().

◆ stabilization_rate_gain

struct FloatRates stabilization_rate_gain

Definition at line 68 of file stabilization_rate.c.

Referenced by stabilization_rate_init(), and stabilization_rate_run().

◆ stabilization_rate_igain

struct FloatRates stabilization_rate_igain

Definition at line 69 of file stabilization_rate.c.

Referenced by stabilization_rate_init(), and stabilization_rate_run().

◆ stabilization_rate_sp

◆ stabilization_rate_sum_err

struct FloatRates stabilization_rate_sum_err
STABILIZATION_RATE_DEADBAND_Q
#define STABILIZATION_RATE_DEADBAND_Q
Definition: stabilization_rate.c:78
STABILIZATION_RATE_DEADBAND_P
#define STABILIZATION_RATE_DEADBAND_P
Definition: stabilization_rate.c:75
STABILIZATION_RATE_DEADBAND_R
#define STABILIZATION_RATE_DEADBAND_R
Definition: stabilization_rate.c:81
radio_control
struct RadioControl radio_control
Definition: radio_control.c:33
RadioControl::values
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
Definition: radio_control.h:67