|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
41 #define CMD_OF_SAT 1500 // 1500 = 40 deg = 2859.1851
44 #ifndef VISION_PHI_PGAIN
45 #define VISION_PHI_PGAIN 400
49 #ifndef VISION_PHI_IGAIN
50 #define VISION_PHI_IGAIN 20
54 #ifndef VISION_THETA_PGAIN
55 #define VISION_THETA_PGAIN 400
59 #ifndef VISION_THETA_IGAIN
60 #define VISION_THETA_IGAIN 20
64 #ifndef VISION_DESIRED_VX
65 #define VISION_DESIRED_VX 0
69 #ifndef VISION_DESIRED_VY
70 #define VISION_DESIRED_VY 0
75 #if (VISION_PHI_PGAIN < 0) || \
76 (VISION_PHI_IGAIN < 0) || \
77 (VISION_THETA_PGAIN < 0) || \
78 (VISION_THETA_IGAIN < 0)
79 #error "ALL control gains have to be positive!!!"
205 float s_psi = sin(psi);
206 float c_psi = cos(psi);
214 v_x = speed_cur.
y * 100;
215 v_y = speed_cur.
x * 100;
311 float v_desired_total;
int32_t theta
in rad with INT32_ANGLE_FRAC
struct FloatVect3 Total_force
vector in North East Down coordinates Units: meters
#define VISION_DESIRED_VX
int32_t phi_pgain
The roll P gain on the err_vx.
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
float desired_vx
The desired velocity in the x direction (cm/s)
void guidance_h_module_init(void)
Initialization of horizontal guidance module.
int32_t theta_igain
The pitch I gain on the err_vy_int.
int8_t repulsionforce_filter_flag
struct NedCoor_f opti_speed_read
void OA_update()
Update the controls based on a vision result.
float err_vx_int
The integrated velocity error in x direction (m/s)
float desired_vy
The desired velocity in the y direction (cm/s)
static struct NedCoor_f * stateGetSpeedNed_f(void)
Get ground speed in local NED coordinates (float).
#define VISION_DESIRED_VY
int32_t psi
in rad with INT32_ANGLE_FRAC
int32_t phi
in rad with INT32_ANGLE_FRAC
Guidance for the obstacle avoidance methods.
#define ANGLE_BFP_OF_REAL(_af)
int32_t theta_pgain
The pitch P gain on the err_vy.
void stabilization_attitude_run(bool in_flight)
#define VISION_THETA_PGAIN
Common code for AP and FBW telemetry.
void guidance_h_module_run(bool in_flight)
Main guidance loop.
struct opticflow_stab_t opticflow_stab
struct Int32Eulers cmd
The commands that are send to the hover loop.
void guidance_h_module_enter(void)
Horizontal guidance mode enter resets the errors and starts the controller.
void stabilization_attitude_set_rpy_setpoint_i(struct Int32Eulers *rpy)
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
#define VISION_THETA_IGAIN
void guidance_h_module_read_rc(void)
Read the RC commands.
int32_t phi_igain
The roll I gain on the err_vx_int.
float err_vy_int
The integrated velocity error in y direction (m/s)
#define INT32_ANGLE_NORMALIZE(_a)