Page 1 of 1

how to decide timeout value and distinguish some events

Posted: Sun Feb 26, 2017 5:27 am
by justinleeyang
Hi, araund:

about the tdoa anchor or tag receive timeout, for example:

Code: Select all

crazyflie2 LocoDeck.c : 
#if LPS_TDOA_ENABLE
  #define RX_TIMEOUT 10000
#else
  #define RX_TIMEOUT 1000
#endif

lps node Uwb_tdoa_anchor.c :
// Timeout for receiving a packet in a timeslot
#define RECEIVE_TIMEOUT 250
there are some doubts, how to decide the value,
another question is how to distinguish the eventTimeout and eventReceiveTimeout ?

Re: how to decide timeout value and distinguish some events

Posted: Mon Feb 27, 2017 2:49 pm
by arnaud
Hi Justin,

In TWR mode the RX timeout is set to 1ms and it is used to detect quickly if an anchor is not answering. 1ms has proven to be long enough to allow enough time for the anchor to respond, and short enough to not loose too much time on a switched-off anchor.

In TDoA mode the radio should always listen, ideally we should not have any RX timeout. Though the architecture of the code was slightly easier if we kept a timeout so we set it to 10ms which is much longer than the space between 2 TDoA packets (2ms). The timeout does not have any impact in TDoA.

eventReceiveTimeout is when the DW1000 radio was set to receive with a timeout and this timeout has expired.

eventTimeout is a functionality of the loop that runs the algorithm: each time the onEvent function is called it returns a maximum time before the next radio event, if no radio event is generated before this time eventTimeout is triggered.

Regards,
/Arnaud

Re: how to decide timeout value and distinguish some events

Posted: Tue Feb 28, 2017 4:00 am
by justinleeyang
Hi, arnaud:

Got it. thanks your reply.