Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nav_survey_rectangle_rotorcraft.c File Reference

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"
+ Include dependency graph for nav_survey_rectangle_rotorcraft.c:

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
 

Detailed Description

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.

Macro Definition Documentation

#define LINE_START_FUNCTION   {}
#define LINE_STOP_FUNCTION   {}
#define RECTANGLE_SURVEY_DEFAULT_SWEEP   25

Definition at line 32 of file nav_survey_rectangle_rotorcraft.c.

#define RECTANGLE_SURVEY_HEADING_NS   0.f
#define RECTANGLE_SURVEY_HEADING_WE   90.f
#define SurveyGoingEast ( )    ((survey_orientation == WE) && (survey_to.x > survey_from.x))
#define SurveyGoingNorth ( )    ((survey_orientation == NS) && (survey_to.y > survey_from.y))
#define SurveyGoingSouth ( )    ((survey_orientation == NS) && (survey_to.y < survey_from.y))
#define SurveyGoingWest ( )    ((survey_orientation == WE) && (survey_to.x < survey_from.x))
#define USE_INTERLEAVE   FALSE

Definition at line 38 of file nav_survey_rectangle_rotorcraft.c.

Function Documentation

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().

+ Here is the call graph for this function:

static void send_survey ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 92 of file nav_survey_rectangle_rotorcraft.c.

References nav_survey_active.

Referenced by nav_survey_rectangle_rotorcraft_init().

+ Here is the caller graph for this function:

Variable Documentation

bool interleave = USE_INTERLEAVE
bool nav_in_circle = false
bool nav_in_segment = false
float nav_survey_east
float nav_survey_north
bool nav_survey_rectangle_active = false
static
float nav_survey_shift
float nav_survey_south
float nav_survey_west
uint16_t rectangle_survey_sweep_num
survey_orientation_t survey_orientation = NS
static

Definition at line 73 of file nav_survey_rectangle_rotorcraft.c.

struct EnuCoor_i survey_from_i survey_to_i
static
bool survey_uturn = false
static