Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
library for formation flight More...
#include <math.h>
#include "subsystems/datalink/downlink.h"
#include "multi/formation.h"
#include "state.h"
#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
#include "firmwares/fixedwing/guidance/guidance_v.h"
#include "autopilot.h"
#include "subsystems/gps.h"
#include "generated/flight_plan.h"
#include "generated/airframe.h"
#include "dl_protocol.h"
#include <stdio.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 55 of file formation.c.
Referenced by formation_init().
#define FORM_CARROT 2. |
Definition at line 39 of file formation.c.
Referenced by formation_flight(), and formation_init().
#define FORM_COURSE_PGAIN 0. |
Definition at line 51 of file formation.c.
Referenced by formation_init().
#define FORM_MODE 0 |
Definition at line 63 of file formation.c.
Referenced by formation_init().
#define FORM_POS_PGAIN 0. |
Definition at line 43 of file formation.c.
Referenced by formation_init().
#define FORM_PROX 20. |
Definition at line 59 of file formation.c.
Referenced by formation_init().
#define FORM_SPEED_PGAIN 0. |
Definition at line 47 of file formation.c.
Referenced by formation_init().
#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 84 of file formation.c.
References slot_::alt, DefaultChannel, DefaultDevice, slot_::east, FALSE, form_mode, formation, IDLE, slot_::north, slot_::status, and the_acs_id.
int formation_flight | ( | void | ) |
Definition at line 128 of file formation.c.
References ac_id, ACTIVE, slot_::alt, ac_info_::alt, UtmCoor_f::alt, coef_form_alt, coef_form_pos, coef_form_speed, ac_info_::course, DefaultChannel, DefaultDevice, desired_x, desired_y, slot_::east, ac_info_::east, FALSE, 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, get_ac_info(), gps, ground_alt, ac_info_::gspeed, IDLE, ac_info_::itow, leader_id, LOST, Max, nav_altitude, NavVerticalAutoThrottleMode, NB_ACS, slot_::north, ac_info_::north, SetAcInfo, stateGetHorizontalSpeedDir_f(), stateGetHorizontalSpeedNorm_f(), stateGetPositionEnu_f(), stateGetPositionUtm_f(), stateGetSpeedEnu_f(), slot_::status, the_acs, the_acs_id, GpsState::tow, TRUE, UNSET, v_ctl_auto_throttle_cruise_throttle, EnuCoor_f::x, and EnuCoor_f::y.
int formation_init | ( | void | ) |
Definition at line 66 of file formation.c.
References coef_form_alt, coef_form_course, coef_form_pos, coef_form_speed, FALSE, 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, leader_id, NB_ACS, old_alt, old_cruise, slot_::status, and UNSET.
void formation_pre_call | ( | void | ) |
Definition at line 261 of file formation.c.
References slot_::east, formation, leader_id, slot_::north, stateGetPositionEnu_f(), the_acs_id, EnuCoor_f::x, and EnuCoor_f::y.
int start_formation | ( | void | ) |
Definition at line 95 of file formation.c.
References ac_id, ACTIVE, DefaultChannel, DefaultDevice, FALSE, formation, IDLE, leader_id, nav_altitude, NB_ACS, old_alt, old_cruise, slot_::status, and v_ctl_auto_throttle_cruise_throttle.
int stop_formation | ( | void | ) |
Definition at line 110 of file formation.c.
References ac_id, ACTIVE, DefaultChannel, DefaultDevice, FALSE, formation, IDLE, leader_id, nav_altitude, NB_ACS, old_alt, old_cruise, slot_::status, and v_ctl_auto_throttle_cruise_throttle.
float coef_form_alt |
Definition at line 31 of file formation.c.
Referenced by formation_flight(), and formation_init().
float coef_form_course |
Definition at line 30 of file formation.c.
Referenced by formation_init().
float coef_form_pos |
Definition at line 28 of file formation.c.
Referenced by formation_flight(), and formation_init().
float coef_form_speed |
Definition at line 29 of file formation.c.
Referenced by formation_flight(), and formation_init().
float form_a |
Definition at line 23 of file formation.c.
Referenced by formation_flight().
float form_carrot |
Definition at line 26 of file formation.c.
Referenced by formation_flight(), and formation_init().
float form_e |
Definition at line 23 of file formation.c.
Referenced by formation_flight().
uint8_t form_mode |
Definition at line 32 of file formation.c.
Referenced by add_slot(), formation_flight(), and formation_init().
float form_n |
Definition at line 23 of file formation.c.
Referenced by formation_flight().
float form_prox |
Definition at line 27 of file formation.c.
Referenced by formation_flight(), and formation_init().
float form_speed |
Definition at line 24 of file formation.c.
Referenced by formation_flight().
float form_speed_e |
Definition at line 24 of file formation.c.
Referenced by formation_flight().
float form_speed_n |
Definition at line 24 of file formation.c.
Referenced by formation_flight().
Definition at line 36 of file formation.c.
Referenced by add_slot(), formation_flight(), formation_init(), formation_pre_call(), start_formation(), and stop_formation().
uint8_t leader_id |
Definition at line 33 of file formation.c.
Referenced by formation_flight(), formation_init(), formation_pre_call(), start_formation(), and stop_formation().
float old_alt |
Definition at line 34 of file formation.c.
Referenced by formation_init(), start_formation(), and stop_formation().
float old_cruise |
Definition at line 34 of file formation.c.
Referenced by formation_init(), start_formation(), and stop_formation().