|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
28 #include "generated/airframe.h"
34 #define GH_MAX_SPEED_REF_FRAC 7
37 #ifndef GUIDANCE_H_REF_OMEGA
38 #define GUIDANCE_H_REF_OMEGA RadOfDeg(67.)
41 #ifndef GUIDANCE_H_REF_ZETA
42 #define GUIDANCE_H_REF_ZETA 0.85
45 #define GH_ZETA_OMEGA_FRAC 10
46 #define GH_OMEGA_2_FRAC 7
50 #ifndef GUIDANCE_H_REF_TAU
51 #define GUIDANCE_H_REF_TAU 0.5
53 #define GH_REF_INV_TAU_FRAC 16
174 float f_route_ref = atan2f(-ref_vector->
y, -ref_vector->
x);
188 if (ref_vector->
x == 0 && ref_vector->
y == 0) {
209 if (ref_vector->
x == 0 && ref_vector->
y == 0) {
224 if (ref_vector->
x == 0 && ref_vector->
y == 0) {
struct FloatVect3 speed_sp
#define GH_MAX_SPEED_REF_FRAC
#define GUIDANCE_H_REF_TAU
first order time constant
struct Int32Vect2 max_accel
#define VECT2_SMUL(_vo, _vi, _s)
static void gh_compute_ref_max_accel(struct Int32Vect2 *ref_vector)
struct GuidanceHRef gh_ref
float gh_set_omega(float omega)
#define GUIDANCE_H_REF_ZETA
default second order model damping
#define GH_ACCEL_REF_FRAC
#define PPRZ_ITRIG_COS(_c, _a)
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...
#define VECT2_ADD(_a, _b)
struct Int32Vect2 speed
Reference model speed.
float gh_set_tau(float tau)
#define VECT2_DIFF(_c, _a, _b)
void gh_update_ref_from_speed_sp(struct Int32Vect2 speed_sp)
static void gh_saturate_ref_speed(void)
Saturate ref speed and adjust acceleration accordingly.
#define GH_SPEED_REF_FRAC
void gh_update_ref_from_pos_sp(struct Int32Vect2 pos_sp)
#define ANGLE_BFP_OF_REAL(_af)
#define GH_ZETA_OMEGA_FRAC
#define INT_MULT_RSHIFT(_a, _b, _r)
#define GH_REF_INV_TAU_FRAC
static void gh_saturate_ref_accel(void)
saturate reference accelerations
#define BFP_OF_REAL(_vr, _frac)
float tau
first order time constant
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
static void gh_compute_ref_max_speed(struct Int32Vect2 *ref_vector)
static void gh_compute_ref_max(struct Int32Vect2 *ref_vector)
#define GUIDANCE_H_REF_MAX_ACCEL
Accel saturation.
#define INT32_VECT2_RSHIFT(_o, _i, _r)
void gh_set_ref(struct Int32Vect2 pos, struct Int32Vect2 speed, struct Int32Vect2 accel)
#define INT32_VECT2_LSHIFT(_o, _i, _l)
struct Int32Vect2 max_vel
#define VECT2_SUM(_c, _a, _b)
static const int32_t gh_max_accel
struct Int32Vect2 accel
Reference model acceleration.
float gh_set_zeta(float zeta)
float gh_set_max_speed(float max_speed)
Set a new maximum speed for waypoint navigation.
float zeta
second order model damping
static void gh_compute_route_ref(struct Int32Vect2 *ref_vector)
float max_speed
Current maximum speed for waypoint navigation.
float omega
second order model natural frequency
struct Int64Vect2 pos
Reference model position.
#define GUIDANCE_H_REF_OMEGA
default second order model natural frequency
#define GUIDANCE_H_REF_MAX_SPEED
Default speed saturation.
#define PPRZ_ITRIG_SIN(_s, _a)