Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "firmwares/rotorcraft/stabilization.h"
#include "firmwares/rotorcraft/stabilization/stabilization_rate_indi.h"
#include "firmwares/rotorcraft/stabilization/stabilization_indi.h"
#include "firmwares/rotorcraft/autopilot_rc_helpers.h"
#include "subsystems/datalink/telemetry.h"
Go to the source code of this file.
Macros | |
#define | STABILIZATION_INDI_MAX_RATE 6.0 |
Maximum rate you can request in RC rate mode (rad/s) More... | |
#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) |
Initialize rate controller. More... | |
void | stabilization_rate_enter (void) |
Reset rate controller. More... | |
void | stabilization_rate_read_rc (void) |
Read RC comands with roll and yaw sticks. More... | |
void | stabilization_rate_read_rc_switched_sticks (void) |
Read rc with roll and yaw sitcks switched if the default orientation is vertical but airplane sticks are desired. More... | |
void | stabilization_rate_run (bool in_flight) |
Run indi rate interface from the "stabilization_rate_run" function. More... | |
Variables | |
struct FloatRates | stabilization_rate_sp |
Rate stabilization for rotorcrafts based on INDI by Ewoud Smeur.
Definition in file stabilization_rate_indi.c.
#define PITCH_RATE_DEADBAND_EXCEEDED | ( | ) |
Definition at line 61 of file stabilization_rate_indi.c.
#define ROLL_RATE_DEADBAND_EXCEEDED | ( | ) |
Definition at line 57 of file stabilization_rate_indi.c.
#define STABILIZATION_INDI_MAX_RATE 6.0 |
Maximum rate you can request in RC rate mode (rad/s)
Definition at line 43 of file stabilization_rate_indi.c.
#define STABILIZATION_RATE_DEADBAND_P 0 |
Definition at line 48 of file stabilization_rate_indi.c.
#define STABILIZATION_RATE_DEADBAND_Q 0 |
Definition at line 51 of file stabilization_rate_indi.c.
#define STABILIZATION_RATE_DEADBAND_R 200 |
Definition at line 54 of file stabilization_rate_indi.c.
#define YAW_RATE_DEADBAND_EXCEEDED | ( | ) |
Definition at line 65 of file stabilization_rate_indi.c.
|
static |
Definition at line 73 of file stabilization_rate_indi.c.
References dev, FloatRates::p, FloatRates::q, FloatRates::r, stabilization_cmd, and stabilization_rate_sp.
Referenced by stabilization_rate_init().
void stabilization_rate_enter | ( | void | ) |
Reset rate controller.
Definition at line 107 of file stabilization_rate_indi.c.
References FLOAT_RATES_ZERO, stabilization_indi_enter(), and stabilization_rate_sum_err.
void stabilization_rate_init | ( | void | ) |
Initialize rate controller.
Definition at line 95 of file stabilization_rate_indi.c.
References DefaultPeriodic, FLOAT_RATES_ZERO, RATES_ASSIGN, register_periodic_telemetry(), send_rate(), stabilization_indi_init(), 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.
void stabilization_rate_read_rc | ( | void | ) |
Read RC comands with roll and yaw sticks.
Definition at line 115 of file stabilization_rate_indi.c.
References MAX_PPRZ, FloatRates::p, PITCH_RATE_DEADBAND_EXCEEDED, FloatRates::q, FloatRates::r, radio_control, RADIO_PITCH, RADIO_ROLL, RADIO_YAW, ROLL_RATE_DEADBAND_EXCEEDED, STABILIZATION_INDI_MAX_RATE, stabilization_rate_sp, THROTTLE_STICK_DOWN, RadioControl::values, and YAW_RATE_DEADBAND_EXCEEDED.
void stabilization_rate_read_rc_switched_sticks | ( | void | ) |
Read rc with roll and yaw sitcks switched if the default orientation is vertical but airplane sticks are desired.
Definition at line 140 of file stabilization_rate_indi.c.
References MAX_PPRZ, FloatRates::p, PITCH_RATE_DEADBAND_EXCEEDED, FloatRates::q, FloatRates::r, radio_control, RADIO_PITCH, RADIO_ROLL, RADIO_YAW, ROLL_RATE_DEADBAND_EXCEEDED, STABILIZATION_INDI_MAX_RATE, stabilization_rate_sp, THROTTLE_STICK_DOWN, RadioControl::values, and YAW_RATE_DEADBAND_EXCEEDED.
void stabilization_rate_run | ( | bool | in_flight | ) |
Run indi rate interface from the "stabilization_rate_run" function.
Definition at line 164 of file stabilization_rate_indi.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, stabilization_cmd, stabilization_indi_rate_run(), stabilization_rate_fb_cmd, stabilization_rate_gain, stabilization_rate_igain, stabilization_rate_sp, stabilization_rate_sum_err, and stateGetBodyRates_f().
struct FloatRates stabilization_rate_sp |
Definition at line 39 of file stabilization_rate_indi.c.
Referenced by send_rate(), stabilization_rate_read_rc(), stabilization_rate_read_rc_switched_sticks(), and stabilization_rate_run().