Strange timestamp values with DWM1001-Dev

Hi!

I’m currently working on my thesis with 5 DWM1001-Dev modules, and I’m trying to implement a novel positioning algorithm. However, I’m having a strange and very serious issue when I want to get the Rx and Tx timestamps.

To explain the issue, let’s consider 3 modules: I call them anchors 1, 2 and 3. With these anchors I want to send a series of packets in this way:

  • Anchor 2 -> Anchor 1 -> Anchor 3.
  • Anchor 3 -> Anchor 2 -> Anchor 1.
  • Anchor 1 -> Anchor 3 -> Anchor 2.

With these X-Y coordinates (in metres):

  • Anchor 1: (0, 2.37).
  • Anchor 2: (1.7, 2.37).
  • Anchor 3: (1.7, 0).

And I save every timestamp I can obtain. For example, in the first iteration I have the anchor 2’s Tx timestamp, anchor 1’s Tx and Rx timestamps, and anchor 3’s Rx timestamp. Once I have all the timestamps, I send them to a coordinator module in order to process them with a Matlab app.

However, I’ve found some strange timestamp values. That algorithm is implemented without any sleep function (that is, as soon as one anchor receives a packet, it transmits another one), but the time difference between iterations for the same anchors are way too high, and that leads to terribly wrong distance measurements at positioning.

Just to put an example, in the first iteration the “dwt_readtxtimestamp()” function saved these values for anchor 1 (I have already reordered the elements to put the MSB first): [1 213 220 138 72]. After converting it to a uint64 value and multiplying it by DWT_TIME_UNITS (by the way, is this constant in seconds?), it gives a value of 0.123418205536072 seconds.

Now, in iteration 2 the same anchor receives a packet from anchor 2, and “dwt_readrxtimestamp()” gives a value of 0.124795181456663 seconds. That is, there’s a difference of 1 msec, way too above the propagation time one would expect for such short distances (of a few metres).

I have been dealing with this issue for a week and I have found nothing about it, because the “wrong” values come from the DW1000’s timestamp register and there’s nothing I can do about this. I would be really grateful if somebody could shed some light on this. I can share with you the code if it makes it easier, but the code is really simple (I send a packet, record the Tx timestamp, I receive a packet, and record the Rx timestamp).

Thank you

1 Like