Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
formation.h File Reference

Formation flight library. More...

#include "subsystems/datalink/datalink.h"
#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 *buf)
 
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

◆ slot_

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

◆ FORM_MODE_COURSE

#define FORM_MODE_COURSE   1

Definition at line 15 of file formation.h.

◆ FORM_MODE_GLOBAL

#define FORM_MODE_GLOBAL   0

Definition at line 14 of file formation.h.

Enumeration Type Documentation

◆ slot_status

Enumerator
UNSET 
ACTIVE 
IDLE 
LOST 

Definition at line 22 of file formation.h.

Function Documentation

◆ add_slot()

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

◆ formation_flight()

◆ formation_init()

◆ formation_pre_call()

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:

◆ parseFormationSlot()

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:

◆ parseFormationStatus()

static void parseFormationStatus ( uint8_t buf)
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:

◆ start_formation()

◆ stop_formation()

◆ updateFormationStatus()

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:

◆ updateSlot()

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

◆ coef_form_alt

float coef_form_alt

Definition at line 27 of file formation.c.

Referenced by formation_flight(), and formation_init().

◆ coef_form_course

float coef_form_course

Definition at line 17 of file formation.h.

◆ coef_form_pos

float coef_form_pos

Definition at line 17 of file formation.h.

◆ coef_form_speed

float coef_form_speed

Definition at line 17 of file formation.h.

◆ form_mode

uint8_t form_mode

Definition at line 28 of file formation.c.

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

◆ form_prox

float form_prox

Definition at line 23 of file formation.c.

Referenced by formation_flight(), and formation_init().

◆ formation

◆ leader_id