User Tools

Site Tools


doc:lps:toda3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:lps:toda3 [2018-06-15 08:51]
kristoffer
doc:lps:toda3 [2020-05-12 14:08] (current)
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 websitePlease go to [[https://www.bitcraze.io/documentation/system/]]
-<WRAP center round tip 80%> +
-**NOTE** +
-The TDoA3 mode is experimentalThe protocol and implementation might change but is fairly stable.+
 </WRAP> </WRAP>
  
-===== Compile and flash ===== 
  
-To try it out you will have to do the following:+====== TDoA 3 set up ======
  
-==== The Crazyflie ====+TDoA 3 is part of the official Crazyflie and LPS Node firmware releases since 2018.10.
  
-  * Get the latest source code for the firmware from [[https://github.com/bitcraze/crazyflie-firmware]]. Make sure the git submodules are updated +The Crazyflie will automatically detect that the positioning system is using TDoA3 and switch to the correct mode. 
-  * Compile for TDoA3 and force the TDoA mode with ''make "EXTRA_CFLAGS=-DLPS_TDOA_USE_V3 -DLPS_TDOA_ENABLE"'' +If you want to force the Crazyflie to use TDoA3 on startup, use the LPS_TDOA3_ENABLE=1 compile option
-  * Flash the Crazyflie with ''make cload'' script.+
  
 ==== The LPS Nodes ==== ==== The LPS Nodes ====
  
-  * Get the latests source code for the firmware from [[https://github.com/bitcraze/lps-node-firmware]]. Make sure the git submodules are updated 
-  * Compile 
-  * Flash the nodes using ''make dfu'' 
   * 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 (0 7) but if you have more anchors you will have toools/lpp/set_positions.py script.py+  * Set anchor positions, see below. 
 + 
 +===== Setting anchor positions ===== 
 + 
 +Anchor positions can be set by the python client or the tool in the lps-node-firmware repo. 
 +You might have to move the Crazyflie close to all anchors to transfer the positions from the Crazyflie.  
 + 
 +All the anchors work in the same coordinate system, so you need to choose a common origin for your systemTry 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 29: 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 ''make "EXTRA_CFLAGS=-DLPS_TDOA_USE_V3 -DLPS_TDOA_ENABLE -DLPS_2D_POSITION_HEIGHT=1.2"'' if the tag will be located at 1.2 meters height.+For instance ''make "EXTRA_CFLAGS=-DLPS_2D_POSITION_HEIGHT=1.2"'' if the tag will be located at 1.2 meters height.
  
 ===== Longer range and lower bitrate ===== ===== 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. 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 and anchors with the LPS_LONGER_RANGE compile flag.+Recompile the Crazyflie firmware with the LPS_LONGER_RANGE compile flag.
  
-Example: ''make "EXTRA_CFLAGS=-DLPS_TDOA_USE_V3 -DLPS_TDOA_ENABLE -DLPS_LONGER_RANGE"''+Example: ''make "EXTRA_CFLAGS=-DLPS_LONGER_RANGE"'' 
 + 
 +There is a setting for the bitrate in the Anchor configuration when connecting using USB.
  
 ===== Longer preamble ===== ===== 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. 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.
Line 54: Line 59:
 ==== The LPS Nodes ==== ==== The LPS Nodes ====
  
-  * Find the src/uwb.c file +  * There is a configuration setting for the preamble length
-  * Locate the call to dwEnableMode() +
-  * Change the second argument to MODE_LONGDATA_MID_ACCURACY +
-  * Find the src/uwb_tdoa_anchor3.c file +
-  * 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.+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 ==== ==== Basic sniffing ====
Line 87: Line 88:
  
 example: ''python3 tools/sniffer/sniffer_binary.py /dev/tty.usbmodem1421 yaml | python3 tools/sniffer/tdoa3_decoder.py | python3 tools/sniffer/tdoa3_tof.py m'' example: ''python3 tools/sniffer/sniffer_binary.py /dev/tty.usbmodem1421 yaml | python3 tools/sniffer/tdoa3_decoder.py | python3 tools/sniffer/tdoa3_tof.py m''
- 
-==== 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. 
- 
-The tool uses a Crazyflie as a bridge to transmit UWB messages to the anchors. When it is started it transmits positions for all anchors over and over, 
- 
-The tool is somewhat hackish and could use some updates, for instance the Crazyflie radio address is hardcoded in the script. Be prepared to modify the script... 
- 
-  * Create a file with your anchor positions, see tools/lpp/positions_example.yaml 
-  * Start the Crazyflie 
-  * Pipe the position file into the tool ''cat my_position_file.yaml | python3 tools/lpp/set_positions.py'' 
-  * Move the Crazyflie close to all anchors to transfer the positions 
  
  
doc/lps/toda3.1529045511.txt.gz · Last modified: 2018-06-15 08:51 by kristoffer