This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
doc:lps:twr-tdma [2017-07-18 15:37] arnaud [Abstract] |
doc:lps:twr-tdma [2018-10-19 07:24] arnaud |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== TWR-TDMA ====== | ====== TWR-TDMA ====== | ||
+ | |||
+ | <WRAP center round important> | ||
+ | **Note**: TWR-TDMA is now considered obsolete and replaced by the TDoA modes. TDoA will generally have better performance than TWR-TDMA, TWR might still be useful to you though but if you are setting up a single room system TDoA is most likely the way to go. | ||
+ | </ | ||
+ | |||
===== Abstract ===== | ===== Abstract ===== | ||
Line 11: | Line 16: | ||
The disadvantage is that the tag has to actively send packets, it means that two tag cannot range at the same time and so some synchronization mechanism has to be put in place to allow multiple tag to use TWR measurement concurrently. | The disadvantage is that the tag has to actively send packets, it means that two tag cannot range at the same time and so some synchronization mechanism has to be put in place to allow multiple tag to use TWR measurement concurrently. | ||
- | With TWR-TDMA | + | TWR-TDMA |
===== Compiling Crazyflie for TWR-TDMA ranging ===== | ===== Compiling Crazyflie for TWR-TDMA ranging ===== | ||
In order to activate TWR-TDMA, you need to recompile the Crazyflie firmware. Add the following to ' | In order to activate TWR-TDMA, you need to recompile the Crazyflie firmware. Add the following to ' | ||
- | < | + | < |
LPS_TDMA_ENABLE=1 | LPS_TDMA_ENABLE=1 | ||
CFLAGS += -DTDMA_NSLOTS_BITS=1 | CFLAGS += -DTDMA_NSLOTS_BITS=1 | ||
Line 23: | Line 28: | ||
* **LPS_TDMA_ENABLE=1** Enable the TDMA mode for TWR | * **LPS_TDMA_ENABLE=1** Enable the TDMA mode for TWR | ||
- | * **TDMA_NSLOTS_BITS=1** Configures 2 time slot (good for 2 tags). The number of time slot is 2^TDMA_NSLOTS_BITS | + | * **TDMA_NSLOTS_BITS=1** Configures 2 time slot (good for 2 tags) per frame. The number of time slot per frame is 2^TDMA_NSLOTS_BITS |
- | * **TDMA_SLOT** Optionally hardcode the time slot. See bellow for time slot auto-configuration. | + | * **TDMA_SLOT** Optionally hardcode the time slot. See bellow for time slot auto-configuration |
===== Configuring time slots ===== | ===== Configuring time slots ===== | ||
Line 32: | Line 37: | ||
===== System performance ===== | ===== System performance ===== | ||
- | TWR-TDMA is currently implemented with time slots of 4ms. Each time slot is used by one tag to range with one anchor. This means that the ranging rate is of //1/(0.004 * (2^TDMA_NSLOTS_BITS)// | + | TWR-TDMA is currently implemented with time slots of 4ms. Each time slot is used by one tag to range with one anchor. This means that the ranging rate is of //1/(0.004 * 2^TDMA_NSLOTS_BITS)// |
- | The more timeslots, the less often measurements can be used to estimate the tag position and so the performance of the position estimate will deteriorate. For a great number of tag the [[doc: | + | The more timeslots |