Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
guidance_v_ref.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
3  * Copyright (C) 2013 Gautier Hattenberger
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22 
28 #ifndef GUIDANCE_V_REF_H
29 #define GUIDANCE_V_REF_H
30 
31 #include "inttypes.h"
32 #include "math/pprz_algebra.h"
33 #include "math/pprz_algebra_int.h"
34 
37 #define GV_FREQ_FRAC 9
38 #define GV_FREQ (1<<GV_FREQ_FRAC)
39 
44 extern int32_t gv_zdd_ref;
45 
47 #define GV_ZDD_REF_FRAC 8
48 
53 extern int32_t gv_zd_ref;
54 
56 #define GV_ZD_REF_FRAC (GV_ZDD_REF_FRAC + GV_FREQ_FRAC)
57 
62 extern int64_t gv_z_ref;
63 
65 #define GV_Z_REF_FRAC (GV_ZD_REF_FRAC + GV_FREQ_FRAC)
66 
67 extern void gv_set_ref(int32_t alt, int32_t speed, int32_t accel);
68 extern void gv_update_ref_from_z_sp(int32_t z_sp);
69 extern void gv_update_ref_from_zd_sp(int32_t zd_sp);
70 
71 #endif /* GUIDANCE_V_REF_H */
int32_t gv_zdd_ref
reference model vertical accel in meters/s^2 (output) fixed point representation with GV_ZDD_REF_FRAC...
int32_t gv_zd_ref
reference model vertical speed in meters/sec (output) fixed point representation with GV_ZD_REF_FRAC ...
void gv_update_ref_from_zd_sp(int32_t zd_sp)
void gv_update_ref_from_z_sp(int32_t z_sp)
signed long long int64_t
Definition: types.h:21
void gv_set_ref(int32_t alt, int32_t speed, int32_t accel)
int64_t gv_z_ref
reference model altitude in meters (output) fixed point representation with GV_Z_REF_FRAC Q37...
signed long int32_t
Definition: types.h:19
Paparazzi fixed point algebra.