change detection range for tcas

This commit is contained in:
Gautier Hattenberger
2010-11-11 10:14:35 +00:00
committed by Felix Ruess
parent e1a193998a
commit 776755aca1
+2 -2
View File
@@ -89,8 +89,8 @@ void tcas_init( void ) {
static inline enum tcas_resolve tcas_test_direction(uint8_t id) { static inline enum tcas_resolve tcas_test_direction(uint8_t id) {
struct ac_info_ * ac = get_ac_info(id); struct ac_info_ * ac = get_ac_info(id);
float dz = ac->alt - estimator_z; float dz = ac->alt - estimator_z;
if (dz > tcas_alim) return RA_DESCEND; if (dz > tcas_alim/2) return RA_DESCEND;
else if (dz < -tcas_alim) return RA_CLIMB; else if (dz < -tcas_alim/2) return RA_CLIMB;
else // AC with the smallest ID descend else // AC with the smallest ID descend
{ {
if (AC_ID < id) return RA_DESCEND; if (AC_ID < id) return RA_DESCEND;