Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Adaptive flower pattern for cloud exploration. More...
#include "modules/nav/nav_rosette.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 | NavRosette |
Macros | |
#define | NAV_ROSETTE_RECOVER_MAX_TURN 1.5f |
#define | NAV_ROSETTE_BORDER_FILTER 60.f |
#define | NAV_ROSETTE_LWC_ID ABI_BROADCAST |
Enumerations | |
enum | RosetteStatus { RSTT_ENTER , RSTT_CROSSING_FIRST , RSTT_CROSSING_START , RSTT_CROSSING , RSTT_TURNING_START , RSTT_TURNING , RSTT_RECOVER_START , RSTT_RECOVER_OUTSIDE } |
enum | RotationDir { LACE_LEFT , LACE_RIGHT , RSTT_LEFT , RSTT_RIGHT , TRINITY_LEFT , TRINITY_RIGHT } |
Functions | |
static float | change_rep (float dir) |
static void | update_barycenter (struct EnuCoor_f *bary, struct EnuCoor_f *border, struct EnuCoor_f *first, float alt_sp, float dt, float tau) |
static struct EnuCoor_f | process_new_point_rosette (struct EnuCoor_f *position, float uav_direction) |
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_rosette_init (void) |
Init function called by modules init. More... | |
void | nav_rosette_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. More... | |
bool | nav_rosette_run (void) |
Navigation function Called by flight plan or mission run function. More... | |
Variables | |
static struct NavRosette | nav_rosette |
static const float | nav_dt = 1.f / NAVIGATION_FREQUENCY |
static abi_event | lwc_ev |
Adaptive flower pattern for cloud exploration.
Definition in file nav_rosette.c.
struct NavRosette |
Definition at line 60 of file nav_rosette.c.
Data Fields | ||
---|---|---|
struct EnuCoor_f | actual | |
struct EnuCoor_f | circle | |
float | direction | |
struct EnuCoor_f | estim_border | |
struct EnuCoor_f * | first | |
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 RosetteStatus | status | |
struct EnuCoor_f | target |
#define NAV_ROSETTE_BORDER_FILTER 60.f |
Definition at line 41 of file nav_rosette.c.
#define NAV_ROSETTE_LWC_ID ABI_BROADCAST |
Definition at line 179 of file nav_rosette.c.
#define NAV_ROSETTE_RECOVER_MAX_TURN 1.5f |
Definition at line 37 of file nav_rosette.c.
enum RosetteStatus |
Enumerator | |
---|---|
RSTT_ENTER | |
RSTT_CROSSING_FIRST | |
RSTT_CROSSING_START | |
RSTT_CROSSING | |
RSTT_TURNING_START | |
RSTT_TURNING | |
RSTT_RECOVER_START | |
RSTT_RECOVER_OUTSIDE |
Definition at line 44 of file nav_rosette.c.
enum RotationDir |
Enumerator | |
---|---|
LACE_LEFT | |
LACE_RIGHT | |
RSTT_LEFT | |
RSTT_RIGHT | |
TRINITY_LEFT | |
TRINITY_RIGHT |
Definition at line 55 of file nav_rosette.c.
|
static |
Definition at line 83 of file nav_rosette.c.
References dir.
|
static |
Definition at line 184 of file nav_rosette.c.
References NavRosette::inside_cloud, and nav_rosette.
Referenced by nav_rosette_init().
void nav_rosette_init | ( | void | ) |
Init function called by modules init.
Definition at line 191 of file nav_rosette.c.
References DEFAULT_CIRCLE_RADIUS, NavRosette::inside_cloud, NavRosette::last_border_time, lwc_cb(), lwc_ev, NavRosette::max_recover_radius, mission_register(), nav_rosette, NAV_ROSETTE_LWC_ID, NavRosette::radius, NavRosette::recover_radius, RSTT_ENTER, and NavRosette::status.
bool nav_rosette_run | ( | void | ) |
Navigation function Called by flight plan or mission run function.
Definition at line 233 of file nav_rosette.c.
void nav_rosette_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 207 of file nav_rosette.c.
References NavRosette::actual, NavRosette::first, get_sys_time_float(), NavRosette::inside_cloud, NavRosette::last_border_time, nav_dt, nav_rosette, NavRosette::pos_incr, NavRosette::radius, NavRosette::radius_sign, NavRosette::rotation, RSTT_ENTER, RSTT_LEFT, RSTT_RIGHT, stateGetPositionEnu_f(), NavRosette::status, NavRosette::target, and VECT3_ASSIGN.
|
static |
Definition at line 88 of file nav_rosette.c.
References alpha, NavRosette::first, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
|
static |
Definition at line 88 of file nav_rosette.c.
|
static |
Definition at line 182 of file nav_rosette.c.
Referenced by nav_rosette_init().
|
static |
Definition at line 81 of file nav_rosette.c.
Referenced by nav_rosette_setup().
|
static |
Definition at line 1 of file nav_rosette.c.
Referenced by lwc_cb(), nav_rosette_init(), and nav_rosette_setup().