Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Collision avoidance library. More...
#include "multi/tcas.h"
#include "generated/airframe.h"
#include "state.h"
#include "firmwares/fixedwing/nav.h"
#include "subsystems/gps.h"
#include "generated/flight_plan.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
Go to the source code of this file.
Macros | |
#define | TCAS_TAU_TA 2*CARROT |
#define | TCAS_TAU_RA CARROT |
#define | TCAS_DMOD 10. |
#define | TCAS_ALIM 15. |
#define | TCAS_DT_MAX 1500 |
#define | TCAS_HUGE_TAU 100*TCAS_TAU_TA |
#define | TCAS_IsInside() ( (ddh < Square(tcas_dmod) && ddv < Square(2*tcas_alim)) ? 1 : 0 ) |
Functions | |
void | tcas_init (void) |
static enum tcas_resolve | tcas_test_direction (uint8_t id) |
void | tcas_periodic_task_1Hz (void) |
void | tcas_periodic_task_4Hz (void) |
Variables | |
float | tcas_alt_setpoint |
float | tcas_tau_ta |
float | tcas_tau_ra |
float | tcas_dmod |
float | tcas_alim |
uint8_t | tcas_status |
enum tcas_resolve | tcas_resolve |
uint8_t | tcas_ac_RA |
struct tcas_ac_status | tcas_acs_status [NB_ACS] |
Collision avoidance library.
Definition in file tcas.c.
#define TCAS_ALIM 15. |
Definition at line 59 of file tcas.c.
Referenced by tcas_init().
#define TCAS_DMOD 10. |
Definition at line 55 of file tcas.c.
Referenced by tcas_init().
#define TCAS_DT_MAX 1500 |
Definition at line 63 of file tcas.c.
Referenced by tcas_periodic_task_1Hz().
#define TCAS_HUGE_TAU 100*TCAS_TAU_TA |
Definition at line 66 of file tcas.c.
Referenced by tcas_periodic_task_1Hz().
Definition at line 69 of file tcas.c.
Referenced by tcas_periodic_task_1Hz().
#define TCAS_TAU_RA CARROT |
Definition at line 51 of file tcas.c.
Referenced by tcas_init().
#define TCAS_TAU_TA 2*CARROT |
Definition at line 47 of file tcas.c.
Referenced by tcas_init().
void tcas_init | ( | void | ) |
Definition at line 71 of file tcas.c.
References NB_ACS, RA_NONE, tcas_ac_status::resolve, tcas_ac_status::status, tcas_ac_RA, tcas_acs_status, tcas_alim, TCAS_ALIM, tcas_alt_setpoint, tcas_dmod, TCAS_DMOD, TCAS_NO_ALARM, tcas_status, tcas_tau_ra, TCAS_TAU_RA, tcas_tau_ta, and TCAS_TAU_TA.
void tcas_periodic_task_1Hz | ( | void | ) |
Definition at line 102 of file tcas.c.
References ac_info_::ac_id, ac_id, ac_info_::alt, UtmCoor_f::alt, ac_info_::climb, ac_info_::course, DefaultChannel, DefaultDevice, ac_info_::east, gps, ac_info_::gspeed, ac_info_::itow, NB_ACS, ac_info_::north, RA_CLIMB, RA_DESCEND, RA_LEVEL, RA_NONE, tcas_ac_status::resolve, stateGetHorizontalSpeedDir_f(), stateGetHorizontalSpeedNorm_f(), stateGetPositionEnu_f(), stateGetPositionUtm_f(), stateGetSpeedEnu_f(), tcas_ac_status::status, tcas_ac_RA, tcas_acs_status, TCAS_DT_MAX, TCAS_HUGE_TAU, TCAS_IsInside, TCAS_NO_ALARM, TCAS_RA, tcas_resolve, tcas_status, TCAS_TA, tcas_tau_ra, tcas_tau_ta, tcas_test_direction(), the_acs, the_acs_id, GpsState::tow, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
void tcas_periodic_task_4Hz | ( | void | ) |
Definition at line 219 of file tcas.c.
References ac_info_::alt, get_ac_info(), Max, Min, nav_altitude, RA_CLIMB, RA_DESCEND, RA_LEVEL, RA_NONE, stateGetPositionUtm_f(), tcas_ac_RA, tcas_alim, tcas_alt_setpoint, TCAS_RA, and tcas_status.
|
inlinestatic |
Definition at line 88 of file tcas.c.
References ac_info_::alt, UtmCoor_f::alt, get_ac_info(), RA_CLIMB, RA_DESCEND, stateGetPositionUtm_f(), and tcas_alim.
Referenced by tcas_periodic_task_1Hz().
uint8_t tcas_ac_RA |
Definition at line 43 of file tcas.c.
Referenced by tcas_init(), tcas_periodic_task_1Hz(), and tcas_periodic_task_4Hz().
struct tcas_ac_status tcas_acs_status[NB_ACS] |
Definition at line 44 of file tcas.c.
Referenced by dl_parse_msg(), tcas_init(), and tcas_periodic_task_1Hz().
float tcas_alim |
Definition at line 39 of file tcas.c.
Referenced by tcas_init(), tcas_periodic_task_4Hz(), and tcas_test_direction().
float tcas_alt_setpoint |
Definition at line 38 of file tcas.c.
Referenced by tcas_init(), and tcas_periodic_task_4Hz().
float tcas_dmod |
Definition at line 39 of file tcas.c.
Referenced by tcas_init().
enum tcas_resolve tcas_resolve |
Definition at line 42 of file tcas.c.
Referenced by tcas_periodic_task_1Hz().
uint8_t tcas_status |
Definition at line 41 of file tcas.c.
Referenced by tcas_init(), tcas_periodic_task_1Hz(), and tcas_periodic_task_4Hz().
float tcas_tau_ra |
Definition at line 39 of file tcas.c.
Referenced by tcas_init(), and tcas_periodic_task_1Hz().
float tcas_tau_ta |
Definition at line 39 of file tcas.c.
Referenced by tcas_init(), and tcas_periodic_task_1Hz().