Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/nav/nav_lace.h"
#include "firmwares/fixedwing/nav.h"
#include "state.h"
#include "autopilot.h"
#include "generated/flight_plan.h"
#include "modules/core/abi.h"
Go to the source code of this file.
Data Structures | |
struct | NavLace |
Macros | |
#define | NAV_LACE_RECOVER_MAX_TURN 1.5f |
#define | NAV_LACE_BORDER_FILTER 20.f |
#define | NAV_LACE_LWC_ID ABI_BROADCAST |
Enumerations | |
enum | LaceStatus { LACE_ENTER , LACE_INSIDE_START , LACE_INSIDE , LACE_OUTSIDE_START , LACE_OUTSIDE , LACE_RECOVER_START , LACE_RECOVER_INSIDE , LACE_RECOVER_OUTSIDE } |
enum | RotationDir { LACE_LEFT , LACE_RIGHT } |
Functions | |
static float | change_rep (float dir) |
static struct EnuCoor_f | process_new_point_lace (struct EnuCoor_f *position, float alt_sp, float uav_direction) |
static void | update_target_point (struct EnuCoor_f *target, struct EnuCoor_f *border, float dt, float tau) |
static void | lwc_cb (uint8_t sender_id UNUSED, uint32_t stamp UNUSED, int32_t data_type, uint32_t size, uint8_t *data) |
void | nav_lace_init (void) |
Init function called by modules init. | |
void | nav_lace_setup (float init_x, float init_y, float init_z, int turn, float desired_radius, float vx, float vy, float vz) |
Initialized the exploration with a first target point inside the cloud Called from flight plan or with mission parameters. | |
bool | nav_lace_run (void) |
Navigation function Called by flight plan or mission run function. | |
Variables | |
static struct NavLace | nav_lace |
static const float | nav_dt = 1.f / NAVIGATION_FREQUENCY |
static abi_event | lwc_ev |
Adaptive border pattern for cloud exploration
Definition in file nav_lace.c.
struct NavLace |
Definition at line 61 of file nav_lace.c.
Data Fields | ||
---|---|---|
struct EnuCoor_f | actual | |
struct EnuCoor_f | circle | |
float | direction | |
struct EnuCoor_f | estim_border | |
bool | inside_cloud | |
float | last_border_time | |
float | max_recover_radius | |
struct FloatVect3 | pos_incr | |
float | radius | |
float | radius_sign | |
struct EnuCoor_f | recover_circle | |
float | recover_radius | |
enum RotationDir | rotation | |
enum LaceStatus | status | |
struct EnuCoor_f | target |
Definition at line 42 of file nav_lace.c.
#define NAV_LACE_LWC_ID ABI_BROADCAST |
Definition at line 170 of file nav_lace.c.
Definition at line 38 of file nav_lace.c.
Enumerator | |
---|---|
LACE_ENTER | |
LACE_INSIDE_START | |
LACE_INSIDE | |
LACE_OUTSIDE_START | |
LACE_OUTSIDE | |
LACE_RECOVER_START | |
LACE_RECOVER_INSIDE | |
LACE_RECOVER_OUTSIDE |
Definition at line 45 of file nav_lace.c.
Enumerator | |
---|---|
LACE_LEFT | |
LACE_RIGHT |
Definition at line 56 of file nav_lace.c.
Definition at line 83 of file nav_lace.c.
Referenced by nav_lace_run().
|
static |
Definition at line 175 of file nav_lace.c.
References foo, NavLace::inside_cloud, and nav_lace.
Referenced by nav_lace_init().
Init function called by modules init.
Definition at line 181 of file nav_lace.c.
References DEFAULT_CIRCLE_RADIUS, foo, NavLace::inside_cloud, LACE_ENTER, NavLace::last_border_time, lwc_cb(), lwc_ev, NavLace::max_recover_radius, mission_register(), nav_lace, NAV_LACE_LWC_ID, NavLace::radius, NavLace::recover_radius, and NavLace::status.
Navigation function Called by flight plan or mission run function.
Definition at line 222 of file nav_lace.c.
References NavLace::actual, change_rep(), NavLace::circle, NavLace::direction, NavLace::estim_border, foo, get_sys_time_float(), ground_alt, NavLace::inside_cloud, LACE_ENTER, LACE_INSIDE, LACE_INSIDE_START, LACE_OUTSIDE, LACE_OUTSIDE_START, LACE_RECOVER_INSIDE, LACE_RECOVER_OUTSIDE, LACE_RECOVER_START, NavLace::last_border_time, NavLace::max_recover_radius, nav_circle_XY(), nav_dt, nav_init_stage(), nav_lace, NAV_LACE_BORDER_FILTER, NAV_LACE_RECOVER_MAX_TURN, nav_move_waypoint_enu(), nav_route_xy(), nav_send_waypoint(), NavCircleCountNoRewind, NavVerticalAltitudeMode, NavVerticalAutoThrottleMode, NavLace::pos_incr, process_new_point_lace(), NavLace::radius, NavLace::radius_sign, NavLace::recover_circle, NavLace::recover_radius, stateGetHorizontalSpeedDir_f(), stateGetPositionEnu_f(), NavLace::status, NavLace::target, time, update_target_point(), VECT3_ADD, EnuCoor_f::x, EnuCoor_f::y, FloatVect3::z, and EnuCoor_f::z.
void nav_lace_setup | ( | float | init_x, |
float | init_y, | ||
float | init_z, | ||
int | turn, | ||
float | desired_radius, | ||
float | vx, | ||
float | vy, | ||
float | vz | ||
) |
Initialized the exploration with a first target point inside the cloud Called from flight plan or with mission parameters.
Definition at line 197 of file nav_lace.c.
References NavLace::actual, foo, NavLace::inside_cloud, LACE_ENTER, LACE_LEFT, LACE_RIGHT, nav_dt, nav_lace, NavLace::pos_incr, NavLace::radius, NavLace::radius_sign, NavLace::rotation, stateGetPositionEnu_f(), NavLace::status, NavLace::target, and VECT3_ASSIGN.
|
static |
Definition at line 88 of file nav_lace.c.
References foo, LACE_LEFT, LACE_RIGHT, nav_lace, NavLace::radius, NavLace::rotation, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by nav_lace_run().
|
static |
Definition at line 108 of file nav_lace.c.
References alpha, foo, and target.
Referenced by nav_lace_run().
|
static |
Definition at line 173 of file nav_lace.c.
Referenced by nav_lace_init().
|
static |
Definition at line 81 of file nav_lace.c.
Referenced by nav_lace_run(), and nav_lace_setup().
|
static |
Definition at line 79 of file nav_lace.c.
Referenced by lwc_cb(), nav_lace_init(), nav_lace_run(), nav_lace_setup(), and process_new_point_lace().