|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/nav/nav_survey_poly_rotorcraft.h"#include "firmwares/rotorcraft/navigation.h"#include "state.h"#include "autopilot.h"#include "generated/flight_plan.h"
Include dependency graph for nav_survey_poly_rotorcraft.c:Go to the source code of this file.
Data Structures | |
| struct | Point2D |
| struct | Line |
Macros | |
| #define | POLYSURVEY_DEFAULT_SIZE 10 |
| #define | POLYSURVEY_DEFAULT_DISTANCE 25 |
| #define | POLYSURVEY_ENTRY_DISTANCE 0 |
| if 0 default to half sweep | |
| #define | POLYSURVEY_MAX_POLYGONSIZE 20 |
| maximum number of polygon corners | |
| #define | POLY_OSAM_HALF_SWEEP_ENABLED TRUE |
| #define | MaxPolygonSize POLYSURVEY_MAX_POLYGONSIZE |
| #define | MaxFloat 1000000000 |
| #define | MinFloat -1000000000 |
| #define | LINE_START_FUNCTION {} |
| #define | LINE_STOP_FUNCTION {} |
Enumerations | |
| enum | SurveyStatus { Init , Entry , Sweep , Turn } |
| This routine will cover the enitre area of any Polygon defined in the flightplan which is a convex polygon. More... | |
Functions | |
| void | nav_survey_poly_setup_towards (uint8_t FirstWP, uint8_t Size, float Sweep, int SecondWP) |
| Setup "dynamic" polygon survey with sweep orientation towards a waypoint. | |
| static void | TranslateAndRotateFromWorld (struct EnuCoor_f *p, float Zrot, float transX, float transY) |
| static void | RotateAndTranslateToWorld (struct EnuCoor_f *p, float Zrot, float transX, float transY) |
| Rotates point round z by -Zrot then translates so (0,0) becomes (transX,transY) | |
| static void | FindInterceptOfTwoLines (float *x, float *y, struct Line L1, struct Line L2) |
| static float | EvaluateLineForX (float y, struct Line L) |
| void | nav_survey_poly_setup (uint8_t EntryWP, uint8_t Size, float sw, float Orientation) |
| Setup polygon survey. | |
| bool | nav_survey_poly_run (void) |
| Run polygon survey. | |
| struct Point2D |
Definition at line 90 of file nav_launcher.c.
| Data Fields | ||
|---|---|---|
| float | x | |
| float | y | |
| struct Line |
Definition at line 77 of file nav_survey_hybrid.c.
| Data Fields | ||
|---|---|---|
| float | b | |
| float | m | |
| float | x | |
| #define LINE_START_FUNCTION {} |
Definition at line 90 of file nav_survey_poly_rotorcraft.c.
| #define LINE_STOP_FUNCTION {} |
Definition at line 93 of file nav_survey_poly_rotorcraft.c.
| #define MaxFloat 1000000000 |
Definition at line 86 of file nav_survey_poly_rotorcraft.c.
| #define MaxPolygonSize POLYSURVEY_MAX_POLYGONSIZE |
Definition at line 85 of file nav_survey_poly_rotorcraft.c.
| #define MinFloat -1000000000 |
Definition at line 87 of file nav_survey_poly_rotorcraft.c.
Definition at line 57 of file nav_survey_poly_rotorcraft.c.
| #define POLYSURVEY_DEFAULT_DISTANCE 25 |
Definition at line 42 of file nav_survey_poly_rotorcraft.c.
| #define POLYSURVEY_DEFAULT_SIZE 10 |
Definition at line 38 of file nav_survey_poly_rotorcraft.c.
| #define POLYSURVEY_ENTRY_DISTANCE 0 |
if 0 default to half sweep
Definition at line 47 of file nav_survey_poly_rotorcraft.c.
| #define POLYSURVEY_MAX_POLYGONSIZE 20 |
maximum number of polygon corners
Definition at line 52 of file nav_survey_poly_rotorcraft.c.
This routine will cover the enitre area of any Polygon defined in the flightplan which is a convex polygon.
| Enumerator | |
|---|---|
| Init | |
| Entry | |
| Sweep | |
| Turn | |
Definition at line 100 of file nav_survey_poly_rotorcraft.c.
Definition at line 527 of file nav_survey_poly_rotorcraft.c.
References Line::b, Line::m, and EnuCoor_f::y.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
Here is the caller graph for this function:Definition at line 520 of file nav_survey_poly_rotorcraft.c.
References foo, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by nav_survey_poly_setup().
Here is the caller graph for this function:Run polygon survey.
Definition at line 307 of file nav_survey_poly_rotorcraft.c.
References CSurveyStatus, dc_distance_interval, dc_send_command(), DC_SHOOT, dSweep, EdgeMaxY, EdgeMinY, Edges, Entry, EvaluateLineForX(), foo, Half_Sweep_Enabled, Init, LINE_START_FUNCTION, LINE_STOP_FUNCTION, MaxY, nav, RotorcraftNavigation::nav_approaching, RotorcraftNavigation::nav_goto, nav_init_stage(), RotorcraftNavigation::nav_route, nav_survey_shift, Poly_Distance, PolySurveySweepBackNum, PolySurveySweepNum, RotateAndTranslateToWorld(), SmallestCorner, stateGetPositionEnu_f(), survey_from, survey_to, SurveyEntry, SurveyEntryWP, SurveyFromWP, SurveySize, SurveyTheta, SurveyToWP, Sweep, Turn, VECT3_COPY, waypoints, EnuCoor_f::x, Point2D::x, EnuCoor_f::y, Point2D::y, and EnuCoor_f::z.
Here is the call graph for this function:Setup polygon survey.
| FirstWP | first waypoint/corner of the polygon |
| Size | number of waypoints/corners used to define the polygon |
| Sweep | distance between scan lines |
| Orientation | angle of scan lines in degrees (CCW, east) |
Definition at line 123 of file nav_survey_poly_rotorcraft.c.
References Line::b, CSurveyStatus, dSweep, EdgeMaxY, EdgeMinY, Edges, Entry, EvaluateLineForX(), FindInterceptOfTwoLines(), foo, Init, LINE_STOP_FUNCTION, Line::m, MaxFloat, MaxPolygonSize, MaxY, nav_set_heading_deg(), NavVerticalAltitudeMode, Poly_Distance, POLYSURVEY_ENTRY_DISTANCE, PolySurveySweepBackNum, PolySurveySweepNum, SmallestCorner, SurveyEntry, SurveyEntryWP, SurveyFromWP, SurveySize, SurveyTheta, SurveyToWP, TranslateAndRotateFromWorld(), waypoints, EnuCoor_f::x, point::x, Point2D::x, EnuCoor_f::y, point::y, and Point2D::y.
Referenced by nav_survey_poly_setup_towards().
Here is the call graph for this function:
Here is the caller graph for this function: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_Distance variables respectively (which can be changed via telemetry/settings).
| FirstWP | first waypoint/corner of the polygon |
| Size | number of waypoints/corners used to define the polygon, if zero uses Poly_Size |
| Sweep | distance between scan lines, if zero uses Poly_Distance |
| SecondWP | second waypoint towards which the sweep orientation is computed |
Definition at line 63 of file nav_survey_poly_rotorcraft.c.
References foo, nav_survey_poly_setup(), Poly_Distance, Poly_Size, Sweep, waypoints, point::x, and point::y.
Here is the call graph for this function:
|
static |
Rotates point round z by -Zrot then translates so (0,0) becomes (transX,transY)
Definition at line 509 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run().
Here is the caller graph for this function:
|
static |
Definition at line 496 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_setup().
Here is the caller graph for this function:
|
static |
Definition at line 101 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 107 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 104 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 105 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 103 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
| float EntryRadius |
Definition at line 119 of file nav_survey_poly_rotorcraft.c.
| bool Half_Sweep_Enabled = POLY_OSAM_HALF_SWEEP_ENABLED |
Definition at line 120 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run().
|
static |
Definition at line 116 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
| float Poly_Distance = POLYSURVEY_DEFAULT_DISTANCE |
Definition at line 61 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), nav_survey_poly_setup(), and nav_survey_poly_setup_towards().
| uint8_t Poly_Size = POLYSURVEY_DEFAULT_SIZE |
Definition at line 60 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_setup_towards().
| uint16_t PolySurveySweepBackNum |
Definition at line 118 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
| uint16_t PolySurveySweepNum |
Definition at line 117 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 102 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 112 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run().
|
static |
Definition at line 110 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 114 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 109 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 115 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 106 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().
|
static |
Definition at line 108 of file nav_survey_poly_rotorcraft.c.
Referenced by nav_survey_poly_run(), and nav_survey_poly_setup().