Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
nav_spiral_3D.c File Reference
#include "modules/nav/nav_spiral_3D.h"
#include "firmwares/fixedwing/nav.h"
#include "state.h"
#include "autopilot.h"
#include "generated/flight_plan.h"
+ Include dependency graph for nav_spiral_3D.c:

Go to the source code of this file.

Data Structures

struct  NavSpiral3D
 

Macros

#define NAV_SPIRAL_3D_DIST_DIFF   10.f
 
#define NAV_SPIRAL_3D_ALT_DIFF   10.f
 
#define NAV_SPIRAL_3D_MIN_CIRCLE_RADIUS   50.f
 

Enumerations

enum  Spiral3DStatus { Spiral3DStart, Spiral3DCircle, Spiral3DFail }
 

Functions

void nav_spiral_3D_init (void)
 
void nav_spiral_3D_setup (float center_x, float center_y, float alt_start, float alt_stop, float radius_start, float radius_stop, float vx, float vy, float vz)
 Initialize spiral 3D based on: More...
 
bool nav_spiral_3D_run (void)
 Run spiral 3D navigation. More...
 

Variables

struct NavSpiral3D nav_spiral_3D
 
static const float nav_dt = 1.f / NAVIGATION_FREQUENCY
 

Detailed Description

Fixedwing navigation in a 3D spiral.

Definition in file nav_spiral_3D.c.


Data Structure Documentation

◆ NavSpiral3D

struct NavSpiral3D

Definition at line 49 of file nav_spiral_3D.c.

+ Collaboration diagram for NavSpiral3D:
Data Fields
float alt_start
float alt_stop
struct FloatVect3 center
struct FloatVect3 pos_incr
float radius
float radius_increment
float radius_min
float radius_start
float radius_stop
enum Spiral3DStatus status

Macro Definition Documentation

◆ NAV_SPIRAL_3D_ALT_DIFF

#define NAV_SPIRAL_3D_ALT_DIFF   10.f

Definition at line 40 of file nav_spiral_3D.c.

◆ NAV_SPIRAL_3D_DIST_DIFF

#define NAV_SPIRAL_3D_DIST_DIFF   10.f

Definition at line 36 of file nav_spiral_3D.c.

◆ NAV_SPIRAL_3D_MIN_CIRCLE_RADIUS

#define NAV_SPIRAL_3D_MIN_CIRCLE_RADIUS   50.f

Definition at line 44 of file nav_spiral_3D.c.

Enumeration Type Documentation

◆ Spiral3DStatus

Enumerator
Spiral3DStart 
Spiral3DCircle 
Spiral3DFail 

Definition at line 47 of file nav_spiral_3D.c.

Function Documentation

◆ nav_spiral_3D_init()

void nav_spiral_3D_init ( void  )

Definition at line 117 of file nav_spiral_3D.c.

References FLOAT_VECT3_ZERO, mission_register(), nav_spiral_3D, and NavSpiral3D::pos_incr.

+ Here is the call graph for this function:

◆ nav_spiral_3D_run()

◆ nav_spiral_3D_setup()

void nav_spiral_3D_setup ( float  center_x,
float  center_y,
float  alt_start,
float  alt_stop,
float  radius_start,
float  radius_stop,
float  vx,
float  vy,
float  vz 
)

Initialize spiral 3D based on:

  • position X, Y
  • start and stop altitude
  • start and stop radius
  • speeds (horizontal and vertical)

Definition at line 127 of file nav_spiral_3D.c.

References NavSpiral3D::alt_start, NavSpiral3D::alt_stop, NavSpiral3D::center, f, nav_dt, nav_spiral_3D, NAV_SPIRAL_3D_MIN_CIRCLE_RADIUS, NavSpiral3D::pos_incr, NavSpiral3D::radius, NavSpiral3D::radius_increment, NavSpiral3D::radius_min, NavSpiral3D::radius_start, NavSpiral3D::radius_stop, sign(), Spiral3DFail, Spiral3DStart, NavSpiral3D::status, VECT3_ASSIGN, and FloatVect3::z.

+ Here is the call graph for this function:

Variable Documentation

◆ nav_dt

const float nav_dt = 1.f / NAVIGATION_FREQUENCY
static

Definition at line 64 of file nav_spiral_3D.c.

Referenced by nav_spiral_3D_run(), and nav_spiral_3D_setup().

◆ nav_spiral_3D

struct NavSpiral3D nav_spiral_3D

Definition at line 62 of file nav_spiral_3D.c.

Referenced by nav_spiral_3D_init(), nav_spiral_3D_run(), and nav_spiral_3D_setup().