Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
guidance_v_ref.h File Reference
#include "generated/airframe.h"
#include "inttypes.h"
#include "math/pprz_algebra.h"
#include "math/pprz_algebra_int.h"
+ Include dependency graph for guidance_v_ref.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GV_FREQ_FRAC   9
 
#define GV_FREQ   (1<<GV_FREQ_FRAC)
 
#define GV_ZDD_REF_FRAC   8
 number of bits for the fractional part of gv_zdd_ref More...
 
#define GV_ZD_REF_FRAC   (GV_ZDD_REF_FRAC + GV_FREQ_FRAC)
 number of bits for the fractional part of gv_zd_ref More...
 
#define GV_Z_REF_FRAC   (GV_ZD_REF_FRAC + GV_FREQ_FRAC)
 number of bits for the fractional part of gv_z_ref More...
 
#define GUIDANCE_V_REF_MIN_ZDD   (-2.0*9.81)
 
#define GV_MIN_ZDD   BFP_OF_REAL(GUIDANCE_V_REF_MIN_ZDD, GV_ZDD_REF_FRAC)
 
#define GUIDANCE_V_REF_MAX_ZDD   ( 0.8*9.81)
 
#define GV_MAX_ZDD   BFP_OF_REAL(GUIDANCE_V_REF_MAX_ZDD, GV_ZDD_REF_FRAC)
 
#define GUIDANCE_V_REF_MIN_ZD   (-3.)
 
#define GV_MIN_ZD   BFP_OF_REAL(GUIDANCE_V_REF_MIN_ZD , GV_ZD_REF_FRAC)
 
#define GUIDANCE_V_REF_MAX_ZD   ( 3.)
 
#define GV_MAX_ZD   BFP_OF_REAL(GUIDANCE_V_REF_MAX_ZD , GV_ZD_REF_FRAC)
 
#define GUIDANCE_V_REF_OMEGA   RadOfDeg(100.)
 
#define GUIDANCE_V_REF_ZETA   0.85
 
#define GV_ZETA_OMEGA_FRAC   10
 
#define GV_ZETA_OMEGA   BFP_OF_REAL((GUIDANCE_V_REF_ZETA*GUIDANCE_V_REF_OMEGA), GV_ZETA_OMEGA_FRAC)
 
#define GV_OMEGA_2_FRAC   7
 
#define GV_OMEGA_2   BFP_OF_REAL((GUIDANCE_V_REF_OMEGA*GUIDANCE_V_REF_OMEGA), GV_OMEGA_2_FRAC)
 
#define GV_REF_THAU_F   0.25
 
#define GV_REF_INV_THAU_FRAC   16
 
#define GV_REF_INV_THAU   BFP_OF_REAL((1./0.25), GV_REF_INV_THAU_FRAC)
 

Functions

static void gv_set_ref (int32_t alt, int32_t speed, int32_t accel)
 
static void gv_update_ref_from_z_sp (int32_t z_sp)
 
