Two Way Ranging Distance Calibration

Hi,

I am using the ss_twr code from the decawave github:

When reading the values printed through UART on the init side, I am getting distance values of about 1.8-2.3 M (fluctuating) when the measured distance is 1.5 M. Is there any way to adjust the code so the distance is both more consistent and more accurate?
Thanks!

Hi Vik,

You must calibrate the antenna delay values in the code at a given distance. So for example set the distance to 2meters, and modify those value until measured distance is correct.

Hope it helps,
Yes

Hi, thanks for responding. Do you know where I can find these antenna delay values in the code?

Hi Vik,

They are easy to find in main.c with a bit of research:

/Should be accurately calculated during calibration/
#define TX_ANT_DLY 16300
#define RX_ANT_DLY 16456

Hope it helps,
Yves

1 Like

Forgive me for intrusion,Yves, is this weak delay difference important?
Iā€™v got reference/measured diff about 3-5 cm at 10 meter base.

It depends how accurate you want things to be.

Hi,
I am a little confused because of the antenna delay values. I have a RTLS already up and running but did not make use of any external C code. I only use the stock PANS firmware image version 2.
I wonder if it a) made sense for me to alter the delays and b) if it was actually possible to do so. Or is that only important when using the TWR example? But what delay values does the stock firmware provide then?

Regards, Max