13 #define FORM_MODE_GLOBAL 0
14 #define FORM_MODE_COURSE 1
34 extern int add_slot(
uint8_t _id,
float slot_e,
float slot_n,
float slot_a);
36 #define UpdateSlot(_id, _se, _sn, _sa) { \
37 formation[the_acs_id[_id]].east = _se; \
38 formation[the_acs_id[_id]].north = _sn; \
39 formation[the_acs_id[_id]].alt = _sa; \
42 #define UpdateFormationStatus(_id,_status) { formation[the_acs_id[_id]].status = _status; }
44 #define ParseFormationStatus() { \
45 uint8_t ac_id = DL_FORMATION_STATUS_ac_id(dl_buffer); \
46 uint8_t leader = DL_FORMATION_STATUS_leader_id(dl_buffer); \
47 uint8_t status = DL_FORMATION_STATUS_status(dl_buffer); \
48 if (ac_id == AC_ID) leader_id = leader; \
49 else if (leader == leader_id) { UpdateFormationStatus(ac_id,status); } \
50 else { UpdateFormationStatus(ac_id,UNSET); } \
53 #define ParseFormationSlot() { \
54 uint8_t ac_id = DL_FORMATION_SLOT_ac_id(dl_buffer); \
55 uint8_t mode = DL_FORMATION_SLOT_mode(dl_buffer); \
56 float slot_east = DL_FORMATION_SLOT_slot_east(dl_buffer); \
57 float slot_north = DL_FORMATION_SLOT_slot_north(dl_buffer); \
58 float slot_alt = DL_FORMATION_SLOT_slot_alt(dl_buffer); \
59 UpdateSlot(ac_id, slot_east, slot_north, slot_alt); \
60 if (ac_id == leader_id) form_mode = mode; \
Fixedwing Navigation library.
Information relative to the other aircrafts.