Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tcas.h File Reference

Collision avoidance library. More...

#include "std.h"
#include "subsystems/navigation/traffic_info.h"
+ Include dependency graph for tcas.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tcas_ac_status
 

Macros

#define TCAS_NO_ALARM   0
 
#define TCAS_TA   1
 
#define TCAS_RA   2
 
#define CallTCAS()   { if (tcas_status == TCAS_RA) v_ctl_altitude_setpoint = tcas_alt_setpoint; }
 
#define ParseTcasResolve()
 

Enumerations

enum  tcas_resolve { RA_NONE, RA_LEVEL, RA_CLIMB, RA_DESCEND }
 

Functions

void tcas_init (void)
 
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.h.


Data Structure Documentation

struct tcas_ac_status

Definition at line 46 of file tcas.h.

Data Fields
enum tcas_resolve resolve
uint8_t status

Macro Definition Documentation

#define CallTCAS ( )    { if (tcas_status == TCAS_RA) v_ctl_altitude_setpoint = tcas_alt_setpoint; }

Definition at line 57 of file tcas.h.

Referenced by navigation_task().

#define ParseTcasResolve ( )
Value:
{ \
if (DL_TCAS_RESOLVE_ac_id(dl_buffer) == AC_ID) { \
uint8_t ac_id_conflict = DL_TCAS_RESOLVE_ac_id_conflict(dl_buffer); \
tcas_acs_status[the_acs_id[ac_id_conflict]].resolve = DL_TCAS_RESOLVE_resolve(dl_buffer); \
} \
}
enum tcas_resolve resolve
Definition: tcas.h:48
uint8_t the_acs_id[NB_ACS_ID]
Definition: traffic_info.c:34
unsigned char uint8_t
Definition: types.h:14
uint8_t dl_buffer[MSG_SIZE]
Definition: main_demo5.c:64
struct tcas_ac_status tcas_acs_status[NB_ACS]
Definition: tcas.c:44
if(PrimarySpektrumState.SpektrumTimer)

Definition at line 59 of file tcas.h.

#define TCAS_NO_ALARM   0

Definition at line 37 of file tcas.h.

Referenced by tcas_init(), and tcas_periodic_task_1Hz().

#define TCAS_RA   2

Definition at line 39 of file tcas.h.

Referenced by tcas_periodic_task_1Hz(), and tcas_periodic_task_4Hz().

#define TCAS_TA   1

Definition at line 38 of file tcas.h.

Referenced by tcas_periodic_task_1Hz().

Enumeration Type Documentation

Enumerator
RA_NONE 
RA_LEVEL 
RA_CLIMB 
RA_DESCEND 

Definition at line 40 of file tcas.h.

Function Documentation

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.

+ Here is the call graph for this function:

Variable Documentation

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().

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().