mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 15:30:08 +08:00
change detection range for tcas
This commit is contained in:
committed by
Felix Ruess
parent
e1a193998a
commit
776755aca1
@@ -89,8 +89,8 @@ void tcas_init( void ) {
|
||||
static inline enum tcas_resolve tcas_test_direction(uint8_t id) {
|
||||
struct ac_info_ * ac = get_ac_info(id);
|
||||
float dz = ac->alt - estimator_z;
|
||||
if (dz > tcas_alim) return RA_DESCEND;
|
||||
else if (dz < -tcas_alim) return RA_CLIMB;
|
||||
if (dz > tcas_alim/2) return RA_DESCEND;
|
||||
else if (dz < -tcas_alim/2) return RA_CLIMB;
|
||||
else // AC with the smallest ID descend
|
||||
{
|
||||
if (AC_ID < id) return RA_DESCEND;
|
||||
|
||||
Reference in New Issue
Block a user