Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude.c File Reference

Fixed wing horizontal control. More...

#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
#include "std.h"
#include "led.h"
#include "state.h"
#include "firmwares/fixedwing/nav.h"
#include "generated/airframe.h"
#include <CTRL_TYPE_H>
#include "autopilot.h"
#include "subsystems/datalink/telemetry.h"
+ Include dependency graph for stabilization_attitude.c:

Go to the source code of this file.

Macros

#define H_CTL_COURSE_PRE_BANK_CORRECTION   1.
 
#define H_CTL_COURSE_DGAIN   0.
 
#define H_CTL_ROLL_RATE_GAIN   0.
 

Functions

static void h_ctl_roll_loop (void)
 Computes h_ctl_aileron_setpoint from h_ctl_roll_setpoint. More...
 
static void h_ctl_pitch_loop (void)
 
static void send_calibration (struct transport_tx *trans, struct link_device *dev)
 
void h_ctl_init (void)
 
void h_ctl_course_loop (void)
 
void h_ctl_attitude_loop (void)
 

Variables

float h_ctl_course_setpoint
 
float h_ctl_course_pre_bank
 
float h_ctl_course_pre_bank_correction
 
float h_ctl_course_pgain
 
float h_ctl_course_dgain
 
float h_ctl_roll_max_setpoint
 
bool h_ctl_disabled
 
bool h_ctl_auto1_rate
 
float h_ctl_roll_setpoint
 
float h_ctl_roll_pgain
 
pprz_t h_ctl_aileron_setpoint
 
float h_ctl_roll_slew
 
float h_ctl_pitch_setpoint
 
float h_ctl_pitch_loop_setpoint
 
float h_ctl_pitch_pgain
 
float h_ctl_pitch_dgain
 
pprz_t h_ctl_elevator_setpoint
 
float h_ctl_aileron_of_throttle
 
float h_ctl_elevator_of_roll
 
float h_ctl_roll_attitude_gain
 
float h_ctl_roll_rate_gain
 

Detailed Description

Fixed wing horizontal control.

Definition in file stabilization_attitude.c.

Macro Definition Documentation

#define H_CTL_COURSE_DGAIN   0.

Definition at line 112 of file stabilization_attitude.c.

Referenced by h_ctl_init().

#define H_CTL_COURSE_PRE_BANK_CORRECTION   1.

Definition at line 108 of file stabilization_attitude.c.

Referenced by h_ctl_init().

#define H_CTL_ROLL_RATE_GAIN   0.

Definition at line 116 of file stabilization_attitude.c.

Referenced by h_ctl_init().

Function Documentation

void h_ctl_attitude_loop ( void  )

Definition at line 326 of file stabilization_attitude.c.

References h_ctl_disabled, h_ctl_pitch_loop(), and h_ctl_roll_loop().

+ Here is the call graph for this function:

static void h_ctl_pitch_loop ( void  )
inlinestatic
static void h_ctl_roll_loop ( void  )
inlinestatic

Computes h_ctl_aileron_setpoint from h_ctl_roll_setpoint.

Definition at line 355 of file stabilization_attitude.c.

References h_ctl_aileron_of_throttle, h_ctl_aileron_setpoint, h_ctl_auto1_rate, h_ctl_roll_pgain, h_ctl_roll_setpoint, FloatEulers::phi, stateGetNedToBodyEulers_f(), TRIM_PPRZ, and v_ctl_throttle_setpoint.

Referenced by h_ctl_attitude_loop().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_calibration ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 129 of file stabilization_attitude.c.

References v_ctl_auto_throttle_submode, and v_ctl_auto_throttle_sum_err.

Referenced by h_ctl_init().

+ Here is the caller graph for this function:

Variable Documentation

float h_ctl_aileron_of_throttle

Definition at line 82 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_roll_loop().

pprz_t h_ctl_aileron_setpoint

Definition at line 56 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_roll_loop().

bool h_ctl_auto1_rate

Definition at line 50 of file stabilization_attitude.c.

Referenced by h_ctl_roll_loop().

float h_ctl_course_dgain

Definition at line 43 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

float h_ctl_course_pgain

Definition at line 42 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

float h_ctl_course_pre_bank

Definition at line 40 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

float h_ctl_course_pre_bank_correction

Definition at line 41 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

float h_ctl_course_setpoint

Definition at line 39 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

bool h_ctl_disabled

Definition at line 47 of file stabilization_attitude.c.

Referenced by h_ctl_attitude_loop(), and h_ctl_init().

float h_ctl_elevator_of_roll

Definition at line 83 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

pprz_t h_ctl_elevator_setpoint

Definition at line 64 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

float h_ctl_pitch_dgain

Definition at line 63 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

float h_ctl_pitch_loop_setpoint

Definition at line 61 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

float h_ctl_pitch_pgain

Definition at line 62 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

float h_ctl_pitch_setpoint

Definition at line 60 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

float h_ctl_roll_attitude_gain

Definition at line 119 of file stabilization_attitude.c.

Referenced by h_ctl_init().

float h_ctl_roll_max_setpoint

Definition at line 44 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

float h_ctl_roll_pgain

Definition at line 55 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_roll_loop().

float h_ctl_roll_rate_gain

Definition at line 120 of file stabilization_attitude.c.

Referenced by h_ctl_init().

float h_ctl_roll_setpoint

Definition at line 54 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), h_ctl_init(), and h_ctl_roll_loop().

float h_ctl_roll_slew

Definition at line 57 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().