Paparazzi UAS  v5.15_devel-79-g48e7b20
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tcas.c File Reference

Collision avoidance library. More...

#include "multi/tcas.h"
#include "state.h"
#include "firmwares/fixedwing/nav.h"
#include "generated/flight_plan.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for tcas.c:

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 callTCAS (void)
 
void tcas_init (void)
 
void parseTcasResolve (void)
 
void parseTcasRA (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]
 

Detailed Description

Collision avoidance library.

Definition in file tcas.c.

Macro Definition Documentation

#define TCAS_ALIM   15.

Definition at line 56 of file tcas.c.

Referenced by tcas_init().

#define TCAS_DMOD   10.

Definition at line 52 of file tcas.c.

Referenced by tcas_init().

#define TCAS_DT_MAX   1500

Definition at line 60 of file tcas.c.

Referenced by tcas_periodic_task_1Hz().

#define TCAS_HUGE_TAU   100*TCAS_TAU_TA

Definition at line 63 of file tcas.c.

Referenced by tcas_periodic_task_1Hz().

#define TCAS_IsInside ( )    ( (ddh < Square(tcas_dmod) && ddv < Square(2*tcas_alim)) ? 1 : 0 )

Definition at line 68 of file tcas.c.

Referenced by tcas_periodic_task_1Hz().

#define TCAS_TAU_RA   CARROT

Definition at line 48 of file tcas.c.

Referenced by tcas_init().

#define TCAS_TAU_TA   2*CARROT

Definition at line 44 of file tcas.c.

Referenced by tcas_init().

Function Documentation

void callTCAS ( void  )

Definition at line 65 of file tcas.c.

References tcas_alt_setpoint, TCAS_RA, tcas_status, and v_ctl_altitude_setpoint.

Referenced by navigation_task().

+ Here is the caller graph for this function:

void parseTcasRA ( void  )

Definition at line 95 of file tcas.c.

References dl_buffer, tcas_ac_status::resolve, tcas_acs_status, and ti_acs_id.

void parseTcasResolve ( void  )

Definition at line 87 of file tcas.c.

References dl_buffer, tcas_ac_status::resolve, tcas_acs_status, and ti_acs_id.

void tcas_periodic_task_4Hz ( void  )
static enum tcas_resolve tcas_test_direction ( uint8_t  id)
inlinestatic

Definition at line 103 of file tcas.c.

References acInfoGetPositionEnu_f(), RA_CLIMB, RA_DESCEND, stateGetPositionEnu_f(), tcas_alim, and EnuCoor_f::z.

Referenced by tcas_periodic_task_1Hz().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

uint8_t tcas_ac_RA

Definition at line 40 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 41 of file tcas.c.

Referenced by parseTcasRA(), parseTcasResolve(), tcas_init(), and tcas_periodic_task_1Hz().

float tcas_alim

Definition at line 36 of file tcas.c.

Referenced by tcas_init(), tcas_periodic_task_4Hz(), and tcas_test_direction().

float tcas_alt_setpoint

Definition at line 35 of file tcas.c.

Referenced by callTCAS(), tcas_init(), and tcas_periodic_task_4Hz().

float tcas_dmod

Definition at line 36 of file tcas.c.

Referenced by tcas_init().

Definition at line 39 of file tcas.c.

Referenced by tcas_periodic_task_1Hz().

uint8_t tcas_status

Definition at line 38 of file tcas.c.

Referenced by callTCAS(), tcas_init(), tcas_periodic_task_1Hz(), and tcas_periodic_task_4Hz().

float tcas_tau_ra

Definition at line 36 of file tcas.c.

Referenced by tcas_init(), and tcas_periodic_task_1Hz().

float tcas_tau_ta

Definition at line 36 of file tcas.c.

Referenced by tcas_init(), and tcas_periodic_task_1Hz().