“Do you mean if I want to calibrate my board, I need to compile the C language code from decawave example and change the following two lines (
[link](https://github.com/Decawave/dwm1001-examples/blob/1b2a46e14546d8f24cf08ff3d64d802e109cd2d3/examples/ss_twr_init_int/main.c#L64) ) until I get good TWR accuracy.”
Yes correct. Well i dont know how is the handling of PANS code about ranges.
What im gona tell you is about my experience using my code because i want to have control on it and not using a “black box” where i dont know if the ranges are raw or not.
So with the mdek1001 (my case) the antenna delay comes with a positive error value of antenna delay, so all the devices that loads the calibration values from the OTP will have it. Then that error could be summed (from device A plus the device B error) and then you have that error of 20cm. In my case was something like that actuyally. If you have another devices and use it you should see some different errors maybe (if they have different antenna delay value).
Currently I try to use two device which one anchor and one tag. However there is ±20cm error from actual distance. Is it possible to increase the accuracy?
So what i did is just put them on a distance recommened (my case was channel 5 (128 preamble and 1024 preamble) - 5010mm) and then trying to find a “better” value for antenna delay. Remenber that this will be a improvement on LOS but in a case of NLOS could make the errors greater. Keep in mind that this calibration has to be on statistics measures like 99% of measure inside you measure and std.
Dont forget too about two important aspects! First the trim of crystal - that you have on OTP value too and secound the range bias correction that you could make it too. In this case you have documentation to help too on this task Decawave application notes. Keep in mind that for all of this there are a lot of “problems” like physical antenna rotation and reflection and so on…
I hope i could help.