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
70 #ifndef GUIDANCE_H_MAX_BANK
71 #define GUIDANCE_H_MAX_BANK RadOfDeg(20)
159 #define guidance_h_SetUseRef(_val) { \
160 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.
int32_t transition_percentage
void guidance_h_read_rc(bool in_flight)
void guidance_h_set_pos(float x, float y)
Set horizontal position setpoint.
struct Int32Vect2 accel
with INT32_ACCEL_FRAC
uint8_t mask
bit 5: vx & vy, bit 6: vz, bit 7: vyaw
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)
struct Int32Vect2 pos
horizontal position setpoint in NED.
struct Int32Vect2 speed
with INT32_SPEED_FRAC
struct FloatEulers rc_sp
remote control setpoint
static void guidance_h_SetTau(float tau)
void guidance_h_guided_run(bool in_flight)
Run GUIDED mode control.
void guidance_h_from_nav(bool in_flight)
Set horizontal guidance from NAV and run control loop.
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 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 Int32Vect2 speed
only used in HOVER mode if GUIDANCE_H_USE_SPEED_REF or in GUIDED mode
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
void guidance_h_run(bool in_flight)
General stabilization interface for rotorcrafts.
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.