Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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 "modules/datalink/telemetry.h"
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 |
Fixed wing horizontal control.
Definition in file stabilization_attitude.c.
#define H_CTL_COURSE_DGAIN 0. |
Definition at line 112 of file stabilization_attitude.c.
#define H_CTL_COURSE_PRE_BANK_CORRECTION 1. |
Definition at line 108 of file stabilization_attitude.c.
#define H_CTL_ROLL_RATE_GAIN 0. |
Definition at line 116 of file stabilization_attitude.c.
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().
void h_ctl_course_loop | ( | void | ) |
Definition at line 201 of file stabilization_attitude.c.
References autopilot, h_ctl_course_dgain, h_ctl_course_pgain, h_ctl_course_pre_bank, h_ctl_course_pre_bank_correction, h_ctl_course_setpoint, h_ctl_roll_max_setpoint, h_ctl_roll_setpoint, h_ctl_roll_slew, pprz_autopilot::launch, Min, FloatEulers::psi, stateGetHorizontalSpeedDir_f(), stateGetHorizontalSpeedNorm_f(), stateGetNedToBodyEulers_f(), v_ctl_altitude_error, V_CTL_AUTO_THROTTLE_AGRESSIVE, V_CTL_AUTO_THROTTLE_BLENDED, and v_ctl_auto_throttle_submode.
void h_ctl_init | ( | void | ) |
Definition at line 135 of file stabilization_attitude.c.
References DefaultPeriodic, h_ctl_aileron_of_throttle, h_ctl_aileron_setpoint, h_ctl_course_dgain, H_CTL_COURSE_DGAIN, h_ctl_course_pgain, h_ctl_course_pre_bank, h_ctl_course_pre_bank_correction, H_CTL_COURSE_PRE_BANK_CORRECTION, h_ctl_course_setpoint, h_ctl_disabled, h_ctl_elevator_of_roll, h_ctl_elevator_setpoint, H_CTL_PITCH_DGAIN, h_ctl_pitch_dgain, h_ctl_pitch_loop_setpoint, h_ctl_pitch_pgain, h_ctl_pitch_setpoint, h_ctl_roll_attitude_gain, h_ctl_roll_max_setpoint, h_ctl_roll_pgain, H_CTL_ROLL_RATE_GAIN, h_ctl_roll_rate_gain, h_ctl_roll_setpoint, h_ctl_roll_slew, register_periodic_telemetry(), and send_calibration().
|
inlinestatic |
Definition at line 445 of file stabilization_attitude.c.
References h_ctl_elevator_of_roll, h_ctl_elevator_setpoint, h_ctl_pitch_dgain, h_ctl_pitch_loop_setpoint, h_ctl_pitch_pgain, h_ctl_pitch_setpoint, FloatEulers::phi, stateGetAngleOfAttack_f(), stateGetNedToBodyEulers_f(), FloatEulers::theta, TRIM_PPRZ, v_ctl_mode, and V_CTL_MODE_LANDING.
Referenced by h_ctl_attitude_loop().
|
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().
|
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().
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().