Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
gvf.h File Reference

Guidance algorithm based on vector fields. More...

#include "std.h"
+ Include dependency graph for gvf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gvf_con
 
struct  gvf_st
 
struct  gvf_tra
 
struct  gvf_seg
 
struct  gvf_grad
 
struct  gvf_Hess
 

Macros

#define GVF_GRAVITY   9.806
 
#define GVF_OCAML_GCS   true
 

Enumerations

enum  trajectories { LINE = 0 , ELLIPSE , SIN , NONE = 255 }
 

Functions

void gvf_init (void)
 
void gvf_control_2D (float ke, float kn, float e, struct gvf_grad *, struct gvf_Hess *)
 
void gvf_set_direction (int8_t s)
 
bool gvf_line_XY_heading (float x, float y, float heading)
 
bool gvf_line_XY1_XY2 (float x1, float y1, float x2, float y2)
 
bool gvf_line_wp1_wp2 (uint8_t wp1, uint8_t wp2)
 
bool gvf_segment_loop_XY1_XY2 (float x1, float y1, float x2, float y2, float d1, float d2)
 
bool gvf_segment_loop_wp1_wp2 (uint8_t wp1, uint8_t wp2, float d1, float d2)
 
bool gvf_segment_XY1_XY2 (float x1, float y1, float x2, float y2)
 
bool gvf_segment_wp1_wp2 (uint8_t wp1, uint8_t wp2)
 
bool gvf_line_wp_heading (uint8_t wp, float heading)
 
bool gvf_ellipse_wp (uint8_t wp, float a, float b, float alpha)
 
bool gvf_ellipse_XY (float x, float y, float a, float b, float alpha)
 
bool gvf_sin_XY_alpha (float x, float y, float alpha, float w, float off, float A)
 
bool gvf_sin_wp1_wp2 (uint8_t wp1, uint8_t wp2, float w, float off, float A)
 
bool gvf_sin_wp_alpha (uint8_t wp, float alpha, float w, float off, float A)
 

Variables

gvf_con gvf_control
 
gvf_st gvf_state
 
gvf_tra gvf_trajectory
 

Detailed Description

Guidance algorithm based on vector fields.

Definition in file gvf.h.


Data Structure Documentation

◆ gvf_con

struct gvf_con

Definition at line 47 of file gvf.h.

Data Fields
float error
float ke
float kn
float omega
int8_t s

◆ gvf_st

struct gvf_st

Definition at line 57 of file gvf.h.

Data Fields
float course
float px_dot
float py_dot

◆ gvf_tra

struct gvf_tra

Definition at line 72 of file gvf.h.

Data Fields
float p[16]
enum trajectories type

◆ gvf_seg

struct gvf_seg

Definition at line 85 of file gvf.h.

Data Fields
int seg
float x1
float x2
float y1
float y2

◆ gvf_grad

struct gvf_grad

Definition at line 95 of file gvf.h.

Data Fields
float nx
float ny
float nz

◆ gvf_Hess

struct gvf_Hess

Definition at line 101 of file gvf.h.

Data Fields
float H11
float H12
float H13
float H21
float H22
float H23
float H31
float H32
float H33

Macro Definition Documentation

◆ GVF_GRAVITY

#define GVF_GRAVITY   9.806

Definition at line 31 of file gvf.h.

◆ GVF_OCAML_GCS

#define GVF_OCAML_GCS   true

Default GCS trajectory painter

Definition at line 35 of file gvf.h.

Enumeration Type Documentation

◆ trajectories

Enumerator
LINE 
ELLIPSE 
SIN 
NONE 

Definition at line 65 of file gvf.h.

Function Documentation

◆ gvf_control_2D()

◆ gvf_ellipse_wp()

bool gvf_ellipse_wp ( uint8_t  wp,
float  a,
float  b,
float  alpha 
)

Definition at line 439 of file gvf.c.

References alpha, b, gvf_ellipse_XY(), gvf_plen_wps, gvf_trajectory, gvf_tra::p, WaypointX, and WaypointY.

+ Here is the call graph for this function:

◆ gvf_ellipse_XY()

bool gvf_ellipse_XY ( float  x,
float  y,
float  a,
float  b,
float  alpha 
)

Definition at line 400 of file gvf.c.

References alpha, b, gvf_con::error, gvf_control, gvf_control_2D(), gvf_ellipse_info(), gvf_ellipse_par, gvf_plen, gvf_plen_wps, gvf_trajectory, gvf_con::ke, gvf_ell_par::ke, gvf_ell_par::kn, gvf_tra::p, and gvf_tra::type.

Referenced by distributed_circular(), gvf_ellipse_wp(), and gvf_nav_survey_polygon_run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gvf_init()

void gvf_init ( void  )

Definition at line 116 of file gvf.c.

References DefaultPeriodic, gvf_control, gvf_trajectory, gvf_con::ke, gvf_con::kn, NONE, register_periodic_telemetry(), gvf_con::s, send_gvf(), and gvf_tra::type.

+ Here is the call graph for this function:

◆ gvf_line_wp1_wp2()

bool gvf_line_wp1_wp2 ( uint8_t  wp1,
uint8_t  wp2 
)

