34 #include "generated/airframe.h"
40 #ifndef GUIDANCE_H_USE_REF
41 #define GUIDANCE_H_USE_REF TRUE
48 #ifndef GUIDANCE_H_USE_SPEED_REF
49 #define GUIDANCE_H_USE_SPEED_REF TRUE
52 #define GUIDANCE_H_MODE_KILL 0
53 #define GUIDANCE_H_MODE_RATE 1
54 #define GUIDANCE_H_MODE_ATTITUDE 2
55 #define GUIDANCE_H_MODE_HOVER 3
56 #define GUIDANCE_H_MODE_NAV 4
57 #define GUIDANCE_H_MODE_RC_DIRECT 5
58 #define GUIDANCE_H_MODE_CARE_FREE 6
59 #define GUIDANCE_H_MODE_FORWARD 7
60 #define GUIDANCE_H_MODE_MODULE 8
61 #define GUIDANCE_H_MODE_FLIP 9
62 #define GUIDANCE_H_MODE_GUIDED 10
131 #define guidance_h_SetUseRef(_val) { \
132 guidance_h.use_ref = _val && GUIDANCE_H_USE_REF; \
Reference generation for horizontal guidance.
void guidance_h_mode_changed(uint8_t new_mode)
struct Int32Eulers rc_sp
with INT32_ANGLE_FRAC
static void guidance_h_SetTau(float tau)
float gh_set_max_speed(float max_speed)
Set a new maximum speed for waypoint navigation.
struct HorizontalGuidance guidance_h
void guidance_h_run(bool_t in_flight)
bool_t approx_force_by_thrust
struct HorizontalGuidanceReference ref
reference calculated from setpoints
struct HorizontalGuidanceSetpoint sp
setpoints
struct Int32Vect2 accel
with INT32_ACCEL_FRAC
static void guidance_h_SetMaxSpeed(float speed)
float gh_set_omega(float omega)
float gh_set_tau(float tau)
int32_t transition_theta_offset
struct Int32Vect2 speed
with INT32_SPEED_FRAC
void guidance_h_read_rc(bool_t in_flight)
static void guidance_h_SetZeta(float zeta)
int32_t transition_percentage
void guidance_h_init(void)
int32_t heading
with INT32_ANGLE_FRAC
struct HorizontalGuidanceGains gains
bool_t guidance_h_set_guided_pos(float x, float y)
Set horizontal position setpoint in GUIDED mode.
struct Int32Vect2 pos
with INT32_POS_FRAC
float gh_set_zeta(float zeta)
void guidance_h_set_igain(uint32_t igain)
struct Int32Vect2 speed
only used if GUIDANCE_H_USE_SPEED_REF
bool_t guidance_h_set_guided_heading(float heading)
Set heading setpoint in GUIDED mode.
struct Int32Vect2 pos
horizontal position setpoint in NED.
Paparazzi fixed point algebra.
static void guidance_h_SetOmega(float omega)