how to decide timeout value and distinguish some events

All discussions related to the Loco Positioning system
Post Reply
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

how to decide timeout value and distinguish some events

Post 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 ?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: how to decide timeout value and distinguish some events

Post 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
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: how to decide timeout value and distinguish some events

Post by justinleeyang »

Hi, arnaud:

Got it. thanks your reply.
Post Reply