Hi, Welcome!
Thanks for the well-constructed post with clear question, makes it much easier to answer!
For the hardware side you have all you need.
- what should I study before starting writing code.
Getting familiar with the Crazyflie code architecture is a good idea. We have one documentation that takes you from nothing to changing an LED behaviour, it is a good way to get started:
https://www.bitcraze.io/getting-started ... velopment/
- how does the crazyflie communicate with crazyradio and LPS nodes, and understand the software state machine behind the system.
Crazyradio and LPS nodes are handle in two completly different way.
Crazyradio is part of the CRTP communication stack, it is used to send CRTP packet back and forth with the Crazyflie. You can find some documentation about CRTP in the wiki:
https://wiki.bitcraze.io/doc:crazyflie:crtp:index. Depending on what you are exactly interested into there is more documentation about the Crazyradio itsef, higher level protocol, and there is the code to understand how things are implemented (for instance there is an abstraction layer that allows us to use USB as well as Crazyradio easily, it is done so that other link could easily be added like serial port or even UWB radios).
The LPS communication is handled by the Locodeck deck driver. The doc about the deck drivers is in the wiki as well:
https://wiki.bitcraze.io/doc:crazyflie: ... mware:deck. The deck driver is initialized automatically when the Loco deck is detected at startup and it initialize and uses the UWB radio.
- how can i set up a Tool-Chain for Eclipse, to compile the code (and maybe simulate it)
Setting up the toolchain is documented on github:
https://github.com/bitcraze/crazyflie-f ... -toolchain
The Crazyflie project uses a simple Makefile to compile so Eclipse is not a hard requirement. If you want to use Eclipse you can start from the configuration we setup in the virtual machine:
https://github.com/bitcraze/bitcraze-vm ... ject-files. In the virtual machine this folder is copied in the home folder and the projects are cloned in the projects/ folder (so that they end-up in the same folder as the eclipse configuration).
Unfortunately there is currently no way to simulate the Crazyflie code.
- Which part of the firmware(s) should i look to understand the communication between deck and nodes, and which part should I change for my purpose.
You should look at the locodeck.c file, this is the driver for the UWB chip. The ranging algorithms are in the files named lps...:
https://github.com/bitcraze/crazyflie-f ... rivers/src. The code is architectured in such a way that it is easy to swap the ranging algorithms for another one, this is how we can compile TWR or TDoA mode. You can start from one of the existing algorithm or create your own.
There is some reference doc on the wiki about the TWR algorithm:
https://wiki.bitcraze.io/doc:lps:lpp
I hope this helps you getting started, do not hesitate if you have more questions.