Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Rate stabilization for rotorcrafts. More...
#include "firmwares/rotorcraft/stabilization.h"
#include "modules/radio_control/radio_control.h"
#include "math/pprz_algebra_float.h"
Go to the source code of this file.
Macros | |
#define | STABILIZATION_RATE_DEADBAND_P 0 |
#define | STABILIZATION_RATE_DEADBAND_Q 0 |
#define | STABILIZATION_RATE_DEADBAND_R 200 |
#define | ROLL_RATE_DEADBAND_EXCEEDED(_rc) |
#define | PITCH_RATE_DEADBAND_EXCEEDED(_rc) |
#define | YAW_RATE_DEADBAND_EXCEEDED(_rc) |
#define | RC_RATE_P RADIO_ROLL |
#define | RC_RATE_Q RADIO_PITCH |
#define | RC_RATE_R RADIO_YAW |
Functions | |
void | stabilization_rate_init (void) |
Initialize rate controller. More... | |
void | stabilization_rate_run (bool in_flight, struct StabilizationSetpoint *rate_sp, struct ThrustSetpoint *thrust, int32_t *cmd) |
Run indi rate interface from the "stabilization_rate_run" function. More... | |
void | stabilization_rate_enter (void) |
Reset rate controller. More... | |
struct StabilizationSetpoint | stabilization_rate_read_rc (struct RadioControl *rc) |
Variables | |
struct FloatRates | stabilization_rate_gain |
struct FloatRates | stabilization_rate_igain |
Rate stabilization for rotorcrafts.
Control loops for angular velocity.
Definition in file stabilization_rate.h.
#define PITCH_RATE_DEADBAND_EXCEEDED | ( | _rc | ) |
Definition at line 49 of file stabilization_rate.h.
#define RC_RATE_P RADIO_ROLL |
Definition at line 64 of file stabilization_rate.h.
#define RC_RATE_Q RADIO_PITCH |
Definition at line 65 of file stabilization_rate.h.
#define RC_RATE_R RADIO_YAW |
Definition at line 66 of file stabilization_rate.h.
#define ROLL_RATE_DEADBAND_EXCEEDED | ( | _rc | ) |
Definition at line 45 of file stabilization_rate.h.
#define STABILIZATION_RATE_DEADBAND_P 0 |
Definition at line 36 of file stabilization_rate.h.
#define STABILIZATION_RATE_DEADBAND_Q 0 |
Definition at line 39 of file stabilization_rate.h.
#define STABILIZATION_RATE_DEADBAND_R 200 |
Definition at line 42 of file stabilization_rate.h.
#define YAW_RATE_DEADBAND_EXCEEDED | ( | _rc | ) |
Definition at line 53 of file stabilization_rate.h.
void stabilization_rate_enter | ( | void | ) |
Reset rate controller.
Definition at line 113 of file stabilization_rate.c.
References FLOAT_RATES_ZERO, stabilization_indi_enter(), and stabilization_rate_sum_err.
Referenced by stabilization_attitude_read_rc().
void stabilization_rate_init | ( | void | ) |
Initialize rate controller.
Definition at line 92 of file stabilization_rate.c.
References DefaultPeriodic, FLOAT_RATES_ZERO, RATES_ASSIGN, register_periodic_telemetry(), send_rate(), stabilization_rate_gain, stabilization_rate_igain, STABILIZATION_RATE_IGAIN_P, STABILIZATION_RATE_IGAIN_Q, STABILIZATION_RATE_IGAIN_R, stabilization_rate_sp, and stabilization_rate_sum_err.
struct StabilizationSetpoint stabilization_rate_read_rc | ( | struct RadioControl * | rc | ) |
Definition at line 118 of file stabilization_rate.c.
References FLOAT_RATES_ZERO, MAX_PPRZ, MAX_SUM_ERR, FloatRates::p, FloatRates::q, FloatRates::r, RATES_ADD, RATES_BOUND_CUBE, RATES_DIFF, RATES_SDIV, stab_sp_to_rates_f(), stabilization_indi_rate_run(), stabilization_rate_fb_cmd, stabilization_rate_gain, stabilization_rate_igain, stabilization_rate_sp, stabilization_rate_sum_err, stateGetBodyRates_f(), th_sp_to_thrust_i(), and THRUST_AXIS_Z.
Referenced by rc_cb().
void stabilization_rate_run | ( | bool | in_flight, |
struct StabilizationSetpoint * | rate_sp, | ||
struct ThrustSetpoint * | thrust, | ||
int32_t * | cmd | ||
) |
Run indi rate interface from the "stabilization_rate_run" function.
Definition at line 118 of file stabilization_rate.c.
Referenced by stab_sp_rotate_f().
|
extern |
Definition at line 1 of file stabilization_rate.c.
Referenced by stabilization_rate_init(), and stabilization_rate_read_rc().
|
extern |
Definition at line 1 of file stabilization_rate.c.
Referenced by stabilization_rate_init(), and stabilization_rate_read_rc().