This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
doc:lps:toda3 [2018-06-15 08:51] kristoffer |
doc:lps:toda3 [2018-10-31 18:21] kristoffer |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== TDoA 3 set up ====== | ====== TDoA 3 set up ====== | ||
- | <WRAP center round tip 80%> | + | TDoA 3 is part of the official Crazyflie and LPS Node firmware releases since 2018.10. |
- | **NOTE** | + | |
- | The TDoA3 mode is experimental. The protocol and implementation might change but is fairly stable. | + | |
- | </ | + | |
- | ===== Compile and flash ===== | + | The Crazyflie |
- | + | If you want to force the Crazyflie | |
- | To try it out you will have to do the following: | + | |
- | + | ||
- | ==== The Crazyflie | + | |
- | + | ||
- | * Get the latest source code for the firmware from [[https:// | + | |
- | * Compile for TDoA3 and force the TDoA mode with '' | + | |
- | * Flash the Crazyflie | + | |
==== The LPS Nodes ==== | ==== The LPS Nodes ==== | ||
- | * Get the latests source code for the firmware from [[https:// | ||
- | * Compile | ||
- | * Flash the nodes using '' | ||
* Configure the Nodes as anchors, and set the mode to TDoA 3 | * Configure the Nodes as anchors, and set the mode to TDoA 3 | ||
- | * Anchor | + | * Set anchor |
- | ===== 2D positioning | + | ===== Setting anchor positions |
- | TDoA 3 supports 2D positioning as well. In this mode all anchors | + | Anchor positions |
- | + | You might have to move the Crazyflie | |
- | Recompile the Crazyflie firmware using the LPS_2D_POSITION_HEIGHT compile flag set to the desired Z. | + | |
- | For instance '' | + | |
- | + | ||
- | ===== Longer range and lower bitrate ===== | + | |
- | + | ||
- | In this mode the UWB bitrate is lower and the data of messages can be read at a longer distance. The packet rate will be reduced though. | + | |
- | + | ||
- | Recompile both Crazyflie | + | |
- | + | ||
- | Example: '' | + | |
- | + | ||
- | ===== Longer preamble ===== | + | |
- | + | ||
- | It is possible | + | |
- | The preamble is used by the anchor radios | + | |
- | Note that the radios might detect the preamble but fail at reading the data of the packet (see lower bitrate above). The " | + | |
- | + | ||
- | ==== The Crazyflie | + | |
- | + | ||
- | * Find the src/ | + | |
- | * Locate the call to dwEnableMode() | + | |
- | * Change the second argument to MODE_LONGDATA_MID_ACCURACY | + | |
- | * Compile and flash | + | |
- | + | ||
- | ==== The LPS Nodes ==== | + | |
- | + | ||
- | * Find the src/uwb.c file | + | |
- | * Locate the call to dwEnableMode() | + | |
- | * Change the second argument to MODE_LONGDATA_MID_ACCURACY | + | |
- | * Find the src/ | + | |
- | * Locate the line where PREAMBLE_LENGTH_S is defined | + | |
- | * Change it to 1024 bits: #define PREAMBLE_LENGTH_S ( 1024 * 1017.63e-9 ) | + | |
- | * Compile and flash | + | |
===== Sniffing ===== | ===== Sniffing ===== | ||
- | If an anchor is configured to act as a sniffer, it can be used to listen to the UWB messages in the system. To set an anchor to sniffer mode, connect via USB. | + | If an anchor is configured to act as a sniffer, it can be used to listen to the UWB messages in the system. To set an anchor to sniffer mode, connect via USB and configure it to sniffer mode. |
==== Basic sniffing ==== | ==== Basic sniffing ==== | ||
Line 88: | Line 42: | ||
example: '' | example: '' | ||
- | ==== Setting anchor positions ==== | ||
- | Anchor positions can be set by the python client but it only supports ids 0-7. If you want to use more anchors there is a tool that can be used. | + | ===== 2D positioning ===== |
- | The tool uses a Crazyflie | + | TDoA 3 supports 2D positioning |
- | The tool is somewhat hackish and could use some updates, for instance | + | Recompile |
+ | For instance '' | ||
- | * Create | + | ===== Longer range and lower bitrate ===== |
- | * Start the Crazyflie | + | |
- | * Pipe the position file into the tool '' | + | Note: this is experimental functionality that is not fully tested or might not work as expected. |
- | * Move the Crazyflie close to all anchors to transfer | + | |
+ | In this mode the UWB bitrate is lower and the data of messages can be read at a longer distance. The packet rate will be reduced though. | ||
+ | |||
+ | Recompile the Crazyflie firmware | ||
+ | |||
+ | Example: '' | ||
+ | |||
+ | There is a setting for the bitrate in the Anchor configuration when connecting using USB. | ||
+ | |||
+ | ===== Longer preamble ===== | ||
+ | |||
+ | Note: this is experimental functionality that is not fully tested or might not work as expected. | ||
+ | |||
+ | It is possible to use a longer preamble, this will also reduce packet rate. There is no compile flag for this setting, it requires some code modifications in the Crazyflie and the anchors. | ||
+ | The preamble is used by the anchor radios to detect messages and a longer preamble increase the probability and thus the useful distance. | ||
+ | Note that the radios might detect the preamble but fail at reading the data of the packet (see lower bitrate above). The " | ||
+ | |||
+ | ==== The Crazyflie | ||
+ | |||
+ | * Find the src/deck/drivers/ | ||
+ | * Locate | ||
+ | * Change | ||
+ | * Compile and flash | ||
+ | |||
+ | ==== The LPS Nodes ==== | ||
+ | * There is a configuration setting for the preamble length | ||