Definition at line 295 of file gvf.c.

References gvf_line_XY1_XY2(), gvf_plen_wps, gvf_trajectory, gvf_tra::p, WaypointX, and WaypointY.

+ Here is the call graph for this function:

◆ gvf_line_wp_heading()

bool gvf_line_wp_heading ( uint8_t  wp,
float  heading 
)

Definition at line 385 of file gvf.c.

References b, gvf_line_XY_heading(), gvf_plen_wps, gvf_trajectory, heading, gvf_tra::p, WaypointX, and WaypointY.

+ Here is the call graph for this function:

◆ gvf_line_XY1_XY2()

bool gvf_line_XY1_XY2 ( float  x1,
float  y1,
float  x2,
float  y2 
)

Definition at line 271 of file gvf.c.

References gvf_line_XY_heading(), gvf_plen_wps, gvf_segment, gvf_trajectory, gvf_tra::p, gvf_seg::seg, gvf_seg::x1, gvf_seg::x2, gvf_seg::y1, and gvf_seg::y2.

Referenced by gvf_line_wp1_wp2(), and gvf_segment_XY1_XY2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gvf_line_XY_heading()

bool gvf_line_XY_heading ( float  x,
float  y,
float  heading 
)

Definition at line 264 of file gvf.c.

References b, gvf_line(), gvf_set_direction(), and heading.

Referenced by gvf_line_wp_heading(), and gvf_line_XY1_XY2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gvf_segment_loop_wp1_wp2()

bool gvf_segment_loop_wp1_wp2 ( uint8_t  wp1,
uint8_t  wp2,
float  d1,
float  d2 
)

Definition at line 333 of file gvf.c.

References d1, d2, gvf_plen_wps, gvf_segment_loop_XY1_XY2(), gvf_trajectory, gvf_tra::p, WaypointX, and WaypointY.

+ Here is the call graph for this function:

◆ gvf_segment_loop_XY1_XY2()

bool gvf_segment_loop_XY1_XY2 ( float  x1,
float  y1,
float  x2,
float  y2,
float  d1,
float  d2 
)

Definition at line 309 of file gvf.c.

References alpha, d1, d2, gvf_line(), gvf_segment, gvf_set_direction(), out_of_segment_area(), s, gvf_seg::seg, gvf_seg::x1, gvf_seg::x2, gvf_seg::y1, and gvf_seg::y2.

Referenced by gvf_segment_loop_wp1_wp2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gvf_segment_wp1_wp2()

bool gvf_segment_wp1_wp2 ( uint8_t  wp1,
uint8_t  wp2 
)

Definition at line 371 of file gvf.c.

References gvf_plen_wps, gvf_segment_XY1_XY2(), gvf_trajectory, gvf_tra::p, WaypointX, and WaypointY.

+ Here is the call graph for this function:

◆ gvf_segment_XY1_XY2()

bool gvf_segment_XY1_XY2 ( float  x1,
float  y1,
float  x2,
float  y2 
)

Definition at line 349 of file gvf.c.

References gvf_line_XY1_XY2(), p, and stateGetPositionEnu_f().

Referenced by gvf_nav_points(), and gvf_segment_wp1_wp2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gvf_set_direction()

void gvf_set_direction ( int8_t  s)

Definition at line 233 of file gvf.c.

References gvf_control, gvf_con::s, and s.

Referenced by gvf_line_XY_heading(), gvf_nav_direction_circle(), and gvf_segment_loop_XY1_XY2().

+ Here is the caller graph for this function:

◆ gvf_sin_wp1_wp2()

bool gvf_sin_wp1_wp2 ( uint8_t  wp1,
uint8_t  wp2,
float  w,
float  off,
float  A 
)

Definition at line 475 of file gvf.c.

References A, alpha, gvf_plen_wps, gvf_sin_XY_alpha(), gvf_trajectory, gvf_tra::p, WaypointX, and WaypointY.

+ Here is the call graph for this function:

◆ gvf_sin_wp_alpha()

bool gvf_sin_wp_alpha ( uint8_t  wp,
float  alpha,
float  w,
float  off,
float  A 
)

Definition at line 498 of file gvf.c.

References A, alpha, gvf_plen_wps, gvf_sin_XY_alpha(), gvf_trajectory, gvf_tra::p, WaypointX, and WaypointY.

+ Here is the call graph for this function:

◆ gvf_sin_XY_alpha()

bool gvf_sin_XY_alpha ( float  x,
float  y,
float  alpha,
float  w,
float  off,
float  A 
)

Definition at line 450 of file gvf.c.

References A, alpha, b, gvf_con::error, gvf_control, gvf_control_2D(), gvf_plen, gvf_plen_wps, gvf_sin_info(), gvf_sin_par, gvf_trajectory, gvf_con::ke, gvf_s_par::ke, gvf_s_par::kn, gvf_tra::p, and gvf_tra::type.

Referenced by gvf_sin_wp1_wp2(), and gvf_sin_wp_alpha().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ gvf_control

◆ gvf_state

gvf_st gvf_state
extern

Definition at line 39 of file gvf.c.

Referenced by gvf_control_2D(), and gvf_low_level_getState().

◆ gvf_trajectory