The loco positioning system can be configured in two modes; Two Way Ranging (TWR) mode and in Time Difference of Arrival (TDoA) mode. The set up procedure is more straightforward in TWR mode and we recommend to use this mode also if you intend to use the system in TDoA mode as the switch to TDoA is easy to do after the setup. This guide describes the procedure using the TWR mode and at the end how to switch to TDoA mode.
In order to illustrate anchor placements we have documented two reference systems, one with 6 anchors and one with 8. The 6 anchor setup is mainly intended for TWR use while we recommend 8 anchors for the TDoA mode.
To be able to use the Loco positioning system you need to update the Crazyflie® to the latest firmware. For more information on how to update the firmware, see the update firmware in the Crazyflie section in our Getting started with the Crazyflie 2.0 or Crazyflie 2.1(+).
You will also need the latest version of the Crazyflie client.
For mounting the Loco Positioning deck check out the Getting started with expansion decks tutorial.
Before setting up the system you need to update the firmware and configure the the nodes.
Download and run the Loco Positioning configuration tool .exe installer to install the Loco Positioning tool.
Clone the Loco Positioning configuration tool GIT repo and follow the readme instruction to run the tool.
For the latest Loco Positioning node firmware go here and download the “lps-node-firmware.dfu” file.




Disconnect the node from the USB and repeat the same procedure for all the nodes before configuring them.
Now it’s time to set the mode for the nodes turning them into anchors, and setting the individual ids for each anchor. The anchors should be numbered from 0 and upwards.
Tip: to make it easy to identify the anchors and to manage the system in the future, it might be a good idea to mark the anchors with their ids.

To get a good result there are some rules of thumb for the placement of the anchors:
In our 8 anchor reference setup we have placed the nodes in the corners of a box as the position estimation for TDoA works best within the convex hull. The order of the IDs is important for TDoA2 but can be ignored for TDoA3.

In our 6 anchor reference setup we have placed 3 anchors above and 3 anchors below the flight area, shaped in inverse triangles.

If you have more than 8 anchors, we suggest you setup a system with 8 anchors first and then switch your system to TDoA3 to add more anchors to the system. See the tdoa3 setup page for more information.
The anchor can be powered in three different ways.

They can be connected at the same time so the anchor can still be power from the screw terminal when connecting the micro USB cable to do an update or when changing the configuration. All power options can handle 5-12V and the supply should be able to provide at least 150mA of current.
The following section will show a 8 anchor system but the procedure is very similar for a 6 anchor setup were anchor 6 & 7 will be grayed out.
Now when everything is mounted and powered it is time to configure the system, this is done from the Crazyflie client. Communication between the client and the anchors is relayed through the Crazyflie and the Loco Positioning deck.

Choose the Loco Positioning tab.
You may have to check it in the menu View->Tabs->Loco Positioning Tab to make it visible.

In the Anchor ranging status box, check that there are as many green boxes as there are anchors.
A red box indicates that the Crazyflie 2.x can not communicate with that anchor and does not get any ranging data. If this is the case, verify the anchor is configured correctly, powered and in line of sight.

To start configuring the anchor position you need to click on the “Configure positions” button.

A pop-up window will appear. Click the button “Get from anchors” to get the list of anchors and fill up the positions with the values currently stored in the anchors.


Anchors that do not already have a position stored will not appear in the list, in this case you have add them manually by clicking the “Add anchor” button.
Enter the positions (coordinates) of the anchors in your system. Note: measurements in meters.
When you enter a new value, the box turns red to indicate that it differs from the current value stored in the anchor.

Verifying the anchor positions is good to rule out problems with the positioning later. The 3D graph shows the anchors and the position of the Crazyflie. The red line indicates the X-axis, green i the Y-axis and blue is the Z-axis. The Graph can be rotated, moved and scaled using the mouse.


Congratulations, the Loco Positioning System is now calibrated!
If you intend to use the system in TDoA mode to fly more than one Crazyflie it is now time to change the system mode. There exist two version of the TDoA ranging protocol.
In the crazyflie status section tick the TWR radio button.
This will enable the “TDoA2” and “TDoA3” buttons in the anchor status section.

Click the “TDoA 2” or “TDoA 3” button to switch the anchors to one of the TDoA modes.
After a few seconds all anchor status boxes should turn red to indicate that the Crazyflie 2.x is no longer receiving TWR data from the anchors.

For details on system mode switching and troubleshooting, please see the documentation
As a last step, confirm the TDoA mode by ticking the Auto radio button in the Crazyflie status section and verify that the TDoA2 box turns green.
The anchor boxes should also turn green when the Crazyflie switches to TDoA mode and starts to receive data from the anchors.

If not all anchor boxes go green, please see the documentation for touble shooting.
Now when you got the basic functionality of the system up and running you might want to try Getting started with Flying using Loco Positioning.
To read the more techy documentation go to the Loco positioning documentation page.