28 #include "generated/airframe.h"
35 #ifndef GUIDANCE_H_REF_OMEGA
36 #define GUIDANCE_H_REF_OMEGA RadOfDeg(67.)
39 #ifndef GUIDANCE_H_REF_ZETA
40 #define GUIDANCE_H_REF_ZETA 0.85f
44 #ifndef GUIDANCE_H_REF_TAU
45 #define GUIDANCE_H_REF_TAU 0.5f
59 gh_ref.
dt = (1.0f/PERIODIC_FREQUENCY);
#define VECT2_ADD(_a, _b)
#define VECT2_SMUL(_vo, _vi, _s)
#define VECT2_DIFF(_c, _a, _b)
#define VECT2_COPY(_a, _b)
#define POS_FLOAT_OF_BFP(_ai)
#define LBFP_OF_REAL(_vr, _frac)
float gh_set_zeta(float zeta)
static void gh_saturate_speed(struct FloatVect2 *speed_sp)
void gh_set_ref(struct Int32Vect2 pos, struct FloatVect2 speed, struct FloatVect2 accel)
#define GUIDANCE_H_REF_TAU
first order time constant
void gh_update_ref_from_accel_sp(struct FloatVect2 accel_sp)
static void gh_saturate_accel(struct FloatVect2 *accel_sp)
float gh_set_tau(float tau)
static const float gh_max_accel
float gh_set_omega(float omega)
void gh_update_ref_from_pos_sp(struct Int32Vect2 pos_sp)
void gh_update_ref_from_speed_sp(struct FloatVect2 speed_sp)
#define GUIDANCE_H_REF_OMEGA
default second order model natural frequency
struct GuidanceHRef gh_ref
float gh_set_max_speed(float max_speed)
Set a new maximum speed for waypoint navigation.
#define GUIDANCE_H_REF_ZETA
default second order model damping
Reference generation for horizontal guidance.
float zeta
second order model damping
#define GH_POS_REF_FRAC
fixedpoint representation: Q26.37 will give a range of 67e3 km and a resolution of 1....
struct FloatVect2 accel
Reference model acceleration.
float tau
first order time constant
#define GUIDANCE_H_REF_MAX_SPEED
Default speed saturation.
float omega
second order model natural frequency
struct Int64Vect2 pos
Reference model position.
#define GUIDANCE_H_REF_MAX_ACCEL
Accel saturation.
struct FloatVect2 speed
Reference model speed.
float dt
Integration timestep.
float max_speed
Current maximum speed for waypoint navigation.
struct FloatVect3 speed_sp