[][src]Module dw1000::ranging

Implementation of double-sided two-way ranging

This ranging technique is described in the DW1000 user manual, section 12.3. This module uses three messages for a range measurement, as described in section 12.3.2.

This module defines the messages required, and provides code for sending and decoding them. It is left to the user to tie all that together, by sending out the messages at the right time.

There can be some variation in the use of this module, depending on the use case. Here is one example of how this module can be used:

  1. Nodes are divided into anchors and tags. Tags are those nodes whose position interests us. Anchors are placed in known locations to enable range measurements.
  2. Anchors regularly send out pings (Ping).
  3. Tags listen for these pings, and reply with a ranging request (Request) for each ping they receive.
  4. When an anchor receives a ranging request, it replies with a ranging response (Response).
  5. Once the tag receives the ranging response, it has all the information it needs to compute the distance.

Please refer to the examples in the DWM1001 Board Support Crate for an implementation of this scheme.

In this scheme, anchors initiate the exchange, which results in the tag having the distance information. Possible variations include the tag initiating the request and the anchor calculating the distance, or a peer-to-peer scheme without dedicated tags and anchors.

Please note that using the code in this module without further processing of the result will yield imprecise measurements. To improve the precision of those measurements, a range bias needs to be applied. Please refer to the user manual, and this DWM1001 issue for more information.



Ranging ping message


Sent before a message's data to identify the message


Ranging request message


Ranging response message


An incoming ranging message


An outgoing ranging message



Returned from compute_distance_mm in case of an error



Implemented by all ranging messages



Computes the distance to another node from a ranging response