Get distance DWM1001

Hi, i have one tag (nrf52840 with DWM1001) and around 10 anchors (dmw1001-dev). I need all distances to look for the nearest one. Now i don’t know which is the best way to get all distances. I’d like to work with UART. This are my options i could get to program nrf52840 with dmw1001 module:

  1. open shell and send les via UART, i will get distances from my tag to anchors. Then I split the string and extract the distance and identification number on the nrf52840

  2. API dwm_pos_get(), i will get x,y,z coordinates from my tag to anchors and calculate the distances on the nrf52840

is there any other option or has someone experience with that topic?

regards,
thomas