Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_indi.h File Reference
+ Include dependency graph for stabilization_indi.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ReferenceSystem
 

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_run (bool in_flight, bool rate_control)
 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...
 
bool indi_use_adaptive
 
struct ReferenceSystem reference_acceleration
 

Data Structure Documentation

struct ReferenceSystem

Definition at line 34 of file stabilization_indi.h.

Data Fields
float err_p
float err_q
float err_r
float rate_p
float rate_q
float rate_r

Function Documentation

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 253 of file stabilization_indi.c.

void stabilization_indi_init ( void  )

Function that initializes important values upon engaging INDI.

Definition at line 203 of file stabilization_indi.c.

void stabilization_indi_read_rc ( bool  in_flight,
bool  in_carefree,
bool  coordinated_turn 
)

This function reads rc commands.

Parameters
in_flightboolean that states if the UAV is in flight or not

Definition at line 519 of file stabilization_indi.c.

void stabilization_indi_run ( bool  in_flight,
bool  rate_control 
)

runs stabilization indi

Parameters
enable_integrator
rate_controlboolean that determines if we are in rate control or attitude control

Function that should be called to run the INDI controller

Parameters
in_flightnot used
rate_controlrate control enabled, otherwise attitude control

Definition at line 477 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.

Parameters
cmd2D command in North East axes
headingHeading of the setpoint

Function that calculates the setpoint quaternion from a command in earth axes

Parameters
cmdThe command in earth axes (North East)
headingThe desired heading

Definition at line 320 of file stabilization_indi.c.

void stabilization_indi_set_failsafe_setpoint ( void  )

Function that calculates the failsafe setpoint.

Definition at line 291 of file stabilization_indi.c.

void stabilization_indi_set_rpy_setpoint_i ( struct Int32Eulers rpy)

Set attitude quaternion setpoint from rpy.

Parameters
rpyrpy from which to calculate quaternion setpoint

Function that calculates the setpoint quaternion from rpy

Parameters
rpyroll pitch yaw input

Definition at line 306 of file stabilization_indi.c.

Variable Documentation

bool indi_use_adaptive

Definition at line 84 of file stabilization_indi.c.

Referenced by stabilization_indi_calc_cmd().

struct ReferenceSystem reference_acceleration

Definition at line 72 of file stabilization_indi.c.

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.