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

◆ RoverNavGoto

struct RoverNavGoto

Waypoint and route pattern.

Definition at line 38 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

◆ RoverNavCircle

struct RoverNavCircle

Circle pattern.

Definition at line 48 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

◆ RoverNavOval

struct RoverNavOval

Definition at line 58 of file nav_rover_base.h.

Data Fields
uint8_t count number of laps
enum oval_status status oval status

◆ RoverNavBase

struct RoverNavBase

Basic Nav struct.

Definition at line 65 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

◆ CloseDegAngles

#define CloseDegAngles (   _c1,
  _c2 
)    ({ float _diff = _c1 - _c2; NormCourse(_diff); 350 < _diff || _diff < 10; })

Definition at line 81 of file nav_rover_base.h.

◆ CloseRadAngles

#define CloseRadAngles (   _c1,
  _c2 
)    ({ float _diff = _c1 - _c2; NormRadAngle(_diff); fabsf(_diff) < 0.0177; })

Definition at line 82 of file nav_rover_base.h.

◆ NavCircleCount

#define NavCircleCount ( )    (fabsf(nav_rover_base.circle.radians) / (2*M_PI))

Macros for circle nav.

Definition at line 78 of file nav_rover_base.h.

◆ NavCircleQdr

#define NavCircleQdr ( )    ({ float qdr = DegOfRad(M_PI_2 - nav_rover_base.circle.qdr); NormCourse(qdr); qdr; })

Definition at line 79 of file nav_rover_base.h.

◆ NavCourseCloseTo

#define NavCourseCloseTo (   x)    CloseDegAngles(x, DegOfRad(stateGetHorizontalSpeedDir_f()))

Definition at line 87 of file nav_rover_base.h.

◆ NavQdrCloseTo

#define NavQdrCloseTo (   x)    CloseDegAngles(x, NavCircleQdr())

True if x (in degrees) is close to the current QDR (less than 10 degrees)

Definition at line 86 of file nav_rover_base.h.

◆ ROVER_BASE_SEND_TRAJECTORY

#define ROVER_BASE_SEND_TRAJECTORY   TRUE

Definition at line 33 of file nav_rover_base.h.

Enumeration Type Documentation

◆ oval_status

Oval pattern.

Enumerator
OR12 
OC2 
OR21 
OC1 
OR12 
OC2 
OR21 
OC1 
OR12 
OC2 
OR21 
OC1 

Definition at line 57 of file nav_rover_base.h.

Function Documentation

◆ nav_rover_init()

Variable Documentation

◆ nav_rover_base

struct RoverNavBase nav_rover_base
extern