dwm_pos_get

Get position of the node.

void dwm_pos_get(dwm_pos_t *pos);
Parameters

C code example

dwm_pos_t pos;
dwm_pos_get(&pos);
printf("%ld \n", pos.x);
printf("%ld \n", pos.y);
printf("%ld \n", pos.z);
printf("%u \n", pos.qf);

SPI/UART example

TLV Request

Type

Length

0x02

0x00

Type 0x02 means command pos_get

TLV Response

Type

Length

Value (see error codes)

Type

Length

Value

0x40

0x01

0x00

0x41

0x0D

int32_t in little endian -

x coordinate in millimeters

int32_t in little endian -

y coordinate in millimeters

int32_t in little endian -

z coordinate in millimeters

uint8_t -

quality factor in percents (0 -100)

0x4b 0x0a 0x00 0x00 0x1f 0x04

0x00 0x00 0x9c 0x0e 0x00

0x00 0x64

Type 0x40 means Status code of previous command

Type 0x41 means position (x,y,z,pqf)