42#ifndef VISION_VELOCITY_ESTIMATE_ID
43#define VISION_VELOCITY_ESTIMATE_ID ABI_BROADCAST
47#define CMD_OF_SAT 1500
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);
146 float noise_x,
float noise_y,
float noise_z
UNUSED)
Main include for ABI (AirBorneInterface).
struct abi_struct abi_event
Core autopilot interface common to all firmwares.
Common code for AP and FBW telemetry.
int32_t psi
in rad with INT32_ANGLE_FRAC
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
struct opticflow_stab_t opticflow_stab
#define VISION_VELOCITY_ESTIMATE_ID
Default sender to accect VELOCITY_ESTIMATE messages from.
#define VISION_THETA_PGAIN
#define VISION_DESIRED_VY
void guidance_opticflow_hover_init(void)
Initialization of horizontal guidance module.
void guidance_module_enter(void)
guidance mode enter resets the errors and starts the controller.
static abi_event velocity_est_ev
void guidance_module_run(bool in_flight)
Main guidance loop.
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.
#define VISION_DESIRED_VX
#define VISION_THETA_IGAIN
Optical-flow based control for Linux based systems.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
void guidance_v_mode_changed(uint8_t new_mode)
struct ThrustSetpoint guidance_v_run(bool in_flight)
Guidance vertical run functions.
Vertical guidance for rotorcrafts.
#define GUIDANCE_V_MODE_HOVER
General attitude stabilization interface for rotorcrafts.
struct Stabilization stabilization
struct StabilizationSetpoint stab_sp_from_eulers_i(struct Int32Eulers *eulers)
void stabilization_attitude_run(bool in_flight, struct StabilizationSetpoint *sp, struct ThrustSetpoint *thrust, int32_t *cmd)
Attitude control run function.
union StabilizationSetpoint::@354356152067340015216250042204214023005305374154 sp
Thrust setpoint // TODO to a setpoint header Structure to store the desired thrust vector with differ...
union ThrustSetpoint::@302344065342070214103253314124156277107357236133 sp
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.