hello
i want crazyflie to range other crazyflie using TWR.
I found TWR code in crazyfile-firmwarehttps://github.com/bitcraze/crazyflie-f ... psTwrTag.c but still i have no idea how to start
It would be appreciated if somebody could give me a help
thanks!
john
ranging between crazyflies
Re: ranging between crazyflies
If you want only 2 Crazyflies to range to each-other, TWR might be a good solution. The code you are linking is the tag part of TWR, the anchor part lives in the LPS node (https://github.com/bitcraze/lps-node-fi ... r_anchor.c) and can be ported to the Crazyflie so that Crazyflies can be used as anchor. This will range one to many Crazyflie, it will be hard to addapt it to range many to many Crazyflie.
For ranging many to many the best is to use asynchronous messaging, the way it is done in TDoA3. There has been some work in the comunity about addapring the TDoA3 protocol to work between Crazyflies, the fruit of this work is currently in a pull request: https://github.com/bitcraze/crazyflie-firmware/pull/656. TDoA3 does implement ranging between anchors, this pull request adds support for drone to range between each other as well.
For ranging many to many the best is to use asynchronous messaging, the way it is done in TDoA3. There has been some work in the comunity about addapring the TDoA3 protocol to work between Crazyflies, the fruit of this work is currently in a pull request: https://github.com/bitcraze/crazyflie-firmware/pull/656. TDoA3 does implement ranging between anchors, this pull request adds support for drone to range between each other as well.
Re: ranging between crazyflies
Hi,John.
Our group already achieved this. Here is the code:https://github.com/twinhorse/crazyflie- ... bp2pdist.c.
There are still some codes need to be modified, which you can find in this Github Project. This code just came true ranging between two crazyflies.
By the way,I`m try to set a lpsnode as tag and anchor at the same time so that lpsnode can receive answer/report packets. However, I met some difficulities. The logic to solve this problem is the same as ranging between two crazyflies , so if you are interested in this problem. We can keep communicating.
Mathilda.
Our group already achieved this. Here is the code:https://github.com/twinhorse/crazyflie- ... bp2pdist.c.
There are still some codes need to be modified, which you can find in this Github Project. This code just came true ranging between two crazyflies.
By the way,I`m try to set a lpsnode as tag and anchor at the same time so that lpsnode can receive answer/report packets. However, I met some difficulities. The logic to solve this problem is the same as ranging between two crazyflies , so if you are interested in this problem. We can keep communicating.
Mathilda.
Last edited by Mathilda on Mon Dec 14, 2020 4:20 am, edited 2 times in total.
Re: ranging between crazyflies
Hi, Mathilda
Thanks for sharing the code.
I have read your reply the day you posted but I was already using inter-drone twr ranging code of this: https://github.com/bitcraze/crazyflie-firmware/pull/580
What i'm trying to do is opposite as yours, making drone working as tag and anchor. Also, using TDOA2 algorithm when tag and inter-drone twr algorithm when anchor.
Thanks for the code again, it helped me understanding how twr code works.
John
Thanks for sharing the code.
I have read your reply the day you posted but I was already using inter-drone twr ranging code of this: https://github.com/bitcraze/crazyflie-firmware/pull/580
What i'm trying to do is opposite as yours, making drone working as tag and anchor. Also, using TDOA2 algorithm when tag and inter-drone twr algorithm when anchor.
Thanks for the code again, it helped me understanding how twr code works.
John