Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Formation flight library. More...
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 [] |
Formation flight library.
Definition in file formation.h.
struct slot_ |
Definition at line 24 of file formation.h.
Data Fields | ||
---|---|---|
float | alt | |
float | east | |
float | north | |
enum slot_status | status |
#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.
enum slot_status |
Enumerator | |
---|---|
UNSET | |
ACTIVE | |
IDLE | |
LOST |
Definition at line 22 of file formation.h.
int add_slot | ( | uint8_t | _id, |
float | slot_e, | ||
float | slot_n, | ||
float | slot_a | ||
) |
Definition at line 80 of file formation.c.
References slot_::alt, DefaultChannel, DefaultDevice, slot_::east, form_mode, formation, IDLE, slot_::north, slot_::status, and ti_acs_id.
int formation_flight | ( | void | ) |
Definition at line 124 of file formation.c.
References ac_id, acInfoGetCourse(), acInfoGetGspeed(), acInfoGetItow(), acInfoGetPositionEnu_f(), acInfoGetVelocityEnu_f(), ACTIVE, slot_::alt, coef_form_alt, coef_form_pos, coef_form_speed, DefaultChannel, DefaultDevice, desired_x, desired_y, slot_::east, flight_altitude, fly_to_xy(), form_a, form_carrot, FORM_CARROT, form_e, form_mode, FORM_MODE_COURSE, form_n, form_prox, form_speed, form_speed_e, form_speed_n, formation, gps, ground_alt, IDLE, leader_id, LOST, Max, nav_altitude, NavVerticalAutoThrottleMode, NB_ACS, slot_::north, stateGetHorizontalSpeedDir_f(), stateGetHorizontalSpeedNorm_f(), stateGetPositionEnu_f(), slot_::status, status, ti_acs, ti_acs_id, GpsState::tow, UNSET, v_ctl_auto_throttle_cruise_throttle, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
int formation_init | ( | void | ) |
Definition at line 62 of file formation.c.
References coef_form_alt, coef_form_course, coef_form_pos, coef_form_speed, FORM_ALTITUDE_PGAIN, form_carrot, FORM_CARROT, FORM_COURSE_PGAIN, form_mode, FORM_MODE, FORM_POS_PGAIN, form_prox, FORM_PROX, FORM_SPEED_PGAIN, formation, ground_alt, leader_id, NB_ACS, old_alt, old_cruise, slot_::status, and UNSET.
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.
|
inlinestatic |
Definition at line 56 of file formation.h.
References ac_id, form_mode, leader_id, mode, and updateSlot().
|
inlinestatic |
Definition at line 46 of file formation.h.
References ac_id, leader_id, status, UNSET, and updateFormationStatus().
int start_formation | ( | void | ) |
Definition at line 91 of file formation.c.
References ac_id, ACTIVE, DefaultChannel, DefaultDevice, formation, IDLE, leader_id, nav_altitude, NB_ACS, old_alt, old_cruise, slot_::status, status, and v_ctl_auto_throttle_cruise_throttle.
int stop_formation | ( | void | ) |
Definition at line 106 of file formation.c.
References ac_id, ACTIVE, DefaultChannel, DefaultDevice, formation, ground_alt, IDLE, leader_id, nav_altitude, NB_ACS, old_alt, old_cruise, slot_::status, status, and v_ctl_auto_throttle_cruise_throttle.
Definition at line 44 of file formation.h.
References formation, slot_::status, status, and ti_acs_id.
Referenced by parseFormationStatus().
|
inlinestatic |
Definition at line 37 of file formation.h.
References slot_::alt, slot_::east, formation, slot_::north, and ti_acs_id.
Referenced by parseFormationSlot().
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().
struct slot_ formation[] |
Definition at line 32 of file formation.c.
Referenced by add_slot(), formation_flight(), formation_init(), formation_pre_call(), start_formation(), stop_formation(), updateFormationStatus(), and updateSlot().
uint8_t leader_id |
Definition at line 29 of file formation.c.
Referenced by formation_flight(), formation_init(), formation_pre_call(), parseFormationSlot(), parseFormationStatus(), start_formation(), and stop_formation().