Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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 void nav_cube_setup(uint8_t turb, uint8_t tb, uint8_t te);
126 extern bool 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.offset.x=i; }
138 #define nav_cube_SetOffsY(i) { nav_cube.offset.y=i; }
139 #define nav_cube_SetOffsZ(i) { nav_cube.offset.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 */
nav_cube_setup
void nav_cube_setup(uint8_t turb, uint8_t tb, uint8_t te)
Definition: nav_cube.c:39
NavCube::nsect_z
int32_t nsect_z
number of sectors vertical
Definition: nav_cube.h:118
NavCube::nline_z
int32_t nline_z
number of lines z (vertical)
Definition: nav_cube.h:120
nav_cube
struct NavCube nav_cube
Definition: nav_cube.c:37
pprz_algebra_int.h
Paparazzi fixed point algebra.
std.h
nav_cube_run
bool nav_cube_run(int8_t j, int8_t i, uint8_t dest_b, uint8_t dest_e, uint8_t src_b, uint8_t src_e)
Definition: nav_cube.c:142
NavCube::alpha
int32_t alpha
angle in degrees of flight direction to north, clockwise
Definition: nav_cube.h:113
NavCube::nsect_x
int32_t nsect_x
number of sectors horizontal
Definition: nav_cube.h:117
NavCube::size
struct Int32Vect3 size
size of the cube.
Definition: nav_cube.h:105
Int32Vect3
Definition: pprz_algebra_int.h:88
uint8_t
unsigned char uint8_t
Definition: types.h:14
NavCube::sect
int32_t sect
sector to fly in (1..[nsect_x*nsect_z])
Definition: nav_cube.h:116
NavCube::nline_x
int32_t nline_x
number of lines x (horizontal)
Definition: nav_cube.h:119
NavCube
Definition: nav_cube.h:99
NavCube::grid_x
int32_t grid_x
grid distance x (horizontal)
Definition: nav_cube.h:114
NavCube::grid_z
int32_t grid_z
grid distance z (vertical)
Definition: nav_cube.h:115
int8_t
signed char int8_t
Definition: types.h:15
int32_t
signed long int32_t
Definition: types.h:19
NavCube::offset
struct Int32Vect3 offset
offset to center.
Definition: nav_cube.h:112