static void gv_update_ref_from_zd_sp (int32_t zd_sp)
 
 __attribute__ ((always_inline)) static inline void gv_set_ref(int32_t alt
 

Variables

int32_t gv_zdd_ref = accel>>(INT32_ACCEL_FRAC - GV_ZDD_REF_FRAC)
 reference model vertical accel in meters/s^2 (output) fixed point representation with GV_ZDD_REF_FRAC Q23.8 : accuracy 0.0039 , range 8388km/s^2 More...
 
int32_t gv_zd_ref = speed>>(INT32_SPEED_FRAC - GV_ZD_REF_FRAC)
 reference model vertical speed in meters/sec (output) fixed point representation with GV_ZD_REF_FRAC Q14.17 : accuracy 0.0000076 , range 16384m/s2 More...
 
int64_t gv_z_ref = new_z
 reference model altitude in meters (output) fixed point representation with GV_Z_REF_FRAC Q37.26 : More...
 
int32_t speed
 
int32_t int32_t accel
 

Macro Definition Documentation

#define GUIDANCE_V_REF_MAX_ZD   ( 3.)

Definition at line 83 of file guidance_v_ref.h.

#define GUIDANCE_V_REF_MAX_ZDD   ( 0.8*9.81)

Definition at line 73 of file guidance_v_ref.h.

#define GUIDANCE_V_REF_MIN_ZD   (-3.)

Definition at line 78 of file guidance_v_ref.h.

#define GUIDANCE_V_REF_MIN_ZDD   (-2.0*9.81)

Definition at line 68 of file guidance_v_ref.h.

#define GUIDANCE_V_REF_OMEGA   RadOfDeg(100.)

Definition at line 89 of file guidance_v_ref.h.

#define GUIDANCE_V_REF_ZETA   0.85

Definition at line 92 of file guidance_v_ref.h.

#define GV_FREQ   (1<<GV_FREQ_FRAC)

Definition at line 37 of file guidance_v_ref.h.

#define GV_FREQ_FRAC   9

Definition at line 36 of file guidance_v_ref.h.

Definition at line 85 of file guidance_v_ref.h.

Referenced by __attribute__().

Definition at line 75 of file guidance_v_ref.h.

Referenced by __attribute__().

Definition at line 80 of file guidance_v_ref.h.

Referenced by __attribute__().

Definition at line 70 of file guidance_v_ref.h.

Referenced by __attribute__().

Definition at line 97 of file guidance_v_ref.h.

Referenced by __attribute__().

#define GV_OMEGA_2_FRAC   7

Definition at line 96 of file guidance_v_ref.h.

Referenced by __attribute__().

#define GV_REF_INV_THAU   BFP_OF_REAL((1./0.25), GV_REF_INV_THAU_FRAC)

Definition at line 102 of file guidance_v_ref.h.

#define GV_REF_INV_THAU_FRAC   16

Definition at line 101 of file guidance_v_ref.h.

#define GV_REF_THAU_F   0.25

Definition at line 100 of file guidance_v_ref.h.

#define GV_Z_REF_FRAC   (GV_ZD_REF_FRAC + GV_FREQ_FRAC)

number of bits for the fractional part of gv_z_ref

Definition at line 64 of file guidance_v_ref.h.

Referenced by __attribute__().

#define GV_ZD_REF_FRAC   (GV_ZDD_REF_FRAC + GV_FREQ_FRAC)

number of bits for the fractional part of gv_zd_ref

Definition at line 55 of file guidance_v_ref.h.

Referenced by __attribute__().

#define GV_ZDD_REF_FRAC   8

number of bits for the fractional part of gv_zdd_ref

Definition at line 46 of file guidance_v_ref.h.

Referenced by __attribute__().

Definition at line 95 of file guidance_v_ref.h.

Referenced by __attribute__().

#define GV_ZETA_OMEGA_FRAC   10

Definition at line 94 of file guidance_v_ref.h.

Referenced by __attribute__().

Function Documentation

static void gv_set_ref ( int32_t  alt,
int32_t  speed,
int32_t  accel 
)
inlinestatic
static void gv_update_ref_from_z_sp ( int32_t  z_sp)
inlinestatic

Referenced by guidance_v_run().

+ Here is the caller graph for this function:

static void gv_update_ref_from_zd_sp ( int32_t  zd_sp)
inlinestatic

Referenced by guidance_v_run().

+ Here is the caller graph for this function:

Variable Documentation

Initial value:
{
#define GV_Z_REF_FRAC
number of bits for the fractional part of gv_z_ref
#define INT32_POS_FRAC
signed long long int64_t
Definition: types.h:21

Definition at line 113 of file guidance_v_ref.h.

int64_t gv_z_ref = new_z

reference model altitude in meters (output) fixed point representation with GV_Z_REF_FRAC Q37.26 :

Definition at line 109 of file guidance_v_ref.h.

Referenced by __attribute__().

reference model vertical speed in meters/sec (output) fixed point representation with GV_ZD_REF_FRAC Q14.17 : accuracy 0.0000076 , range 16384m/s2

Definition at line 110 of file guidance_v_ref.h.

Referenced by __attribute__().

reference model vertical accel in meters/s^2 (output) fixed point representation with GV_ZDD_REF_FRAC Q23.8 : accuracy 0.0039 , range 8388km/s^2

Definition at line 111 of file guidance_v_ref.h.

Referenced by __attribute__().

int32_t speed

Definition at line 113 of file guidance_v_ref.h.

Referenced by parse_nmea_GPRMC().