leaps_loc_get
Get last distances to the ranging anchors and get the position.The event is generated and the status changes when all TWR measurements are completed and new location data are available for the user. When low power mode is used, it will work in the same way.
For anchor node, the position and distances are available only if the auto-positioning procedure has been done. The auto-positioning procedure is started via the BLE interface.
Tag node
? 8-bit unsigned integer ? (output options, 0 - distances to ranging anchors, 1 - my position + distances to ranging anchors, 2 - positions and distances to ranging anchors, 3 - my position + distances and position to ranging anchors)
timestamp: ? 32-bit integer? (timestamp in milliseconds)
flags: ?8-bit unsigned integer? (is_moving indication)
cnt: ? 8-bit integer ? (number of distances to the other nodes)
pos: position (position of the opposite node, that correspond with the distance)
addr: ? 16-bit integer ? (UWB address/id of the opposite node)
distance: ? 32-bit integer ? (distance to the opposite in millimeters)
pqf: ? 8-bit integer ? (quality factor)
Note
If Tag node - available parameter - pos: position (position of the opposite node, that correspond with the distance)
Example 1 (my position + distances and positions to ranging anchors) todo
TLV Request |
||
---|---|---|
Type |
Length |
Value |
0x0C |
0x01 |
0x03 |
Type 0x0C means command loc_get
TLV response |
||||||||
---|---|---|---|---|---|---|---|---|
Type |
Length |
Value status |
Type |
Length |
Value position of this node (13 bytes) |
Type |
Length |
Value positions and distances to ranging anchors (86 bytes) |
0x40 |
0x01 |
0x00 |
0x41 |
0x0D |
… |
0x49 |
0x56 |
… |
Type 0x40 means status code
Type 0x41 means position
Type 0x49 means position and distances on a tag node
Encoding of positions and distances to ranging anchors |
|||||
---|---|---|---|---|---|
Timestamp in milliseconds |
flags (bit 0) is_moving (bits 1-7) reserved |
number of encoded distances |
position and distance nr. 1 (20 bytes) |
position and distance nr.2, 3, 4 (60 bytes) |
|
distance nr.1 (7 bytes) |
position nr.1 (13 bytes) |
… |
|||
0x64 0x00 0x00 0x00 |
0x00 |
0x04 |
… |
… |
… |
Type 0x49 means position and distances on a tag node.
Distance encoding |
||
---|---|---|
UWB address (2 bytes) |
distance in millimeters (4 bytes) |
distance quality factor in percents (1 byte) |
0xAB 0xCD |
0xE8 0x03 0x00 0x00 |
0x5F |
Position encoding |
|||
---|---|---|---|
x coordinate in millimeters (4 bytes) |
y coordinate in millimeters (4 bytes) |
z coordinate in millimeters (4 bytes) |
position quality factor in percents (1 byte) |
0x4b 0x0a 0x00 0x00 |
0x1f 0x04 0x00 0x00 |
0x9c 0x0e 0x00 0x00 |
0x64 |
Example 2 (my position + distances to ranging anchors) todo
TLV Request |
||
---|---|---|
Type |
Length |
Value |
0x0C |
0x01 |
0x03 |
Type 0x0C means command loc_get
TLV response |
||||||||
---|---|---|---|---|---|---|---|---|
Type |
Length |
Value |
Type |
Length |
Value |
Type |
Length |
Value |
status code |
position of this node (13 bytes) |
distances to ranging anchors (90 bytes) |
||||||
0x40 |
0x01 |
0x00 |
0x41 |
0x0D |
… |
0x48 |
0x5A |
… |
Type 0x40 means status code
Type 0x41 means position
Type 0x48 means distances of ranging anchors
Encoding of distances to ranging anchors |
||||
---|---|---|---|---|
timestamp in milliseconds (4 bytes) |
flags reserved (bits 1-7) (bit 0) is_moving |
number of distances encoded (1 byte) |
di stance (7 bytes) nr. 1 |
distance nr. 2, 3, … , 11, 12 (77 bytes) |
0x64 0x00 0x00 0x00 |
0x00 |
0x04 |
… |
… |