This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doc:lps:toda3 [2018-06-13 13:52] kristoffer |
doc:lps:toda3 [2020-05-12 14:08] kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== TDoA 3 set up ====== | + | <WRAP center round important 60%> |
- | + | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | |
- | <WRAP center round tip 80%> | + | |
- | **NOTE** | + | |
- | The TDoA3 mode is experimental. The protocol and implementation might change but is fairly stable. | + | |
</ | </ | ||
- | To try it out you will have to do the following: | ||
- | ===== The Crazyflie | + | ====== TDoA 3 set up ====== |
- | * Get the latest source code for the firmware | + | TDoA 3 is part of the official Crazyflie and LPS Node firmware |
- | * Compile for TDoA3 and force the TDoA mode with '' | + | |
- | * Flash the Crazyflie with '' | + | |
- | ===== The LPS Nodes ===== | + | The Crazyflie will automatically detect that the positioning system is using TDoA3 and switch to the correct mode. |
+ | If you want to force the Crazyflie to use TDoA3 on startup, use the LPS_TDOA3_ENABLE=1 compile option | ||
+ | |||
+ | ==== 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 positions can be set using the python client | + | * Set anchor positions, see below. |
+ | |||
+ | ===== Setting anchor positions ===== | ||
+ | |||
+ | Anchor positions can be set by the python client | ||
+ | You might have to move the Crazyflie close to all anchors | ||
+ | |||
+ | All the anchors work in the same coordinate system, so you need to choose a common origin for your system. Try to expand your system step by step, testing it at each step to catch problem when they start to happen. | ||
===== 2D positioning ===== | ===== 2D positioning ===== | ||
Line 27: | Line 28: | ||
Recompile the Crazyflie firmware using the LPS_2D_POSITION_HEIGHT compile flag set to the desired Z. | Recompile the Crazyflie firmware using the LPS_2D_POSITION_HEIGHT compile flag set to the desired Z. | ||
- | For instance '' | + | For instance '' |
+ | |||
+ | ===== Longer range and lower bitrate ===== | ||
+ | |||
+ | Note: this is experimental functionality that is not fully tested or might not work as expected. | ||
+ | |||
+ | 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 with the LPS_LONGER_RANGE compile flag. | ||
+ | |||
+ | 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/ | ||
+ | * Locate the call to dwEnableMode() | ||
+ | * Change the second argument to MODE_LONGDATA_MID_ACCURACY | ||
+ | * Compile and flash | ||
+ | |||
+ | ==== The LPS Nodes ==== | ||
+ | |||
+ | * There is a configuration setting for the preamble length | ||
+ | |||
+ | ===== Sniffing ===== | ||
+ | |||
+ | Sniffing the system is useful when you want to start digging into the radio messages exchanged between the anchor. It is a debug functionality. | ||
+ | |||
+ | 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 ==== | ||
+ | |||
+ | Connect the sniffer via USB and check in /dev which port that it uses. Use this as the first argument | ||
+ | The second argument is the output format, use yaml | ||
+ | example: '' | ||
+ | |||
+ | ==== TDoA 3 parsing ==== | ||
+ | |||
+ | Pipe the yaml into the TDoA 3 decoder to see TDoA 3 data unpacked | ||
+ | |||
+ | example: '' | ||
+ | |||
+ | This will show all data that the sniffer receives. To limit the output it is possible to filter which anchors to show. Add one or more ids at the end to only show data from only these anchors. | ||
+ | |||
+ | example: '' | ||
+ | |||
+ | ==== Time of flight and anchor to anchor distance ==== | ||
+ | |||
+ | By piping the TDoA 3 data into the TOF tool, the measured anchor to anchor distances will be displayed. By adding the ' | ||
+ | |||
+ | example: '' | ||