Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nav_cube.h File Reference

Fixedwing Navigation in a cube towards a center. More...

#include "std.h"
#include "math/pprz_algebra_int.h"
+ Include dependency graph for nav_cube.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NavCube
 

Macros

#define nav_cube_SetAlpha(i)   { nav_cube.alpha=i; }
 
#define nav_cube_SetSect(i)   { nav_cube.sect=i; }
 
#define nav_cube_SetGridX(i)   { nav_cube.grid_x=i; }
 
#define nav_cube_SetGridZ(i)   { nav_cube.grid_z=i; }
 
#define nav_cube_SetSizeX(i)   { nav_cube.size.x=i; }
 
#define nav_cube_SetSizeY(i)   { nav_cube.size.y=i; }
 
#define nav_cube_SetSizeZ(i)   { nav_cube.size.z=i; }
 
#define nav_cube_SetOffsX(i)   { nav_cube.offs.x=i; }
 
#define nav_cube_SetOffsY(i)   { nav_cube.offs.y=i; }
 
#define nav_cube_SetOffsZ(i)   { nav_cube.offs.z=i; }
 
#define nav_cube_SetNSectX(i)   { nav_cube.nsect_x=i; }
 
#define nav_cube_SetNSectZ(i)   { nav_cube.nsect_z=i; }
 

Functions

void nav_cube_setup (uint8_t turb, uint8_t tb, uint8_t te)
 
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)
 

Variables

struct NavCube nav_cube
 

Detailed Description

Fixedwing Navigation in a cube towards a center.

* from above:
*
* | (offs_x)
*
* o [x, y]    -
* |
* | (offs_y)
* |
* -
* ^  ^  ^  ^  ^     |
* |  |  |  |  |     |
* |  |  |  |  |     | (size_y)
* |  |  |  |  |     |
* |  |  |  |  |     |
* -
* |--|
* (grid_x)
*
* |-----------|
* (size_x)
*
*
* side view:
*
* --------->                    -           -
* | (grid_z)  |
* --------->                    -           |
* -           | (size_z)
* --------->                    | (offs_z)  |
* o [alt]    -           |
* --------->                                -
*
* |----------|--------|
* (size_y)  (offs_y)
*
*
* back view, 1x1 sector:
*
* -------
* |       |
* |   1   |  ^
* |       |  |
* s-------   |
*
* ---->
*
*
* back view, 3x2 sectors:
*
* ------- ------- -------
* |       |       |       |
* |   4   |   5   |   6   |  ^
* |       |       |       |  |
* s-------s-------s-------   |
* |       |       |       |
* |   1   |   2   |   3   |  ^
* |       |       |       |  |
* s-------s-------s-------   | (nsect_z)
*
* ---->   ---->   ---->
* (nsect_x)
* 

Definition in file nav_cube.h.


Data Structure Documentation

struct NavCube

Definition at line 99 of file nav_cube.h.

+ Collaboration diagram for NavCube:
Data Fields
int32_t alpha angle in degrees of flight direction to north, clockwise
int32_t grid_x grid distance x (horizontal)
int32_t grid_z grid distance z (vertical)
int32_t nline_x number of lines x (horizontal)
int32_t nline_z number of lines z (vertical)
int32_t nsect_x number of sectors horizontal
int32_t nsect_z number of sectors vertical
struct Int32Vect3 offset offset to center.

x: horizontal, y: in direction, z: vertical

int32_t sect sector to fly in (1..[nsect_x*nsect_z])
struct Int32Vect3 size size of the cube.

x: perpendicular to flight dir, y: in flight dir, z: height

Macro Definition Documentation

#define nav_cube_SetAlpha (   i)    { nav_cube.alpha=i; }

Definition at line 130 of file nav_cube.h.

#define nav_cube_SetGridX (   i)    { nav_cube.grid_x=i; }

Definition at line 132 of file nav_cube.h.

#define nav_cube_SetGridZ (   i)    { nav_cube.grid_z=i; }

Definition at line 133 of file nav_cube.h.

#define nav_cube_SetNSectX (   i)    { nav_cube.nsect_x=i; }

Definition at line 140 of file nav_cube.h.

#define nav_cube_SetNSectZ (   i)    { nav_cube.nsect_z=i; }

Definition at line 141 of file nav_cube.h.

#define nav_cube_SetOffsX (   i)    { nav_cube.offs.x=i; }

Definition at line 137 of file nav_cube.h.

#define nav_cube_SetOffsY (   i)    { nav_cube.offs.y=i; }

Definition at line 138 of file nav_cube.h.

#define nav_cube_SetOffsZ (   i)    { nav_cube.offs.z=i; }

Definition at line 139 of file nav_cube.h.

#define nav_cube_SetSect (   i)    { nav_cube.sect=i; }

Definition at line 131 of file nav_cube.h.

#define nav_cube_SetSizeX (   i)    { nav_cube.size.x=i; }

Definition at line 134 of file nav_cube.h.

#define nav_cube_SetSizeY (   i)    { nav_cube.size.y=i; }

Definition at line 135 of file nav_cube.h.

#define nav_cube_SetSizeZ (   i)    { nav_cube.size.z=i; }

Definition at line 136 of file nav_cube.h.

Function Documentation

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 
)

Variable Documentation

struct NavCube nav_cube

Definition at line 37 of file nav_cube.c.

Referenced by nav_cube_run(), and nav_cube_setup().