Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "firmwares/rotorcraft/stabilization/stabilization_attitude_common_int.h"
#include "firmwares/rotorcraft/stabilization/stabilization_attitude_ref_quat_int.h"
Go to the source code of this file.
Data Structures | |
struct | Indi_gains |
Macros | |
#define | INDI_G_SCALING 1000.0 |
Functions | |
void | stabilization_indi_init (void) |
Function that initializes important values upon engaging INDI. More... | |
void | stabilization_indi_enter (void) |
Function that resets important values upon engaging INDI. More... | |
void | stabilization_indi_set_failsafe_setpoint (void) |
Function that calculates the failsafe setpoint. More... | |
void | stabilization_indi_set_rpy_setpoint_i (struct Int32Eulers *rpy) |
Set attitude quaternion setpoint from rpy. More... | |
void | stabilization_indi_set_earth_cmd_i (struct Int32Vect2 *cmd, int32_t heading) |
Set attitude setpoint from command in earth axes. More... | |
void | stabilization_indi_rate_run (struct FloatRates rate_ref, bool in_flight) |
Does the INDI calculations. More... | |
void | stabilization_indi_attitude_run (struct Int32Quat quat_sp, bool in_flight) |
runs stabilization indi More... | |
void | stabilization_indi_read_rc (bool in_flight, bool in_carefree, bool coordinated_turn) |
This function reads rc commands. More... | |
Variables | |
struct Int32Quat | stab_att_sp_quat |
with INT32_QUAT_FRAC More... | |
struct Int32Eulers | stab_att_sp_euler |
with INT32_ANGLE_FRAC More... | |
float | g1g2 [INDI_OUTPUTS][INDI_NUM_ACT] |
float | actuator_state_filt_vect [INDI_NUM_ACT] |
bool | indi_use_adaptive |
float * | Bwls [INDI_OUTPUTS] |
struct Indi_gains | indi_gains |
struct Indi_gains |
Definition at line 41 of file stabilization_indi.h.
Data Fields | ||
---|---|---|
struct FloatRates | att | |
struct FloatRates | rate |
#define INDI_G_SCALING 1000.0 |
Definition at line 30 of file stabilization_indi.h.
void stabilization_indi_attitude_run | ( | struct Int32Quat | quat_sp, |
bool | in_flight | ||
) |
runs stabilization indi
enable_integrator | |
rate_control | boolean that determines if we are in rate control or attitude control |
Function that should be called to run the INDI controller
in_flight | not used |
rate_control | rate control enabled, otherwise attitude control |
Definition at line 496 of file stabilization_indi.c.
void stabilization_indi_enter | ( | void | ) |
Function that resets important values upon engaging INDI.
Don't reset inputs and filters, because it is unlikely to switch stabilization in flight, and there are multiple modes that use (the same) stabilization. Resetting the controller is not so nice when you are flying. FIXME: Ideally we should detect when coming from something that is not INDI
Definition at line 256 of file stabilization_indi.c.
void stabilization_indi_init | ( | void | ) |
Function that initializes important values upon engaging INDI.
Definition at line 206 of file stabilization_indi.c.
void stabilization_indi_rate_run | ( | struct FloatRates | rate_sp, |
bool | in_flight | ||
) |
Does the INDI calculations.
att_err | attitude error |
rate_control | boolean that states if we are in rate control or attitude control |
in_flight | boolean that states if the UAV is in flight or not |
Function that calculates the INDI commands
indi_commands[] | Array of commands that the function will write to |
att_err | quaternion attitude error |
Definition at line 347 of file stabilization_indi.c.
void stabilization_indi_read_rc | ( | bool | in_flight, |
bool | in_carefree, | ||
bool | coordinated_turn | ||
) |
This function reads rc commands.
in_flight | boolean that states if the UAV is in flight or not |
Definition at line 525 of file stabilization_indi.c.
void stabilization_indi_set_earth_cmd_i | ( | struct Int32Vect2 * | cmd, |
int32_t | heading | ||
) |
Set attitude setpoint from command in earth axes.
cmd | 2D command in North East axes |
heading | Heading of the setpoint |
Function that calculates the setpoint quaternion from a command in earth axes
cmd | The command in earth axes (North East) |
heading | The desired heading |
Definition at line 323 of file stabilization_indi.c.
void stabilization_indi_set_failsafe_setpoint | ( | void | ) |
Function that calculates the failsafe setpoint.
Definition at line 294 of file stabilization_indi.c.
void stabilization_indi_set_rpy_setpoint_i | ( | struct Int32Eulers * | rpy | ) |
Set attitude quaternion setpoint from rpy.
rpy | rpy from which to calculate quaternion setpoint |
Function that calculates the setpoint quaternion from rpy
rpy | roll pitch yaw input |
Definition at line 309 of file stabilization_indi.c.
float actuator_state_filt_vect[INDI_NUM_ACT] |
Definition at line 113 of file stabilization_indi.c.
Referenced by ctrl_eff_scheduling_periodic(), ctrl_eff_scheduling_periodic_b(), stabilization_indi_init(), and stabilization_indi_rate_run().
float* Bwls[INDI_OUTPUTS] |
Definition at line 55 of file stabilization_indi.c.
Referenced by ctrl_eff_scheduling_periodic(), stabilization_indi_init(), and stabilization_indi_rate_run().
float g1g2[INDI_OUTPUTS][INDI_NUM_ACT] |
Definition at line 161 of file stabilization_indi.c.
Referenced by calc_g1g2_pseudo_inv(), ctrl_eff_scheduling_periodic_a(), ctrl_eff_scheduling_periodic_b(), and stabilization_indi_init().
struct Indi_gains indi_gains |
Definition at line 66 of file stabilization_indi.c.
Referenced by ctrl_eff_scheduling_periodic_b(), stabilization_indi_attitude_run(), and stabilization_indi_rate_run().
bool indi_use_adaptive |
Definition at line 82 of file stabilization_indi.c.
Referenced by stabilization_indi_rate_run().
struct Int32Eulers stab_att_sp_euler |
with INT32_ANGLE_FRAC
Definition at line 45 of file stabilization_attitude_euler_float.c.
struct Int32Quat stab_att_sp_quat |
with INT32_QUAT_FRAC
Definition at line 127 of file stabilization_attitude_heli_indi.c.