Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ nav_survey_poly_osam_ResetSweepNumber()

void nav_survey_poly_osam_ResetSweepNumber ( bool  rst)

Reset sweep number.

Definition at line 101 of file nav_survey_poly_osam.c.

◆ nav_survey_poly_osam_run()

◆ nav_survey_poly_osam_setup()

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 146 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, Poly_Sweep, PolygonSize, 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:

◆ nav_survey_poly_osam_setup_towards()

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, Sweep, waypoints, point::x, and point::y.

+ Here is the call graph for this function:

Variable Documentation

◆ Half_Sweep_Enabled

bool Half_Sweep_Enabled
extern

Definition at line 78 of file nav_survey_poly_osam.c.

◆ Poly_Size

uint8_t Poly_Size
extern

Definition at line 75 of file nav_survey_poly_osam.c.

◆ Poly_Sweep

float Poly_Sweep
extern

◆ PolySurveySweepBackNum

uint16_t PolySurveySweepBackNum
extern

Definition at line 142 of file nav_survey_poly_osam.c.

◆ PolySurveySweepNum

uint16_t PolySurveySweepNum
extern

Definition at line 141 of file nav_survey_poly_osam.c.

◆ Reset_Sweep

bool Reset_Sweep
extern

Definition at line 79 of file nav_survey_poly_osam.c.