I just got two-way ranging working. It was a struggle because I had to mess around with some of the timings.
The original code, designed to run on an M3 waits for 2600 units before responding to the ranging packet. The M0+ won’t work at all with any value less than 6000. Equally, the “no-response” timeouts have to be extended from 3300 to 7500 to make it listen long enough. I can probably fine-tune these a bit. I assume this is mostly down to the processor speed, but I can’t tell for sure.
One important thing is that the transceiver code must not be interrupted while it is constructing the response packet, or its peer transceiver will time out.
Measurements are OK, but not great. You can just about see the laser dot on the wall below the far (anchor) TS06.3, and the laser rangefinder, and ranging TS06.3 in the foreground. I think they are roughly on par with the BeSpoon unit.
(The length of the rangefinder is included in it’s measurement,
so we should subtract about 6cms to the antenna = 3.2m)
Some of the inaccuracy could be down to the antenna delay calibration – there’s none!
|Sensitive to antenna orientation|
I ran the same code on the TS06.2 units, and the range estimates were similarly inaccurate, though better when close. The maximum range was about the same as the 03 units, and they too were sensitive to orientation.