Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Rotorcraft attitude stabilization in euler float version. More...
#include "generated/airframe.h"
#include "firmwares/rotorcraft/stabilization/stabilization_attitude.h"
#include "firmwares/rotorcraft/stabilization/stabilization_attitude_rc_setpoint.h"
#include "std.h"
#include "paparazzi.h"
#include "math/pprz_algebra_float.h"
#include "state.h"
#include "subsystems/datalink/telemetry.h"
Go to the source code of this file.
Macros | |
#define | USE_ATT_REF 1 |
#define | MAX_SUM_ERR 200 |
Functions | |
static void | send_att (struct transport_tx *trans, struct link_device *dev) |
static void | send_att_ref (struct transport_tx *trans, struct link_device *dev) |
void | stabilization_attitude_init (void) |
void | stabilization_attitude_read_rc (bool in_flight, bool in_carefree, bool 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 in_flight) |
Variables | |
struct FloatAttitudeGains | stabilization_gains |
struct FloatEulers | stabilization_att_sum_err |
struct FloatEulers | stab_att_sp_euler |
with INT32_ANGLE_FRAC More... | |
struct AttRefEulerFloat | att_ref_euler_f |
float | stabilization_att_fb_cmd [COMMANDS_NB] |
float | stabilization_att_ff_cmd [COMMANDS_NB] |
Rotorcraft attitude stabilization in euler float version.
Definition in file stabilization_attitude_euler_float.c.
#define MAX_SUM_ERR 200 |
Definition at line 174 of file stabilization_attitude_euler_float.c.
Referenced by stabilization_attitude_run().
#define USE_ATT_REF 1 |
Definition at line 39 of file stabilization_attitude_euler_float.c.
|
static |
Definition at line 54 of file stabilization_attitude_euler_float.c.
References foo, FloatRates::p, FloatEulers::phi, FloatEulers::psi, FloatRates::q, FloatRates::r, stab_att_sp_euler, stabilization_att_fb_cmd, stabilization_att_ff_cmd, stabilization_att_sum_err, stabilization_cmd, stateGetBodyRates_f(), stateGetNedToBodyEulers_f(), and FloatEulers::theta.
Referenced by stabilization_attitude_init().
|
static |
Definition at line 80 of file stabilization_attitude_euler_float.c.
References AttRefEulerFloat::accel, att_ref_euler_f, AttRefEulerFloat::euler, FloatRates::p, FloatEulers::phi, FloatEulers::psi, FloatRates::q, FloatRates::r, AttRefEulerFloat::rate, stab_att_sp_euler, and FloatEulers::theta.
Referenced by stabilization_attitude_init().
void stabilization_attitude_enter | ( | void | ) |
Definition at line 136 of file stabilization_attitude_euler_float.c.
References att_ref_euler_f, attitude_ref_euler_float_enter(), FLOAT_EULERS_ZERO, FloatEulers::psi, stab_att_sp_euler, stabilization_att_sum_err, and stabilization_attitude_get_heading_f().
void stabilization_attitude_init | ( | void | ) |
Definition at line 98 of file stabilization_attitude_euler_float.c.
References att_ref_euler_f, attitude_ref_euler_float_init(), FloatAttitudeGains::d, FloatAttitudeGains::dd, DefaultPeriodic, FLOAT_EULERS_ZERO, FloatAttitudeGains::i, FloatAttitudeGains::p, register_periodic_telemetry(), send_att(), send_att_ref(), stabilization_att_sum_err, stabilization_gains, and VECT3_ASSIGN.
void stabilization_attitude_read_rc | ( | bool | in_flight, |
bool | in_carefree, | ||
bool | coordinated_turn | ||
) |
Definition at line 131 of file stabilization_attitude_euler_float.c.
References stab_att_sp_euler, and stabilization_attitude_read_rc_setpoint_eulers_f().
void stabilization_attitude_run | ( | bool | in_flight | ) |
Definition at line 176 of file stabilization_attitude_euler_float.c.
References AttRefEulerFloat::accel, att_ref_euler_f, attitude_ref_euler_float_update(), FloatAttitudeGains::d, FloatAttitudeGains::dd, AttRefEulerFloat::euler, EULERS_ADD, EULERS_BOUND_CUBE, EULERS_COPY, EULERS_DIFF, FLOAT_ANGLE_NORMALIZE, FLOAT_EULERS_ZERO, FLOAT_RATES_ZERO, FloatAttitudeGains::i, MAX_PPRZ, MAX_SUM_ERR, FloatAttitudeGains::p, FloatRates::p, FloatEulers::phi, FloatEulers::psi, FloatRates::q, FloatRates::r, AttRefEulerFloat::rate, RATES_DIFF, stab_att_sp_euler, stabilization_att_fb_cmd, stabilization_att_ff_cmd, stabilization_att_sum_err, stabilization_cmd, stabilization_gains, stateGetBodyRates_f(), stateGetNedToBodyEulers_f(), FloatEulers::theta, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
void stabilization_attitude_set_earth_cmd_i | ( | struct Int32Vect2 * | cmd, |
int32_t | heading | ||
) |
Definition at line 159 of file stabilization_attitude_euler_float.c.
References ANGLE_FLOAT_OF_BFP, FloatEulers::phi, FloatEulers::psi, stab_att_sp_euler, stateGetNedToBodyEulers_f(), FloatEulers::theta, FloatVect2::x, Int32Vect2::x, FloatVect2::y, and Int32Vect2::y.
void stabilization_attitude_set_failsafe_setpoint | ( | void | ) |
Definition at line 147 of file stabilization_attitude_euler_float.c.
References FloatEulers::phi, FloatEulers::psi, stab_att_sp_euler, stateGetNedToBodyEulers_f(), and FloatEulers::theta.
void stabilization_attitude_set_rpy_setpoint_i | ( | struct Int32Eulers * | rpy | ) |
Definition at line 154 of file stabilization_attitude_euler_float.c.
References EULERS_FLOAT_OF_BFP, and stab_att_sp_euler.
struct AttRefEulerFloat att_ref_euler_f |
Definition at line 46 of file stabilization_attitude_euler_float.c.
Referenced by send_att_ref(), stabilization_attitude_enter(), stabilization_attitude_init(), and stabilization_attitude_run().
struct FloatEulers stab_att_sp_euler |
with INT32_ANGLE_FRAC
Definition at line 45 of file stabilization_attitude_euler_float.c.
Referenced by guidance_flip_run(), guidance_hybrid_set_cmd_i(), send_att(), send_att_ref(), stabilization_attitude_enter(), stabilization_attitude_read_rc(), stabilization_attitude_read_rc_setpoint_quat_earth_bound_f(), stabilization_attitude_read_rc_setpoint_quat_f(), stabilization_attitude_run(), stabilization_attitude_set_earth_cmd_i(), stabilization_attitude_set_failsafe_setpoint(), and stabilization_attitude_set_rpy_setpoint_i().
float stabilization_att_fb_cmd[COMMANDS_NB] |
Definition at line 48 of file stabilization_attitude_euler_float.c.
Referenced by send_att(), and stabilization_attitude_run().
float stabilization_att_ff_cmd[COMMANDS_NB] |
Definition at line 49 of file stabilization_attitude_euler_float.c.
Referenced by send_att(), and stabilization_attitude_run().
struct FloatEulers stabilization_att_sum_err |
Definition at line 43 of file stabilization_attitude_euler_float.c.
Referenced by send_att(), stabilization_attitude_enter(), stabilization_attitude_init(), and stabilization_attitude_run().
struct FloatAttitudeGains stabilization_gains |
Definition at line 42 of file stabilization_attitude_euler_float.c.
Referenced by stabilization_attitude_init(), and stabilization_attitude_run().