Python: Extracting Crazyflie Distance to Anchors

All discussions related to the Loco Positioning system
Post Reply
albussimba
Beginner
Posts: 10
Joined: Sat Sep 01, 2018 3:31 pm

Python: Extracting Crazyflie Distance to Anchors

Post 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?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Python: Extracting Crazyflie Distance to Anchors

Post 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
albussimba
Beginner
Posts: 10
Joined: Sat Sep 01, 2018 3:31 pm

Re: Python: Extracting Crazyflie Distance to Anchors

Post 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
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Python: Extracting Crazyflie Distance to Anchors

Post 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.
Post Reply