Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
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 "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 | 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) |
bool | 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 78 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
#define LINE_STOP_FUNCTION {} |
Definition at line 81 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
#define RECTANGLE_SURVEY_DEFAULT_SWEEP 25 |
Definition at line 32 of file nav_survey_rectangle_rotorcraft.c.
#define SurveyGoingEast | ( | ) | ((survey_orientation == WE) && (survey_to.x > survey_from.x)) |
Definition at line 72 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
#define SurveyGoingNorth | ( | ) | ((survey_orientation == NS) && (survey_to.y > survey_from.y)) |
Definition at line 70 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
#define SurveyGoingSouth | ( | ) | ((survey_orientation == NS) && (survey_to.y < survey_from.y)) |
Definition at line 71 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
#define SurveyGoingWest | ( | ) | ((survey_orientation == WE) && (survey_to.x < survey_from.x)) |
Definition at line 73 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
#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 92 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 158 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_to, survey_to_i, survey_uturn, SurveyGoingEast, SurveyGoingNorth, SurveyGoingSouth, SurveyGoingWest, waypoints, WaypointX, WaypointY, WE, point::x, EnuCoor_f::x, point::y, EnuCoor_f::y, and EnuCoor_i::z.
bool nav_survey_rectangle_rotorcraft_setup | ( | uint8_t | wp1, |
uint8_t | wp2, | ||
float | grid, | ||
survey_orientation_t | so | ||
) |
Definition at line 99 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_south, nav_survey_west, navigation_target, NavVerticalAltitudeMode, NS, rectangle_survey_sweep_num, stateGetPositionEnu_f(), survey_from, survey_to, survey_uturn, 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 84 of file nav_survey_rectangle_rotorcraft.c.
References nav_survey_active.
Referenced by nav_survey_rectangle_rotorcraft_init().
bool interleave = USE_INTERLEAVE |
Definition at line 59 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
bool nav_in_circle = false |
Definition at line 58 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
bool nav_in_segment = false |
Definition at line 57 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
float nav_survey_east |
Definition at line 68 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
float nav_survey_north |
Definition at line 68 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 55 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 67 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
float nav_survey_south |
Definition at line 68 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
float nav_survey_west |
Definition at line 68 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
uint16_t rectangle_survey_sweep_num |
Definition at line 56 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 65 of file nav_survey_rectangle_rotorcraft.c.
|
static |
Definition at line 61 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run(), and nav_survey_rectangle_rotorcraft_setup().
|
static |
Definition at line 62 of file nav_survey_rectangle_rotorcraft.c.
Referenced by nav_survey_rectangle_rotorcraft_run().
|
static |
Definition at line 64 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 54 of file nav_survey_rectangle_rotorcraft.c.