Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
#include "firmwares/rover/navigation.h"
Go to the source code of this file.
Data Structures | |
struct | RoverNavGoto |
Waypoint and route pattern. More... | |
struct | RoverNavCircle |
Circle pattern. More... | |
struct | RoverNavOval |
struct | RoverNavBase |
Basic Nav struct. More... | |
Macros | |
#define | NavCircleCount() (fabsf(nav_rover_base.circle.radians) / (2*M_PI)) |
Macros for circle nav. More... | |
#define | NavCircleQdr() ({ float qdr = DegOfRad(M_PI_2 - nav_rover_base.circle.qdr); NormCourse(qdr); qdr; }) |
#define | CloseDegAngles(_c1, _c2) ({ float _diff = _c1 - _c2; NormCourse(_diff); 350 < _diff || _diff < 10; }) |
#define | CloseRadAngles(_c1, _c2) ({ float _diff = _c1 - _c2; NormRadAngle(_diff); fabsf(_diff) < 0.0177; }) |
#define | NavQdrCloseTo(x) CloseDegAngles(x, NavCircleQdr()) |
True if x (in degrees) is close to the current QDR (less than 10 degrees) More... | |
#define | NavCourseCloseTo(x) CloseDegAngles(x, DegOfRad(stateGetHorizontalSpeedDir_f())) |
Enumerations | |
enum | oval_status { OR12, OC2, OR21, OC1, OR12, OC2, OR21, OC1, OR12, OC2, OR21, OC1 } |
Oval pattern. More... | |
Functions | |
void | nav_rover_init (void) |
Init and register nav functions. More... | |
Variables | |
struct RoverNavBase | nav_rover_base |
Definition in file nav_rover_base.h.
struct RoverNavGoto |
Waypoint and route pattern.
Definition at line 34 of file nav_rover_base.h.
Data Fields | ||
---|---|---|
float | dist2_to_wp | squared distance to next waypoint |
struct EnuCoor_f | from | start WP position |
float | leg_length | leg length |
float | leg_progress | progress over leg |
struct EnuCoor_f | to | end WP position |
struct RoverNavCircle |
Circle pattern.
Definition at line 44 of file nav_rover_base.h.
Data Fields | ||
---|---|---|
struct EnuCoor_f | center | center WP position |
float | qdr | qdr in radians |
float | radians | incremental angular distance |
float | radius | radius in meters |
struct RoverNavOval |
Definition at line 54 of file nav_rover_base.h.
Data Fields | ||
---|---|---|
uint8_t | count | number of laps |
enum oval_status | status | oval status |
struct RoverNavBase |
Basic Nav struct.
Definition at line 61 of file nav_rover_base.h.
Data Fields | ||
---|---|---|
struct RoverNavCircle | circle | |
struct RoverNavGoto | goto_wp | |
struct RoverNavOval | oval |
#define CloseDegAngles | ( | _c1, | |
_c2 | |||
) | ({ float _diff = _c1 - _c2; NormCourse(_diff); 350 < _diff || _diff < 10; }) |
Definition at line 77 of file nav_rover_base.h.
#define CloseRadAngles | ( | _c1, | |
_c2 | |||
) | ({ float _diff = _c1 - _c2; NormRadAngle(_diff); fabsf(_diff) < 0.0177; }) |
Definition at line 78 of file nav_rover_base.h.
#define NavCircleCount | ( | ) | (fabsf(nav_rover_base.circle.radians) / (2*M_PI)) |
Macros for circle nav.
Definition at line 74 of file nav_rover_base.h.
#define NavCircleQdr | ( | ) | ({ float qdr = DegOfRad(M_PI_2 - nav_rover_base.circle.qdr); NormCourse(qdr); qdr; }) |
Definition at line 75 of file nav_rover_base.h.
#define NavCourseCloseTo | ( | x | ) | CloseDegAngles(x, DegOfRad(stateGetHorizontalSpeedDir_f())) |
Definition at line 83 of file nav_rover_base.h.
#define NavQdrCloseTo | ( | x | ) | CloseDegAngles(x, NavCircleQdr()) |
True if x (in degrees) is close to the current QDR (less than 10 degrees)
Definition at line 82 of file nav_rover_base.h.
enum oval_status |
Oval pattern.
Enumerator | |
---|---|
OR12 | |
OC2 | |
OR21 | |
OC1 | |
OR12 | |
OC2 | |
OR21 | |
OC1 | |
OR12 | |
OC2 | |
OR21 | |
OC1 |
Definition at line 53 of file nav_rover_base.h.
void nav_rover_init | ( | void | ) |
Init and register nav functions.
Definition at line 287 of file nav_rover_base.c.
References _nav_oval_init(), RoverNavBase::circle, DEFAULT_CIRCLE_RADIUS, DefaultPeriodic, RoverNavBase::goto_wp, RoverNavGoto::leg_length, RoverNavGoto::leg_progress, nav_approaching(), nav_circle(), nav_goto(), nav_oval(), nav_register_circle(), nav_register_goto_wp(), nav_register_oval(), nav_route(), nav_rover_base, RoverNavCircle::radius, register_periodic_telemetry(), and send_nav_status().
struct RoverNavBase nav_rover_base |
Definition at line 29 of file nav_rover_base.c.
Referenced by _nav_oval_init(), nav_circle(), nav_goto(), nav_route(), nav_rover_init(), send_circle(), send_nav_status(), and send_segment().