![]() |
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 { RSTT_LEFT , RSTT_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. | |
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. | |
bool | nav_rosette_run (void) |
Navigation function Called by flight plan or mission run function. | |
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 |
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.
Definition at line 37 of file nav_rosette.c.
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.
Enumerator | |
---|---|
RSTT_LEFT | |
RSTT_RIGHT |
Definition at line 55 of file nav_rosette.c.
Definition at line 83 of file nav_rosette.c.
Referenced by nav_rosette_run().
|
static |
Definition at line 184 of file nav_rosette.c.
References foo, NavRosette::inside_cloud, and nav_rosette.
Referenced by nav_rosette_init().
Init function called by modules init.
Definition at line 191 of file nav_rosette.c.
References DEFAULT_CIRCLE_RADIUS, foo, 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.
Navigation function Called by flight plan or mission run function.
Definition at line 233 of file nav_rosette.c.
References NavRosette::actual, change_rep(), NavRosette::circle, NavRosette::direction, NavRosette::estim_border, NavRosette::first, foo, get_sys_time_float(), ground_alt, NavRosette::inside_cloud, NavRosette::last_border_time, NavRosette::max_recover_radius, nav_circle_XY(), nav_dt, nav_init_stage(), nav_move_waypoint_enu(), nav_rosette, NAV_ROSETTE_BORDER_FILTER, NAV_ROSETTE_RECOVER_MAX_TURN, nav_route_xy(), nav_send_waypoint(), NavCircleCountNoRewind, NavVerticalAltitudeMode, NavVerticalAutoThrottleMode, NavRosette::pos_incr, process_new_point_rosette(), NavRosette::radius, NavRosette::radius_sign, NavRosette::recover_circle, NavRosette::recover_radius, RSTT_CROSSING, RSTT_CROSSING_FIRST, RSTT_CROSSING_START, RSTT_ENTER, RSTT_RECOVER_OUTSIDE, RSTT_RECOVER_START, RSTT_TURNING, RSTT_TURNING_START, stateGetHorizontalSpeedDir_f(), stateGetPositionEnu_f(), NavRosette::status, NavRosette::target, time, update_barycenter(), VECT3_ADD, EnuCoor_f::x, EnuCoor_f::y, FloatVect3::z, and EnuCoor_f::z.
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, foo, 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 105 of file nav_rosette.c.
References foo, NavRosette::inside_cloud, nav_rosette, NavRosette::radius, NavRosette::rotation, RSTT_RIGHT, NavRosette::target, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
Referenced by nav_rosette_run().
|
static |
Definition at line 88 of file nav_rosette.c.
References alpha, NavRosette::first, foo, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by nav_rosette_run().
|
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_run(), and nav_rosette_setup().
|
static |
Definition at line 79 of file nav_rosette.c.
Referenced by lwc_cb(), nav_rosette_init(), nav_rosette_run(), nav_rosette_setup(), and process_new_point_rosette().