|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
31 #ifndef RECTANGLE_SURVEY_DEFAULT_SWEEP
32 #define RECTANGLE_SURVEY_DEFAULT_SWEEP 25
35 #ifdef RECTANGLE_SURVEY_USE_INTERLEAVE
36 #define USE_INTERLEAVE TRUE
38 #define USE_INTERLEAVE FALSE
42 #include "pprzlink/messages.h"
45 #if PERIODIC_TELEMETRY
54 #ifndef RECTANGLE_SURVEY_HEADING_NS
55 #define RECTANGLE_SURVEY_HEADING_NS 0.f
58 #ifndef RECTANGLE_SURVEY_HEADING_WE
59 #define RECTANGLE_SURVEY_HEADING_WE 90.f
78 #define SurveyGoingNorth() ((survey_orientation == NS) && (survey_to.y > survey_from.y))
79 #define SurveyGoingSouth() ((survey_orientation == NS) && (survey_to.y < survey_from.y))
80 #define SurveyGoingEast() ((survey_orientation == WE) && (survey_to.x > survey_from.x))
81 #define SurveyGoingWest() ((survey_orientation == WE) && (survey_to.x < survey_from.x))
83 #include "generated/flight_plan.h"
85 #ifndef LINE_START_FUNCTION
86 #define LINE_START_FUNCTION {}
88 #ifndef LINE_STOP_FUNCTION
89 #define LINE_STOP_FUNCTION {}
95 pprz_msg_send_SURVEY(trans,
dev, AC_ID,
102 #if PERIODIC_TELEMETRY
167 #ifdef NAV_SURVEY_RECTANGLE_DYNAMIC
171 static bool is_last_half =
false;
172 static float survey_radius;
235 is_last_half =
false;
253 x0 = x0 + survey_radius;
267 survey_radius = -survey_radius;
284 is_last_half =
false;
302 my_y0 = my_y0 + survey_radius;
316 survey_radius = -survey_radius;
331 double fract = modf (temp , &inteiro);
#define RECTANGLE_SURVEY_HEADING_NS
bool nav_survey_rectangle_rotorcraft_run(uint8_t wp1, uint8_t wp2)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
bool nav_approaching_from(struct EnuCoor_i *wp, struct EnuCoor_i *from, int16_t approaching_time)
Proximity tests on approaching a wp.
struct EnuCoor_i navigation_target
static struct EnuCoor_f survey_from survey_to
#define SurveyGoingEast()
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
float dc_distance_interval
AutoShoot photos on distance to last shot in meters.
#define SurveyGoingWest()
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
uint16_t rectangle_survey_sweep_num
void dc_send_command(uint8_t cmd)
Send Command To Camera.
static survey_orientation_t survey_orientation
static const struct usb_device_descriptor dev
#define LINE_STOP_FUNCTION
void nav_route(struct EnuCoor_i *wp_start, struct EnuCoor_i *wp_end)
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
#define SurveyGoingNorth()
#define LINE_START_FUNCTION
vector in East North Up coordinates Units: meters
static struct EnuCoor_i survey_from_i survey_to_i
#define RECTANGLE_SURVEY_DEFAULT_SWEEP
Common code for AP and FBW telemetry.
void nav_survey_rectangle_rotorcraft_init(void)
static bool nav_survey_rectangle_active
static void send_survey(struct transport_tx *trans, struct link_device *dev)
#define RECTANGLE_SURVEY_HEADING_WE
void nav_survey_rectangle_rotorcraft_setup(uint8_t wp1, uint8_t wp2, float grid, survey_orientation_t so)
#define SurveyGoingSouth()
void nav_set_heading_deg(float deg)
Set nav_heading in degrees.
#define HORIZONTAL_MODE_ROUTE
static struct point survey_from
#define DefaultPeriodic
Set default periodic telemetry.
vector in East North Up coordinates
#define VECT3_COPY(_a, _b)
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.
#define ENU_BFP_OF_REAL(_o, _i)