Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nav_survey_poly_osam.h File Reference
#include "std.h"
+ Include dependency graph for nav_survey_poly_osam.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void nav_survey_poly_osam_setup (uint8_t FirstWP, uint8_t Size, float Sweep, float Orientation)
 Setup polygon survey. More...
 
void nav_survey_poly_osam_setup_towards (uint8_t FirstWP, uint8_t Size, float Sweep, int SecondWP)
 Setup "dynamic" polygon survey with sweep orientation towards a waypoint. More...
 
bool nav_survey_poly_osam_run (void)
 Run polygon survey. More...
 
void nav_survey_poly_osam_ResetSweepNumber (bool rst)
 Reset sweep number. More...
 

Variables

uint8_t Poly_Size
 
float Poly_Sweep
 
uint16_t PolySurveySweepNum
 
uint16_t PolySurveySweepBackNum
 
bool Half_Sweep_Enabled
 
bool Reset_Sweep
 

Function Documentation

void nav_survey_poly_osam_ResetSweepNumber ( bool  rst)

Reset sweep number.

Definition at line 101 of file nav_survey_poly_osam.c.

References FALSE, PolySurveySweepBackNum, and Reset_Sweep.

void nav_survey_poly_osam_setup ( uint8_t  FirstWP,
uint8_t  Size,
float  Sweep,
float  Orientation 
)

Setup polygon survey.

Parameters
FirstWPfirst waypoint/corner of the polygon
Sizenumber of waypoints/corners used to define the polygon
Sweepdistance between scan lines
Orientationangle of scan lines in degrees (CCW, east)

Definition at line 145 of file nav_survey_poly_osam.c.

References Line::b, CSurveyStatus, dSweep, EdgeMaxY, EdgeMinY, Edges, Entry, EntryRadius, EvaluateLineForX(), FindInterceptOfTwoLines(), Init, LINE_STOP_FUNCTION, Line::m, MaxFloat, MaxY, POLY_OSAM_ENTRY_RADIUS, POLY_OSAM_FIRST_SWEEP_DISTANCE, PolySurveySweepBackNum, PolySurveySweepNum, SmallestCorner, SurveyCircle, SurveyCircleQdr, SurveyEntryWP, SurveyFromWP, SurveyRadius, SurveySize, SurveyTheta, SurveyToWP, TranslateAndRotateFromWorld(), waypoints, point::x, Point2D::x, point::y, and Point2D::y.

Referenced by nav_survey_poly_osam_setup_towards().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nav_survey_poly_osam_setup_towards ( uint8_t  FirstWP,
uint8_t  Size,
float  Sweep,
int  SecondWP 
)

Setup "dynamic" polygon survey with sweep orientation towards a waypoint.

Computes the sweep orientation angle from the line FirstWP-SecondWP. If you pass zero for Size and/or Sweep it will use the global Poly_Size and Poly_Sweep variables respectively (which can be changed via telemetry/settings).

Parameters
FirstWPfirst waypoint/corner of the polygon
Sizenumber of waypoints/corners used to define the polygon, if zero uses Poly_Size
Sweepdistance between scan lines, if zero uses Poly_Sweep
SecondWPsecond waypoint towards which the sweep orientation is computed

Definition at line 81 of file nav_survey_poly_osam.c.

References nav_survey_poly_osam_setup(), Poly_Size, Poly_Sweep, waypoints, point::x, and point::y.

+ Here is the call graph for this function:

Variable Documentation

bool Half_Sweep_Enabled

Definition at line 78 of file nav_survey_poly_osam.c.

uint8_t Poly_Size

Definition at line 75 of file nav_survey_poly_osam.c.

float Poly_Sweep

Definition at line 76 of file nav_survey_poly_osam.c.

Referenced by nav_survey_poly_osam_setup_towards().

uint16_t PolySurveySweepBackNum

Definition at line 142 of file nav_survey_poly_osam.c.

uint16_t PolySurveySweepNum

Definition at line 141 of file nav_survey_poly_osam.c.

bool Reset_Sweep

Definition at line 79 of file nav_survey_poly_osam.c.

Referenced by nav_survey_poly_osam_ResetSweepNumber().