38#include "generated/airframe.h"
44#ifndef GUIDANCE_H_USE_REF
45#define GUIDANCE_H_USE_REF TRUE
52#ifndef GUIDANCE_H_USE_SPEED_REF
53#define GUIDANCE_H_USE_SPEED_REF TRUE
56#define GUIDANCE_H_MODE_NONE 0
57#define GUIDANCE_H_MODE_HOVER 1
58#define GUIDANCE_H_MODE_NAV 2
59#define GUIDANCE_H_MODE_GUIDED 3
63#ifndef GUIDANCE_H_MAX_BANK
64#define GUIDANCE_H_MAX_BANK RadOfDeg(20)
183extern void guidance_h_set_all(
float x,
float y,
float vx,
float vy,
float ax,
float ay);
188#define guidance_h_SetUseRef(_val) { \
189 guidance_h.use_ref = _val && GUIDANCE_H_USE_REF; \
float gh_set_zeta(float zeta)
float gh_set_tau(float tau)
float gh_set_omega(float omega)
float gh_set_max_speed(float max_speed)
Set a new maximum speed for waypoint navigation.
Reference generation for horizontal guidance.
Paparazzi floating point algebra.
Paparazzi fixed point algebra.
struct StabilizationSetpoint guidance_h_guided_run(bool in_flight)
Run GUIDED mode control.
void guidance_h_set_acc(float ax, float ay)
Set horizontal acceleration setpoint.
struct StabilizationSetpoint guidance_h_from_nav(bool in_flight)
Set horizontal guidance from NAV and run control loop.
void guidance_h_set_pos(float x, float y)
Set horizontal position setpoint.
struct Int32Vect2 accel
with INT32_ACCEL_FRAC
void guidance_h_mode_changed(uint8_t new_mode)
void guidance_h_run_enter(void)
void guidance_h_hover_enter(void)
struct StabilizationSetpoint guidance_h_run_pos(bool in_flight, struct HorizontalGuidance *gh)
void guidance_h_set_body_acc(float ax, float ay)
Set body relative horizontal acceleration setpoint.
struct Int32Vect2 speed
with INT32_SPEED_FRAC
static void guidance_h_SetTau(float tau)
void guidance_h_set_heading(float heading)
Set heading setpoint.
struct StabilizationSetpoint guidance_h_run_speed(bool in_flight, struct HorizontalGuidance *gh)
void guidance_h_init(void)
struct HorizontalGuidanceRCInput rc_sp
remote control setpoint
void guidance_h_set_all(float x, float y, float vx, float vy, float ax, float ay)
Set position speed and acceleration (NED frame).
struct HorizontalGuidance guidance_h
static void guidance_h_SetMaxSpeed(float speed)
void guidance_h_nav_enter(void)
struct Int32Vect2 pos
with INT32_POS_FRAC
struct HorizontalGuidanceReference ref
reference calculated from setpoints
struct StabilizationSetpoint guidance_h_run_accel(bool in_flight, struct HorizontalGuidance *gh)
struct StabilizationSetpoint guidance_h_run(bool in_flight)
void guidance_h_set_vel(float vx, float vy)
Set horizontal velocity setpoint.
static void guidance_h_SetOmega(float omega)
void guidance_h_set_body_vel(float vx, float vy)
Set body relative horizontal velocity setpoint.
static void guidance_h_SetZeta(float zeta)
void guidance_h_set_heading_rate(float rate)
Set heading rate setpoint.
struct HorizontalGuidanceSetpoint sp
setpoints
General stabilization interface for rotorcrafts.
enum HorizontalGuidanceSetpoint::@273 h_mask
struct Int32Vect2 pos
horizontal position setpoint in NED.
struct Int32Vect2 accel
For direct control of acceleration, if the guidance scheme is able to provide it.
struct Int32Vect2 speed
only used in HOVER mode if GUIDANCE_H_USE_SPEED_REF or in GUIDED mode
enum HorizontalGuidanceSetpoint::@274 yaw_mask
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.