28 #ifndef GUIDANCE_V_REF_H
29 #define GUIDANCE_V_REF_H
34 #include "generated/airframe.h"
36 #ifndef GUIDANCE_V_REF_MIN_ZD
37 #define GUIDANCE_V_REF_MIN_ZD (-3.)
40 #ifndef GUIDANCE_V_REF_MAX_ZD
41 #define GUIDANCE_V_REF_MAX_ZD ( 3.)
47 #define GV_FREQ_FRAC 9
48 #define GV_FREQ (1<<GV_FREQ_FRAC)
57 #define GV_ZDD_REF_FRAC 8
66 #define GV_ZD_REF_FRAC (GV_ZDD_REF_FRAC + GV_FREQ_FRAC)
75 #define GV_Z_REF_FRAC (GV_ZD_REF_FRAC + GV_FREQ_FRAC)
int32_t gv_zdd_ref
reference model vertical accel in meters/s^2 (output) fixed point representation with GV_ZDD_REF_FRAC...
int64_t gv_z_ref
reference model altitude in meters (output) fixed point representation with GV_Z_REF_FRAC Q37....
void gv_set_ref(int32_t alt, int32_t speed, int32_t accel)
void gv_update_ref_from_z_sp(int32_t z_sp)
void gv_update_ref_from_zd_sp(int32_t zd_sp, int32_t z_pos)
update vertical reference from speed setpoint.
int32_t gv_zd_ref
reference model vertical speed in meters/sec (output) fixed point representation with GV_ZD_REF_FRAC ...
Paparazzi generic algebra macros.
Paparazzi fixed point algebra.
int int32_t
Typedef defining 32 bit int type.