Page 1 of 1

Python: Extracting Crazyflie Distance to Anchors

Posted: Thu Jan 24, 2019 12:09 pm
by albussimba
Hi there,

I am wonder is it possible to read off the anchors distance to the crazyflie instead of the crazyflie position in python.

Or do i have to calculated it from the anchor position and the position that is read off the crazyflie?

Re: Python: Extracting Crazyflie Distance to Anchors

Posted: Thu Jan 24, 2019 12:45 pm
by tobias
What mode are you using, TWR I guess? There are log variables for the disctances in TWR called ranging.dinstanceX where X is the distance to that anchor number. See LpsTwrTag.c

Re: Python: Extracting Crazyflie Distance to Anchors

Posted: Thu Jan 24, 2019 1:43 pm
by albussimba
I'm using TDoA3 but I'm unsure if the range data is being transmitted back or only the position data is being transmitted back

because in the crazyflie client the ranging data is a constant zero

Image

Re: Python: Extracting Crazyflie Distance to Anchors

Posted: Thu Jan 24, 2019 2:46 pm
by arnaud
With TDoA the range to the anchor is not directly measured by the Crazyflie. The TDoA, time diference of arival, is measured and results in a difference of distance between two anchors. With TDoA3 there is a lot of possible TDoA measurement, one for each couple of anchors, so they are not available directly as log.

So if you are using TDoA and want the distance to an anchor you need to calculate it from the position estimate and the anchor position.