Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
formation.c File Reference

library for formation flight More...

#include "multi/formation.h"
#include "std.h"
#include "state.h"
#include "modules/datalink/downlink.h"
#include "firmwares/fixedwing/nav.h"
#include "firmwares/fixedwing/guidance/guidance_v.h"
#include "generated/flight_plan.h"
+ Include dependency graph for formation.c:

Go to the source code of this file.

Macros

#define FORMATION_C
 
#define FORM_CARROT   2.
 
#define FORM_POS_PGAIN   0.
 
#define FORM_SPEED_PGAIN   0.
 
#define FORM_COURSE_PGAIN   0.
 
#define FORM_ALTITUDE_PGAIN   0.
 
#define FORM_PROX   20.
 
#define FORM_MODE   0
 

Functions

int formation_init (void)
 
int add_slot (uint8_t _id, float slot_e, float slot_n, float slot_a)
 
int start_formation (void)
 
int stop_formation (void)
 
int formation_flight (void)
 
void formation_pre_call (void)
 

Variables

float form_n
 
float form_e
 
float form_a
 
float form_speed
 
float form_speed_n
 
float form_speed_e
 
float form_carrot
 
float form_prox
 
float coef_form_pos
 
float coef_form_speed
 
float coef_form_course
 
float coef_form_alt
 
uint8_t form_mode
 
uint8_t leader_id
 
float old_cruise
 
float old_alt
 
struct slot_ formation [NB_ACS]
 

Detailed Description

library for formation flight

Definition in file formation.c.

Macro Definition Documentation

◆ FORM_ALTITUDE_PGAIN

#define FORM_ALTITUDE_PGAIN   0.

Definition at line 51 of file formation.c.

◆ FORM_CARROT

#define FORM_CARROT   2.

Definition at line 35 of file formation.c.

◆ FORM_COURSE_PGAIN

#define FORM_COURSE_PGAIN   0.

Definition at line 47 of file formation.c.

◆ FORM_MODE

#define FORM_MODE   0

Definition at line 59 of file formation.c.

◆ FORM_POS_PGAIN

#define FORM_POS_PGAIN   0.

Definition at line 39 of file formation.c.

◆ FORM_PROX

#define FORM_PROX   20.

Definition at line 55 of file formation.c.

◆ FORM_SPEED_PGAIN

#define FORM_SPEED_PGAIN   0.

Definition at line 43 of file formation.c.

◆ FORMATION_C

#define FORMATION_C

Definition at line 5 of file formation.c.

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:

◆ start_formation()

◆ stop_formation()

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 26 of file formation.c.

Referenced by formation_init().

◆ coef_form_pos

float coef_form_pos

Definition at line 24 of file formation.c.

Referenced by formation_flight(), and formation_init().

◆ coef_form_speed

float coef_form_speed

Definition at line 25 of file formation.c.

Referenced by formation_flight(), and formation_init().

◆ form_a

float form_a

Definition at line 19 of file formation.c.

Referenced by formation_flight().

◆ form_carrot

float form_carrot

Definition at line 22 of file formation.c.

Referenced by formation_flight(), and formation_init().

◆ form_e

float form_e

Definition at line 19 of file formation.c.

Referenced by formation_flight().

◆ 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_n

float form_n

Definition at line 19 of file formation.c.

Referenced by formation_flight().

◆ form_prox

float form_prox

Definition at line 23 of file formation.c.

Referenced by formation_flight(), and formation_init().

◆ form_speed

float form_speed

Definition at line 20 of file formation.c.

Referenced by formation_flight().

◆ form_speed_e

float form_speed_e

Definition at line 20 of file formation.c.

Referenced by formation_flight().

◆ form_speed_n

float form_speed_n

Definition at line 20 of file formation.c.

Referenced by formation_flight().

◆ formation

◆ leader_id

◆ old_alt

float old_alt

Definition at line 30 of file formation.c.

Referenced by formation_init(), start_formation(), and stop_formation().

◆ old_cruise

float old_cruise

Definition at line 30 of file formation.c.

Referenced by formation_init(), start_formation(), and stop_formation().