The questions about NDT log

Hi Sir,

I am testing the NDT w/ example "nRF_DM" (NCS 2.0.0), there are two nRF52840-DK for this test.
When two boards link success, the terminal starts to show the log.

I can see the value changed when the board moves to another way.
From the log, we could get the below parameters.

ifft=0.17
phase_slope=0.36
rssi_openspace=0.56
best=0.17

what is the meaning of the parameters? what is the unit? 

How could I use these parameters to get the distances between two boards?

----------------- LOG --------------
*** Booting Zephyr OS build v3.0.99-ncs1 ***
Starting Distance Measurement example
I: SoftDevice Controller build revision:
I: 33 78 2a 18 20 f5 61 61 |3x*. .aa
I: a6 8b 77 60 62 83 39 2a |..w`b.9*
I: 7c f1 14 e4 ||...
I: HW Platform: Nordic Semiconductor (0x0002)
I: HW Variant: nRF52x (0x0002)
I: Firmware: Standard Bluetooth controller (0x00) Version 51.10872 Build 1643454488
I: Identity: EE:49:0C:5D:20:80 (random)
I: HCI: version 5.3 (0x0c) revision 0x1136, manufacturer 0x0059
I: LMP: version 5.3 (0x0c) subver 0x1136
DM Bluetooth LE Synchronization initialization

Measurement result:
Addr: CB:9D:B9:EC:FD:CF (random)
Quality: ok
Distance estimates: mcpd: ifft=0.17 phase_slope=0.36 rssi_openspace=0.56 best=0.17

Measurement result:
Addr: CB:9D:B9:EC:FD:CF (random)
Quality: ok
Distance estimates: mcpd: ifft=0.19 phase_slope=0.33 rssi_openspace=0.56 best=0.19
-----------------------------------------------------

Thank you.

BRs, Han

Parents
  • Hello Han,

    Those parameters are just distance measurement estimates using three different methods. The unit is meters.

    From the documentation:

    • Multi-carrier phase difference:

      • IFFT of spectrum

      • Average phase-slope estimation

      • Friis-path-loss formula

    The easiest way would be to just use the "best" estimation value.

    There is also a nrf_dm_high_precision_calc() function that uses a much more complicated algorithm and takes a much longer time to execute. It also just returns a float, instead of filling out the whole struct with data.

    Best regards,

    Michal

Reply
  • Hello Han,

    Those parameters are just distance measurement estimates using three different methods. The unit is meters.

    From the documentation:

    • Multi-carrier phase difference:

      • IFFT of spectrum

      • Average phase-slope estimation

      • Friis-path-loss formula

    The easiest way would be to just use the "best" estimation value.

    There is also a nrf_dm_high_precision_calc() function that uses a much more complicated algorithm and takes a much longer time to execute. It also just returns a float, instead of filling out the whole struct with data.

    Best regards,

    Michal

Children
  • Hi Michal,

    Thanks for the quick update.

    If the easiest way is just to use the "best",  Does the "best=0.17" mean the distance is .017 m?

    Further questions,

    - Can the DM central role support multi-link natively?

    - If the above function works, could we use DM for indoor positioning? Like if we put 3+ DM-peripheral into fixed positions and DM central role uses these DM-peripherals to know the position of DM central role?

    Thank you.

    BRs, Hanyu

  • Hello Hanyu,

    best=0.17 means that the distance is 0.17 m, or 17 cm.

    Yes, multi-link is supported. You can find a PEER_MAX macro in the peer.c file in the nrf_dm sample. You can distinguish between the devices by their address.

    Indoor positioning should definitely be possible with some triangulation.

    Best regards,

    Michal

  • Hi Michal,

    Sorry to late response.

    I tried to modify the code to support one device support one role (advertising or scan).

    I modified the "bt_sync_init(void)", for support advertising role, I comment out the "scan_start()".

    Also, for support scan role, I comment out the "adv_start();".

    But the result is they can boot up success but cannot get link success.

    1. Could you share the experience, how to modify to support only advertising role or only scan role?

    2. For the interval parameter, we can find the definition on gap.h.

    But how do we calculate the value? like why 1.28s is "0x0800".

    If we need to use other value, how to calculate?

    #define BT_GAP_SCAN_SLOW_INTERVAL_1 0x0800 /* 1.28 s */

    #define BT_GAP_SCAN_SLOW_WINDOW_1 0x0012 /* 11.25 ms */

    #define BT_GAP_ADV_FAST_INT_MIN_2 0x00a0 /* 100 ms */

    #define BT_GAP_ADV_FAST_INT_MAX_2 0x00f0 /* 150 ms */

    Thank you.

    BRs, Han

Related