Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Fixedwing Navigation in a cube towards a center. More...
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 | |
bool_t | nav_cube_setup (uint8_t turb, uint8_t tb, uint8_t te) |
bool_t | 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 |
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.
struct NavCube |
Definition at line 99 of file nav_cube.h.
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 |
#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.
bool_t 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 at line 144 of file nav_cube.c.
References point::a, FALSE, NavCube::grid_z, ground_alt, nav_cube, NavCube::nline_x, NavCube::nline_z, waypoints, point::x, and point::y.
Definition at line 39 of file nav_cube.c.
References point::a, NavCube::alpha, FALSE, NavCube::grid_x, NavCube::grid_z, MAX_LINES_X, nav_cube, NavCube::nline_x, NavCube::nline_z, NavCube::nsect_x, NavCube::nsect_z, NavCube::offset, NavCube::sect, NavCube::size, STBY_OFFSET, waypoints, WaypointX, WaypointY, point::x, Int32Vect3::x, point::y, Int32Vect3::y, and Int32Vect3::z.
struct NavCube nav_cube |
Definition at line 37 of file nav_cube.c.
Referenced by nav_cube_run(), and nav_cube_setup().