Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "subsystems/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 struct EnuCoor_i survey_from_i | survey_to_i |
static bool | survey_uturn = false |
static survey_orientation_t | survey_orientation = NS |
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 100 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, ENU_BFP_OF_REAL, horizontal_mode, HORIZONTAL_MODE_ROUTE, interleave, LINE_START_FUNCTION, LINE_STOP_FUNCTION, Max, Min, nav_approaching_from(), nav_in_circle, nav_in_segment, nav_route(), nav_survey_active, nav_survey_east, nav_survey_north, nav_survey_rectangle_active, nav_survey_shift, nav_survey_south, nav_survey_west, NS, rectangle_survey_sweep_num, stateGetPositionEnu_f(), survey_from, survey_orientation, survey_to, survey_to_i, survey_uturn, SurveyGoingEast, SurveyGoingNorth, SurveyGoingSouth, SurveyGoingWest, sweep, waypoints, WaypointX, WaypointY, WE, point::x, EnuCoor_f::x, point::y, EnuCoor_f::y, and EnuCoor_i::z.
void nav_survey_rectangle_rotorcraft_setup | ( | uint8_t | wp1, |
uint8_t | wp2, | ||
float | grid, | ||
survey_orientation_t | so | ||
) |
Definition at line 107 of file nav_survey_rectangle_rotorcraft.c.
References ENU_BFP_OF_REAL, horizontal_mode, HORIZONTAL_MODE_ROUTE, LINE_STOP_FUNCTION, Max, Min, nav_set_heading_deg(), nav_survey_east, nav_survey_north, nav_survey_rectangle_active, nav_survey_shift, nav_survey_south, nav_survey_west, navigation_target, 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, VECT3_COPY, waypoints, WaypointX, WaypointY, point::x, EnuCoor_f::x, EnuCoor_i::x, point::y, EnuCoor_f::y, and EnuCoor_i::y.
|
static |
Definition at line 92 of file nav_survey_rectangle_rotorcraft.c.
References dev, nav_survey_active, nav_survey_east, nav_survey_north, 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().
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 73 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 69 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 70 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
|
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().
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_polygon_setup(), nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().