I am working with the TTK 1000 DK and I would like to ask if there is a way to auto-position the Anchors? I have put 4 Anchors in a room and I have managed through RTLSController.exe to calculate the TWR distance between them. But, I do not know the real coordinates of the Anchors and it is impossible to adapt the geometrical distance with the TWR distance only by moving the Anchors on the Grid until to get the right position. So is there any way to do that automatically?
Thank you very much in advance
I’ve done something very similar. I used a least squares estimate to calculate the best fit locations for a given set of measurements.
I had 7 anchors and was also estimating the antenna delays at the same time but a similar method can be used for only the X/Y locations with only 4 anchors. More anchors would improve the accuracy but it should work with 4.
The python code attached is a quick hack of my 7 anchor position and delay code to reduce it down to 4 anchors and position only. It assumes the first anchor is at 0,0 and you specify the heading from anchor 1 to anchor 2. It does assume all anchors are at the same height, if you have significant height differences you may need to add extra code to allow for this.
You will need to edit the measurements array at the start to be your range measurements. And then in main() set some suitable initial guesses for the positions.
Apologies for any syntax or silly errors that have slipped in. I’ve just created this by hacking some bits out of my old code from 3 years ago.
PlaceAntennas.py (1.7 KB)