29#include "generated/airframe.h"
51#ifndef GUIDANCE_V_REF_MIN_ZDD
52#define GUIDANCE_V_REF_MIN_ZDD (-2.0*9.81)
54#define GV_MIN_ZDD BFP_OF_REAL(GUIDANCE_V_REF_MIN_ZDD, GV_ZDD_REF_FRAC)
56#ifndef GUIDANCE_V_REF_MAX_ZDD
57#define GUIDANCE_V_REF_MAX_ZDD ( 0.8*9.81)
59#define GV_MAX_ZDD BFP_OF_REAL(GUIDANCE_V_REF_MAX_ZDD, GV_ZDD_REF_FRAC)
62#ifndef GUIDANCE_V_REF_MAX_Z_DIFF
63#define GUIDANCE_V_REF_MAX_Z_DIFF 10.0
65#define GV_MAX_Z_DIFF BFP_OF_REAL(GUIDANCE_V_REF_MAX_Z_DIFF, GV_Z_REF_FRAC)
67#define GV_MIN_ZD BFP_OF_REAL(GUIDANCE_V_REF_MIN_ZD , GV_ZD_REF_FRAC)
68#define GV_MAX_ZD BFP_OF_REAL(GUIDANCE_V_REF_MAX_ZD , GV_ZD_REF_FRAC)
71#ifndef GUIDANCE_V_REF_OMEGA
72#define GUIDANCE_V_REF_OMEGA RadOfDeg(100.)
74#ifndef GUIDANCE_V_REF_ZETA
75#define GUIDANCE_V_REF_ZETA 0.85
77#define GV_ZETA_OMEGA_FRAC 10
78#define GV_ZETA_OMEGA BFP_OF_REAL((GUIDANCE_V_REF_ZETA*GUIDANCE_V_REF_OMEGA), GV_ZETA_OMEGA_FRAC)
79#define GV_OMEGA_2_FRAC 7
80#define GV_OMEGA_2 BFP_OF_REAL((GUIDANCE_V_REF_OMEGA*GUIDANCE_V_REF_OMEGA), GV_OMEGA_2_FRAC)
83#define GV_REF_THAU_F 0.25
84#define GV_REF_INV_THAU_FRAC 16
85#define GV_REF_INV_THAU BFP_OF_REAL((1./0.25), GV_REF_INV_THAU_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.
#define GV_REF_INV_THAU_FRAC
#define GV_ZETA_OMEGA_FRAC
int32_t gv_zd_ref
reference model vertical speed in meters/sec (output) fixed point representation with GV_ZD_REF_FRAC ...
Reference generation for vertical guidance.
#define GV_ZD_REF_FRAC
number of bits for the fractional part of gv_zd_ref
#define GV_Z_REF_FRAC
number of bits for the fractional part of gv_z_ref
#define GV_ZDD_REF_FRAC
number of bits for the fractional part of gv_zdd_ref
int int32_t
Typedef defining 32 bit int type.