27 #ifndef GUIDANCE_H_REF_H
28 #define GUIDANCE_H_REF_H
33 #include "generated/airframe.h"
36 #ifndef GUIDANCE_H_REF_MAX_SPEED
37 #define GUIDANCE_H_REF_MAX_SPEED 5.
48 #ifndef GUIDANCE_H_REF_MAX_ACCEL
49 #define GUIDANCE_H_REF_MAX_ACCEL 5.66
54 #define GH_FREQ_FRAC 9
55 #define GH_FREQ (1<<GH_FREQ_FRAC)
57 #define GH_ACCEL_REF_FRAC 8
58 #define GH_SPEED_REF_FRAC (GH_ACCEL_REF_FRAC + GH_FREQ_FRAC)
59 #define GH_POS_REF_FRAC (GH_SPEED_REF_FRAC + GH_FREQ_FRAC)
struct GuidanceHRef gh_ref
float gh_max_speed
Current maximum speed for waypoint navigation.
void gh_update_ref_from_pos_sp(struct Int32Vect2 pos_sp)
float gh_set_zeta(float zeta)
void gh_update_ref_from_speed_sp(struct Int32Vect2 speed_sp)
struct Int64Vect2 pos
Reference model position.
float gh_set_omega(float omega)
Paparazzi generic algebra macros.
float max_speed
Current maximum speed for waypoint navigation.
float tau
first order time constant
struct Int32Vect2 max_vel
float gh_set_tau(float tau)
float gh_set_max_speed(float max_speed)
Set a new maximum speed for waypoint navigation.
struct Int32Vect2 speed
Reference model speed.
float omega
second order model natural frequency
int32_t max_speed_int
gh_max_speed in fixed point representation with GH_MAX_SPEED_REF_FRAC must be limited to 2^14 to avoi...
struct Int32Vect2 accel
Reference model acceleration.
struct Int32Vect2 max_accel
float zeta
second order model damping
void gh_set_ref(struct Int32Vect2 pos, struct Int32Vect2 speed, struct Int32Vect2 accel)
Paparazzi fixed point algebra.