Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nav_cube.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Martin Mueller
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
93 #ifndef NAV_CUBE_H
94 #define NAV_CUBE_H
95 
96 #include "std.h"
97 #include "math/pprz_algebra_int.h"
98 
99 struct NavCube {
105  struct Int32Vect3 size;
106 
121 };
122 
123 extern struct NavCube nav_cube;
124 
125 extern bool_t nav_cube_setup(uint8_t turb, uint8_t tb, uint8_t te);
126 bool_t nav_cube_run(int8_t j, int8_t i,
127  uint8_t dest_b, uint8_t dest_e,
128  uint8_t src_b, uint8_t src_e);
129 
130 #define nav_cube_SetAlpha(i) { nav_cube.alpha=i; }
131 #define nav_cube_SetSect(i) { nav_cube.sect=i; }
132 #define nav_cube_SetGridX(i) { nav_cube.grid_x=i; }
133 #define nav_cube_SetGridZ(i) { nav_cube.grid_z=i; }
134 #define nav_cube_SetSizeX(i) { nav_cube.size.x=i; }
135 #define nav_cube_SetSizeY(i) { nav_cube.size.y=i; }
136 #define nav_cube_SetSizeZ(i) { nav_cube.size.z=i; }
137 #define nav_cube_SetOffsX(i) { nav_cube.offs.x=i; }
138 #define nav_cube_SetOffsY(i) { nav_cube.offs.y=i; }
139 #define nav_cube_SetOffsZ(i) { nav_cube.offs.z=i; }
140 #define nav_cube_SetNSectX(i) { nav_cube.nsect_x=i; }
141 #define nav_cube_SetNSectZ(i) { nav_cube.nsect_z=i; }
142 
143 
144 #endif /* NAV_CUBE_H */
int32_t sect
sector to fly in (1..[nsect_x*nsect_z])
Definition: nav_cube.h:116
int32_t nline_x
number of lines x (horizontal)
Definition: nav_cube.h:119
int32_t nsect_z
number of sectors vertical
Definition: nav_cube.h:118
struct Int32Vect3 offset
offset to center.
Definition: nav_cube.h:112
int32_t nsect_x
number of sectors horizontal
Definition: nav_cube.h:117
struct Int32Vect3 size
size of the cube.
Definition: nav_cube.h:105
int32_t alpha
angle in degrees of flight direction to north, clockwise
Definition: nav_cube.h:113
signed long int32_t
Definition: types.h:19
unsigned char uint8_t
Definition: types.h:14
int32_t grid_x
grid distance x (horizontal)
Definition: nav_cube.h:114
signed char int8_t
Definition: types.h:15
int32_t grid_z
grid distance z (vertical)
Definition: nav_cube.h:115
int32_t nline_z
number of lines z (vertical)
Definition: nav_cube.h:120
Paparazzi fixed point algebra.