Hi,
Reference a github lps-node-firmware, print the distance value is negative number, for example, -105mm,-136mm. we see that you measure the distance with the DS-TWR method follow as:
Tag send poll -> Anchor receive poll, then answer -> Tag reveive answer, then send final -> Anchor reveive final, then send report(include pressure and anchor timestamp information) -> Tag receive report, then calculate the distance.
I see the algorithm:
tprop_ctn = ((tround1*tround2) - (treply1*treply2)) / (tround1 + tround2 + treply1 + treply2);
Two issue:
(1)I don’t konw how to get the formula.
(2)From the dw1000(http://www.kynix.com/Parts/2705023/DWM1000.html)-user-manual, we find the formula
But we should more easily understand the 12.3.3 Using symmetric reply times formula: