|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
42 #ifndef VISION_VELOCITY_ESTIMATE_ID
43 #define VISION_VELOCITY_ESTIMATE_ID ABI_BROADCAST
47 #define CMD_OF_SAT 1500 // 40 deg = 2859.1851
49 #ifndef VISION_PHI_PGAIN
50 #define VISION_PHI_PGAIN 400
54 #ifndef VISION_PHI_IGAIN
55 #define VISION_PHI_IGAIN 20
59 #ifndef VISION_THETA_PGAIN
60 #define VISION_THETA_PGAIN 400
64 #ifndef VISION_THETA_IGAIN
65 #define VISION_THETA_IGAIN 20
69 #ifndef VISION_DESIRED_VX
70 #define VISION_DESIRED_VX 0
74 #ifndef VISION_DESIRED_VY
75 #define VISION_DESIRED_VY 0
80 #if (VISION_PHI_PGAIN < 0) || \
81 (VISION_PHI_IGAIN < 0) || \
82 (VISION_THETA_PGAIN < 0) || \
83 (VISION_THETA_IGAIN < 0)
84 #error "ALL control gains have to be positive!!!"
101 uint32_t stamp,
float vel_x,
float vel_y,
float vel_z,
float noise_x,
float noise_y,
float noise_z);
152 uint32_t stamp,
float vel_x,
float vel_y,
float vel_z,
float noise_x,
float noise_y,
float noise_z)
int32_t theta
in rad with INT32_ANGLE_FRAC
static abi_event velocity_est_ev
int32_t phi_pgain
The roll P gain on the err_vx.
Event structure to store callbacks in a linked list.
float desired_vx
The desired velocity in the x direction (cm/s)
int32_t theta_igain
The pitch I gain on the err_vy_int.
Optical-flow based control for Linux based systems.
static void stabilization_opticflow_vel_cb(uint8_t sender_id, uint32_t stamp, float vel_x, float vel_y, float vel_z, float noise_x, float noise_y, float noise_z)
Update the controls on a new VELOCITY_ESTIMATE ABI message.
struct opticflow_stab_t opticflow_stab
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)
int32_t psi
in rad with INT32_ANGLE_FRAC
int32_t phi
in rad with INT32_ANGLE_FRAC
#define VISION_DESIRED_VY
#define VISION_THETA_IGAIN
void guidance_h_module_init(void)
Initialization of horizontal guidance module.
#define VISION_DESIRED_VX
int32_t theta_pgain
The pitch P gain on the err_vy.
void stabilization_attitude_run(bool in_flight)
void guidance_h_module_run(bool in_flight)
Main guidance loop.
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
Common code for AP and FBW telemetry.
#define VISION_THETA_PGAIN
#define VISION_VELOCITY_ESTIMATE_ID
Default sender to accect VELOCITY_ESTIMATE messages from.
struct Int32Eulers cmd
The commands that are send to the hover loop.
void guidance_h_module_read_rc(void)
Read the RC commands.
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).
uint8_t autopilot_get_mode(void)
get autopilot mode
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)