Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
stabilization_attitude.c File Reference
#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

◆ H_CTL_COURSE_DGAIN

#define H_CTL_COURSE_DGAIN   0.

Definition at line 112 of file stabilization_attitude.c.

◆ H_CTL_COURSE_PRE_BANK_CORRECTION

#define H_CTL_COURSE_PRE_BANK_CORRECTION   1.

Definition at line 108 of file stabilization_attitude.c.

◆ H_CTL_ROLL_RATE_GAIN

#define H_CTL_ROLL_RATE_GAIN   0.

Definition at line 116 of file stabilization_attitude.c.

Function Documentation

◆ h_ctl_attitude_loop()

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:

◆ h_ctl_course_loop()

◆ h_ctl_init()

◆ h_ctl_pitch_loop()

static void h_ctl_pitch_loop ( void  )
inlinestatic

◆ h_ctl_roll_loop()

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:

◆ send_calibration()

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

Definition at line 129 of file stabilization_attitude.c.

References dev, 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

◆ h_ctl_aileron_of_throttle

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().

◆ h_ctl_aileron_setpoint

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().

◆ h_ctl_auto1_rate

bool h_ctl_auto1_rate

Definition at line 50 of file stabilization_attitude.c.

Referenced by h_ctl_roll_loop().

◆ h_ctl_course_dgain

float h_ctl_course_dgain

Definition at line 43 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

◆ h_ctl_course_pgain

float h_ctl_course_pgain

Definition at line 42 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

◆ h_ctl_course_pre_bank

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().

◆ h_ctl_course_pre_bank_correction

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().

◆ h_ctl_course_setpoint

float h_ctl_course_setpoint

Definition at line 39 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().

◆ h_ctl_disabled

bool h_ctl_disabled

Definition at line 47 of file stabilization_attitude.c.

Referenced by h_ctl_attitude_loop(), and h_ctl_init().

◆ h_ctl_elevator_of_roll

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().

◆ h_ctl_elevator_setpoint

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().

◆ h_ctl_pitch_dgain

float h_ctl_pitch_dgain

Definition at line 63 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

◆ h_ctl_pitch_loop_setpoint

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().

◆ h_ctl_pitch_pgain

float h_ctl_pitch_pgain

Definition at line 62 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

◆ h_ctl_pitch_setpoint

float h_ctl_pitch_setpoint

Definition at line 60 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_pitch_loop().

◆ h_ctl_roll_attitude_gain

float h_ctl_roll_attitude_gain

Definition at line 119 of file stabilization_attitude.c.

Referenced by h_ctl_init().

◆ h_ctl_roll_max_setpoint

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().

◆ h_ctl_roll_pgain

float h_ctl_roll_pgain

Definition at line 55 of file stabilization_attitude.c.

Referenced by h_ctl_init(), and h_ctl_roll_loop().

◆ h_ctl_roll_rate_gain

float h_ctl_roll_rate_gain

Definition at line 120 of file stabilization_attitude.c.

Referenced by h_ctl_init().

◆ h_ctl_roll_setpoint

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().

◆ h_ctl_roll_slew

float h_ctl_roll_slew

Definition at line 57 of file stabilization_attitude.c.

Referenced by h_ctl_course_loop(), and h_ctl_init().