Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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] |
library for formation flight
Definition in file formation.c.
#define FORM_ALTITUDE_PGAIN 0. |
Definition at line 51 of file formation.c.
#define FORM_CARROT 2. |
Definition at line 35 of file formation.c.
#define FORM_COURSE_PGAIN 0. |
Definition at line 47 of file formation.c.
#define FORM_MODE 0 |
Definition at line 59 of file formation.c.
#define FORM_POS_PGAIN 0. |
Definition at line 39 of file formation.c.
#define FORM_PROX 20. |
Definition at line 55 of file formation.c.
#define FORM_SPEED_PGAIN 0. |
Definition at line 43 of file formation.c.
#define FORMATION_C |
Definition at line 5 of file formation.c.
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 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, 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.
int start_formation | ( | void | ) |
Definition at line 91 of file formation.c.
References 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 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.
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().
float form_a |
Definition at line 19 of file formation.c.
Referenced by formation_flight().
float form_carrot |
Definition at line 22 of file formation.c.
Referenced by formation_flight(), and formation_init().
float form_e |
Definition at line 19 of file formation.c.
Referenced by formation_flight().
uint8_t form_mode |
Definition at line 28 of file formation.c.
Referenced by add_slot(), formation_flight(), formation_init(), and parseFormationSlot().
float form_n |
Definition at line 19 of file formation.c.
Referenced by formation_flight().
float form_prox |
Definition at line 23 of file formation.c.
Referenced by formation_flight(), and formation_init().
float form_speed |
Definition at line 20 of file formation.c.
Referenced by formation_flight().
float form_speed_e |
Definition at line 20 of file formation.c.
Referenced by formation_flight().
float form_speed_n |
Definition at line 20 of file formation.c.
Referenced by formation_flight().
Definition at line 30 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().
float old_alt |
Definition at line 30 of file formation.c.
Referenced by formation_init(), start_formation(), and stop_formation().
float old_cruise |
Definition at line 30 of file formation.c.
Referenced by formation_init(), start_formation(), and stop_formation().