Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Automatic survey of a rectangle for rotorcraft. More...
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
#include "modules/datalink/telemetry.h"
#include "firmwares/rotorcraft/navigation.h"
#include "modules/nav/nav_survey_rectangle_rotorcraft.h"
#include "state.h"
#include "generated/flight_plan.h"
Go to the source code of this file.
Macros | |
#define | RECTANGLE_SURVEY_DEFAULT_SWEEP 25 |
#define | USE_INTERLEAVE FALSE |
#define | RECTANGLE_SURVEY_HEADING_NS 0.f |
#define | RECTANGLE_SURVEY_HEADING_WE 90.f |
#define | SurveyGoingNorth() ((survey_orientation == NS) && (survey_to.y > survey_from.y)) |
#define | SurveyGoingSouth() ((survey_orientation == NS) && (survey_to.y < survey_from.y)) |
#define | SurveyGoingEast() ((survey_orientation == WE) && (survey_to.x > survey_from.x)) |
#define | SurveyGoingWest() ((survey_orientation == WE) && (survey_to.x < survey_from.x)) |
#define | LINE_START_FUNCTION {} |
#define | LINE_STOP_FUNCTION {} |
Functions | |
static void | send_survey (struct transport_tx *trans, struct link_device *dev) |
void | nav_survey_rectangle_rotorcraft_init (void) |
void | nav_survey_rectangle_rotorcraft_setup (uint8_t wp1, uint8_t wp2, float grid, survey_orientation_t so) |
bool | nav_survey_rectangle_rotorcraft_run (uint8_t wp1, uint8_t wp2) |
Variables | |
float | sweep = RECTANGLE_SURVEY_DEFAULT_SWEEP |
static bool | nav_survey_rectangle_active = false |
uint16_t | rectangle_survey_sweep_num |
bool | nav_in_segment = false |
bool | nav_in_circle = false |
bool | interleave = USE_INTERLEAVE |
static struct EnuCoor_f survey_from | survey_to |
static bool | survey_uturn = false |
static survey_orientation_t | survey_orientation = NS |
static bool | nav_survey_send = false |
float | nav_survey_shift |
float | nav_survey_west |
float | nav_survey_east |
float | nav_survey_north |
float | nav_survey_south |
Automatic survey of a rectangle for rotorcraft.
Rectangle is defined by two points, sweep can be south-north or west-east.
Definition in file nav_survey_rectangle_rotorcraft.c.
#define LINE_START_FUNCTION {} |
Definition at line 86 of file nav_survey_rectangle_rotorcraft.c.
#define LINE_STOP_FUNCTION {} |
Definition at line 89 of file nav_survey_rectangle_rotorcraft.c.
#define RECTANGLE_SURVEY_DEFAULT_SWEEP 25 |
Definition at line 32 of file nav_survey_rectangle_rotorcraft.c.
#define RECTANGLE_SURVEY_HEADING_NS 0.f |
Definition at line 55 of file nav_survey_rectangle_rotorcraft.c.
#define RECTANGLE_SURVEY_HEADING_WE 90.f |
Definition at line 59 of file nav_survey_rectangle_rotorcraft.c.
#define SurveyGoingEast | ( | ) | ((survey_orientation == WE) && (survey_to.x > survey_from.x)) |
Definition at line 80 of file nav_survey_rectangle_rotorcraft.c.
#define SurveyGoingNorth | ( | ) | ((survey_orientation == NS) && (survey_to.y > survey_from.y)) |
Definition at line 78 of file nav_survey_rectangle_rotorcraft.c.
#define SurveyGoingSouth | ( | ) | ((survey_orientation == NS) && (survey_to.y < survey_from.y)) |
Definition at line 79 of file nav_survey_rectangle_rotorcraft.c.
#define SurveyGoingWest | ( | ) | ((survey_orientation == WE) && (survey_to.x < survey_from.x)) |
Definition at line 81 of file nav_survey_rectangle_rotorcraft.c.
#define USE_INTERLEAVE FALSE |
Definition at line 38 of file nav_survey_rectangle_rotorcraft.c.
void nav_survey_rectangle_rotorcraft_init | ( | void | ) |
Definition at line 101 of file nav_survey_rectangle_rotorcraft.c.
References DefaultPeriodic, register_periodic_telemetry(), and send_survey().
Do half a circle around WP 0
Do half a circle around WP 0
Definition at line 165 of file nav_survey_rectangle_rotorcraft.c.
References dc_distance_interval, dc_send_command(), DC_SHOOT, interleave, LINE_START_FUNCTION, LINE_STOP_FUNCTION, Min, nav, RotorcraftNavigation::nav_approaching, nav_in_circle, nav_in_segment, RotorcraftNavigation::nav_route, nav_survey_east, nav_survey_north, nav_survey_rectangle_active, nav_survey_send, nav_survey_shift, nav_survey_south, nav_survey_west, NS, rectangle_survey_sweep_num, stateGetPositionEnu_f(), survey_from, survey_orientation, survey_to, survey_uturn, SurveyGoingEast, SurveyGoingNorth, SurveyGoingSouth, SurveyGoingWest, sweep, waypoints, WaypointX, WaypointY, WE, EnuCoor_f::x, point::x, EnuCoor_f::y, point::y, and EnuCoor_f::z.
void nav_survey_rectangle_rotorcraft_setup | ( | uint8_t | wp1, |
uint8_t | wp2, | ||
float | grid, | ||
survey_orientation_t | so | ||
) |
Definition at line 108 of file nav_survey_rectangle_rotorcraft.c.
References RotorcraftNavigation::horizontal_mode, LINE_STOP_FUNCTION, Min, nav, NAV_HORIZONTAL_MODE_ROUTE, nav_set_heading_deg(), nav_survey_east, nav_survey_north, nav_survey_rectangle_active, nav_survey_shift, nav_survey_south, nav_survey_west, NavVerticalAltitudeMode, NS, RECTANGLE_SURVEY_HEADING_NS, RECTANGLE_SURVEY_HEADING_WE, rectangle_survey_sweep_num, stateGetPositionEnu_f(), survey_from, survey_orientation, survey_to, survey_uturn, sweep, RotorcraftNavigation::target, VECT3_COPY, waypoints, WaypointX, WaypointY, EnuCoor_f::x, point::x, EnuCoor_f::y, and point::y.
|
static |
Definition at line 92 of file nav_survey_rectangle_rotorcraft.c.
References dev, nav_survey_east, nav_survey_north, nav_survey_send, nav_survey_south, and nav_survey_west.
Referenced by nav_survey_rectangle_rotorcraft_init().
bool interleave = USE_INTERLEAVE |
Definition at line 67 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
bool nav_in_circle = false |
Definition at line 66 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
bool nav_in_segment = false |
Definition at line 65 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
float nav_survey_east |
Definition at line 76 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), and send_survey().
float nav_survey_north |
Definition at line 76 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), and send_survey().
|
static |
Definition at line 63 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 73 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and send_survey().
float nav_survey_shift |
Definition at line 75 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
float nav_survey_south |
Definition at line 76 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), and send_survey().
float nav_survey_west |
Definition at line 76 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), and send_survey().
uint16_t rectangle_survey_sweep_num |
Definition at line 64 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 72 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 67 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 71 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
float sweep = RECTANGLE_SURVEY_DEFAULT_SWEEP |
Definition at line 62 of file nav_survey_rectangle_rotorcraft.c.
Referenced by gvf_nav_survey_polygon_setup(), nav_survey_hybrid_setup(), nav_survey_hybrid_setup_orientation(), nav_survey_hybrid_setup_towards(), nav_survey_polygon_setup(), nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().