29 #include "generated/airframe.h"
32 #include "generated/flight_plan.h"
35 #define STBY_OFFSET 500
42 int32_t j, start_bx, start_by, start_bz, start_ex, start_ey, start_ez;
44 float alpha, cos_alpha, sin_alpha;
45 int32_t cube_nline_x_t, cube_nline_z_t;
47 int32_t cube_line_x_start, cube_line_x_end;
48 int32_t cube_line_z_start, cube_line_z_end;
76 cube_line_x_end = ((cube_pos_x + 1) * cube_nline_x_t) /
nav_cube.
nsect_x;
77 if (cube_line_x_end > cube_nline_x_t) {
78 cube_line_x_end = cube_nline_x_t;
88 cube_line_z_end = ((cube_pos_z + 1) * cube_nline_z_t) /
nav_cube.
nsect_z;
93 cos_alpha = cos(alpha);
94 sin_alpha = sin(alpha);
122 int i = cube_line_x_start + j;
int32_t nline_z
number of lines z (vertical)
int32_t nsect_z
number of sectors vertical
float ground_alt
size == nb_waypoint, waypoint 0 is a dummy waypoint
int32_t grid_z
grid distance z (vertical)
int32_t nsect_x
number of sectors horizontal
int32_t nline_x
number of lines x (horizontal)
struct Int32Vect3 size
size of the cube.
int32_t sect
sector to fly in (1..[nsect_x*nsect_z])
int32_t grid_x
grid distance x (horizontal)
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
struct Int32Vect3 offset
offset to center.
int32_t alpha
angle in degrees of flight direction to north, clockwise
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)
Fixedwing Navigation in a cube towards a center.
Fixedwing Navigation library.
void nav_cube_setup(uint8_t center, uint8_t tb, uint8_t te)