Hello everyone, this is my first post.
Apologizes if the same problem has been posted before.(I haven’t search for similar problem.) Orz
I recently try to integrate DWM1000 module into my PCB board (Cortex M0), but I met some problem about the ranging.
I want to implement the ranging method as this picture
(The [color=#ff3333]red [/color]and [color=#3333ff]blue [/color]number shows the timestamp I collect from Device A and Device B)
The distance I calculate is 153.88 meters, but the actual distance is between 1 meter ~ 2 meters.
The formula I use is as the picture above.
After I collect all timeStamp I need, I could calculate the T_prop.
And I transfer the T_prop to distance(meter) by multiply the 0.0046917639786159f.
I think the problem is occurred from the timeStamp I collect.
(I have checked the calculation process in “each timeStamp->T_prop” and “T_prop->Distance”. )
I posted some picture about part of my code, and add my source code.
If anyone can solve my problem, I really appreciate!!
This picture shows the configuration(After device name) and the communication ([color=#3333ff]As [Anchor] role!![/color]):
This picture shows my main function([color=#3333ff]As [Anchor] role!![/color]):
This picture shows the DWM1000_Initialization([color=#3333ff]As [Anchor] role!![/color]):
This picture shows rxcallback function ([color=#3333ff]As [Anchor] role!![/color]):
This picture shows txcallback function ([color=#3333ff]As [Anchor] role!![/color]):
Source code link (Google drive):
https://drive.google.com/file/d/1ir3EwEmkRD6g-cdq_GLqNSOCE0kpIRjF/view?usp=sharing
Really appreciate your assistance and patience again.
Jacky Su