|
Paparazzi UAS v7.1_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 | |
| #define NAV_ROSETTE_BORDER_FILTER 60.f |
Definition at line 41 of file nav_rosette.c.
Referenced by nav_rosette_run().
| #define NAV_ROSETTE_LWC_ID ABI_BROADCAST |
Definition at line 179 of file nav_rosette.c.
Referenced by nav_rosette_init().
| #define NAV_ROSETTE_RECOVER_MAX_TURN 1.5f |
Definition at line 37 of file nav_rosette.c.
Referenced by nav_rosette_run().
| 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 | |
|---|---|
| RSTT_LEFT | |
| RSTT_RIGHT | |
Definition at line 55 of file nav_rosette.c.
|
static |
Definition at line 83 of file nav_rosette.c.
References dir.
Referenced by nav_rosette_run().
|
static |
Definition at line 184 of file nav_rosette.c.
References nav_rosette, and UNUSED.
| void nav_rosette_init | ( | void | ) |
Init function called by modules init.
Definition at line 191 of file nav_rosette.c.
References DEFAULT_CIRCLE_RADIUS, lwc_cb(), lwc_ev, mission_register(), nav_rosette, NAV_ROSETTE_LWC_ID, and RSTT_ENTER.
| bool nav_rosette_run | ( | void | ) |
Navigation function Called by flight plan or mission run function.
Definition at line 233 of file nav_rosette.c.
References change_rep(), get_sys_time_float(), ground_alt, 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, process_new_point_rosette(), 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(), update_barycenter(), and VECT3_ADD.
| 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 get_sys_time_float(), nav_dt, nav_rosette, RSTT_ENTER, RSTT_LEFT, RSTT_RIGHT, stateGetPositionEnu_f(), and VECT3_ASSIGN.
|
static |
Definition at line 105 of file nav_rosette.c.
References nav_rosette, process_new_point_rosette(), RSTT_RIGHT, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
Referenced by nav_rosette_run(), and process_new_point_rosette().
|
static |
Definition at line 88 of file nav_rosette.c.
References alpha, NavRosette::first, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
Referenced by nav_rosette_run().
|
static |
Definition at line 182 of file nav_rosette.c.
|
static |
Definition at line 81 of file nav_rosette.c.
|
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().