|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
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_KILL 0
57 #define GUIDANCE_H_MODE_RATE 1
58 #define GUIDANCE_H_MODE_ATTITUDE 2
59 #define GUIDANCE_H_MODE_HOVER 3
60 #define GUIDANCE_H_MODE_NAV 4
61 #define GUIDANCE_H_MODE_RC_DIRECT 5
62 #define GUIDANCE_H_MODE_CARE_FREE 6
63 #define GUIDANCE_H_MODE_FORWARD 7
64 #define GUIDANCE_H_MODE_MODULE 8
65 #define GUIDANCE_H_MODE_FLIP 9
66 #define GUIDANCE_H_MODE_GUIDED 10
173 #define guidance_h_SetUseRef(_val) { \
174 guidance_h.use_ref = _val && GUIDANCE_H_USE_REF; \
struct HorizontalGuidanceReference ref
reference calculated from setpoints
bool guidance_h_set_guided_body_vel(float vx, float vy)
Set body relative horizontal velocity setpoint in GUIDED mode.
uint8_t mask
bit 5: vx & vy, bit 6: vz, bit 7: vyaw
bool guidance_h_set_guided_heading_rate(float rate)
Set heading rate setpoint in GUIDED mode.
float gh_set_omega(float omega)
int32_t transition_percentage
void guidance_h_guided_run(bool in_flight)
Run GUIDED mode control.
struct Int32Vect2 pos
horizontal position setpoint in NED.
struct Int32Vect2 accel
with INT32_ACCEL_FRAC
static void guidance_h_SetMaxSpeed(float speed)
Paparazzi floating point algebra.
struct Int32Vect2 speed
with INT32_SPEED_FRAC
void guidance_h_mode_changed(uint8_t new_mode)
float gh_set_tau(float tau)
void guidance_h_run(bool in_flight)
Paparazzi fixed point algebra.
struct Int32Vect2 speed
only used in HOVER mode if GUIDANCE_H_USE_SPEED_REF or in GUIDED mode
void guidance_h_set_igain(uint32_t igain)
bool guidance_h_set_guided_pos(float x, float y)
Set horizontal position setpoint in GUIDED mode.
bool approx_force_by_thrust
struct HorizontalGuidance guidance_h
struct HorizontalGuidanceSetpoint sp
setpoints
void guidance_h_hover_enter(void)
struct HorizontalGuidanceGains gains
static void guidance_h_SetZeta(float zeta)
static void guidance_h_SetOmega(float omega)
bool guidance_h_set_guided_vel(float vx, float vy)
Set horizontal velocity setpoint in GUIDED mode.
struct Int32Vect2 pos
with INT32_POS_FRAC
void guidance_h_nav_enter(void)
float gh_set_zeta(float zeta)
bool guidance_h_set_guided_heading(float heading)
Set heading setpoint in GUIDED mode.
float gh_set_max_speed(float max_speed)
Set a new maximum speed for waypoint navigation.
void guidance_h_from_nav(bool in_flight)
Set horizontal guidance from NAV and run control loop.
static void guidance_h_SetTau(float tau)
void guidance_h_read_rc(bool in_flight)
const struct Int32Vect2 * guidance_h_get_pos_err(void)
Gets the position error.
void guidance_h_init(void)