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_rover_base.h File Reference
+ Include dependency graph for nav_rover_base.h:
+ This graph shows which files directly or indirectly include this file:

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
 

Detailed Description

Author
2018 Gautier Hattenberger gauti.nosp@m.er.h.nosp@m.atten.nosp@m.berg.nosp@m.er@en.nosp@m.ac.f.nosp@m.r Basic navigation functions for Rovers

Definition in file nav_rover_base.h.


Data Structure Documentation

struct RoverNavGoto

Waypoint and route pattern.

Definition at line 34 of file nav_rover_base.h.

+ Collaboration diagram for RoverNavGoto:
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.

+ Collaboration diagram for RoverNavCircle:
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.

+ Collaboration diagram for RoverNavBase:
Data Fields
struct RoverNavCircle circle
struct RoverNavGoto goto_wp
struct RoverNavOval oval

Macro Definition Documentation

#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.

Enumeration Type Documentation

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.

Function Documentation

Variable Documentation