Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
formation.h File Reference

Formation flight library. More...

#include "generated/airframe.h"
#include "modules/multi/traffic_info.h"
+ Include dependency graph for formation.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  slot_
 

Macros

#define FORM_MODE_GLOBAL   0
 
#define FORM_MODE_COURSE   1
 

Enumerations

enum  slot_status { UNSET, ACTIVE, IDLE, LOST }
 

Functions

int formation_init (void)
 
int add_slot (uint8_t _id, float slot_e, float slot_n, float slot_a)
 
static void updateSlot (uint8_t id, float se, float sn, float sa)
 
static void updateFormationStatus (uint8_t id, uint8_t status)
 
static void parseFormationStatus (uint8_t *buff)
 
static void parseFormationSlot (uint8_t *buf)
 
int start_formation (void)
 
int stop_formation (void)
 
int formation_flight (void)
 
void formation_pre_call (void)
 

Variables

float coef_form_alt
 
float coef_form_pos
 
float coef_form_speed
 
float coef_form_course
 
float form_prox
 
uint8_t form_mode
 
uint8_t leader_id
 
struct slot_ formation []
 

Detailed Description

Formation flight library.

Definition in file formation.h.


Data Structure Documentation

struct slot_

Definition at line 24 of file formation.h.

Data Fields
float alt
float east
float north
enum slot_status status

Macro Definition Documentation

#define FORM_MODE_COURSE   1

Definition at line 15 of file formation.h.

Referenced by formation_flight().

#define FORM_MODE_GLOBAL   0

Definition at line 14 of file formation.h.

Enumeration Type Documentation

Enumerator
UNSET 
ACTIVE 
IDLE 
LOST 

Definition at line 22 of file formation.h.

Function Documentation

int add_slot ( uint8_t  _id,
float  slot_e,
float  slot_n,
float  slot_a 
)
void formation_pre_call ( void  )

Definition at line 254 of file formation.c.

References slot_::east, formation, leader_id, slot_::north, stateGetPositionEnu_f(), ti_acs_id, EnuCoor_f::x, and EnuCoor_f::y.

+ Here is the call graph for this function:

static void parseFormationSlot ( uint8_t buf)
inlinestatic

Definition at line 56 of file formation.h.

References ac_id, form_mode, leader_id, mode, and updateSlot().

+ Here is the call graph for this function:

static void parseFormationStatus ( uint8_t buff)
inlinestatic

Definition at line 46 of file formation.h.

References ac_id, leader_id, status, UNSET, and updateFormationStatus().

+ Here is the call graph for this function:

static void updateFormationStatus ( uint8_t  id,
uint8_t  status 
)
inlinestatic

Definition at line 44 of file formation.h.

References formation, slot_::status, status, and ti_acs_id.

Referenced by parseFormationStatus().

+ Here is the caller graph for this function:

static void updateSlot ( uint8_t  id,
float  se,
float  sn,
float  sa 
)
inlinestatic

Definition at line 37 of file formation.h.

References slot_::alt, slot_::east, formation, slot_::north, and ti_acs_id.

Referenced by parseFormationSlot().

+ Here is the caller graph for this function:

Variable Documentation

float coef_form_alt

Definition at line 27 of file formation.c.

Referenced by formation_flight(), and formation_init().

float coef_form_course

Definition at line 26 of file formation.c.

Referenced by formation_init().

float coef_form_pos

Definition at line 24 of file formation.c.

Referenced by formation_flight(), and formation_init().

float coef_form_speed

Definition at line 25 of file formation.c.

Referenced by formation_flight(), and formation_init().

uint8_t form_mode

Definition at line 28 of file formation.c.

Referenced by add_slot(), formation_flight(), formation_init(), and parseFormationSlot().

float form_prox

Definition at line 23 of file formation.c.

Referenced by formation_flight(), and formation_init().