[riot-notifications] [RIOT-OS/RIOT] pkg/uwb_core: initial support (#15070)

Alexandre Abadie notifications at github.com
Tue Nov 3 17:39:54 CET 2020


I tested this PR on IoT-LAB (5 new dwm1001 were deployed recently) and the measured precision is quite good. I tried the different TWR algorithms and they are all working (the expected distance between dwm1001-1 and dwm1001-5 is 4.72m).

- `UWB_DATA_CODE_SS_TWR`

<details>

```
{"utime": 218,"msg": "dw1000_dev_init"}
dpl: starting thread uwb_irq
{"utime": 17071,"msg": "rng_pkg_init"}
{"utime": 20504,"msg": "twr_ss_pkg_init"}
{"utime": 24174,"msg": "twr_ss_ack_pkg_init"}
{"utime": 28193,"msg": "twr_ss_ext_pkg_init"}
{"utime": 32213,"msg": "twr_ds_pkg_init"}
{"utime": 35887,"msg": "twr_ds_ext_pkg_init"}
main(): This is RIOT! (Version: 2021.01-devel-78-gefb18d-review_uwb)
pkg uwb-dw1000 + uwb-core test application
{"utime": 49643,"exec": "/work/riot/RIOT/examples/twr_aloha/control.c"}
{"device_id"="deca0130","panid="DECA","addr"="989C","part_id"="cae2989c","lot_id"="402c188"}
{"utime": 49643,"msg": "frame_duration = 201 usec"}
{"utime": 49643,"msg": "SHR_duration = 139 usec"}
{"utime": 49643,"msg": "holdoff = 821 usec"}
Node role: TAG 
> range start
range start
Start ranging
> {"utime": 40799738,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.570179],"rssi": [-88.290184],"los": [0.000000]}
{"utime": 40930906,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.495612],"rssi": [-87.950569],"los": [0.000000]}
{"utime": 41015452,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.529869],"rssi": [-88.290184],"los": [0.000000]}
{"utime": 41059475,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.574209],"rssi": [-88.158744],"los": [0.000000]}
{"utime": 41104284,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.557844],"rssi": [-88.137847],"los": [0.000000]}
{"utime": 41146974,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.577741],"rssi": [-87.850112],"los": [0.000000]}
{"utime": 41231520,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.573623],"rssi": [-88.137847],"los": [0.000000]}
{"utime": 41275543,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.546100],"rssi": [-88.117057],"los": [0.000000]}
```

</details>

- `UWB_DATA_CODE_SS_TWR_EXT`

<details>

```
{"utime": 217,"msg": "dw1000_dev_init"}
dpl: starting thread uwb_irq
{"utime": 17070,"msg": "rng_pkg_init"}
{"utime": 20503,"msg": "twr_ss_pkg_init"}
{"utime": 24173,"msg": "twr_ss_ack_pkg_init"}
{"utime": 28192,"msg": "twr_ss_ext_pkg_init"}
{"utime": 32212,"msg": "twr_ds_pkg_init"}
{"utime": 35887,"msg": "twr_ds_ext_pkg_init"}
main(): This is RIOT! (Version: 2021.01-devel-78-gefb18d-review_uwb)
pkg uwb-dw1000 + uwb-core test application
{"utime": 49642,"exec": "/work/riot/RIOT/examples/twr_aloha/control.c"}
{"device_id"="deca0130","panid="DECA","addr"="989C","part_id"="cae2989c","lot_id"="402c188"}
{"utime": 49642,"msg": "frame_duration = 201 usec"}
{"utime": 49642,"msg": "SHR_duration = 139 usec"}
{"utime": 49642,"msg": "holdoff = 821 usec"}
Node role: TAG 
> range start
range start
Start ranging
> {"utime": 3835609,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.575361],"rssi": [-88.333572],"los": [0.000000]}
{"utime": 3966777,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.606994],"rssi": [-88.493057],"los": [0.000000]}
{"utime": 4051323,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.637519],"rssi": [-88.515731],"los": [0.000000]}
{"utime": 4095346,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.604087],"rssi": [-88.311828],"los": [0.000000]}
{"utime": 4140155,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.566468],"rssi": [-88.355438],"los": [0.000000]}
{"utime": 4182838,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.571336],"rssi": [-88.012718],"los": [0.000000]}
{"utime": 4267392,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.571664],"rssi": [-88.245285],"los": [0.000000]}
{"utime": 4311415,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.577123],"rssi": [-88.033020],"los": [0.000000]}
{"utime": 4356224,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.597087],"rssi": [-87.990676],"los": [0.000000]}
{"utime": 4398907,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.568252],"rssi": [-87.990676],"los": [0.000000]}
```

</details>

- `UWB_DATA_CODE_SS_TWR_ACK`

<details>

```
{"utime": 217,"msg": "dw1000_dev_init"}
dpl: starting thread uwb_irq
{"utime": 17079,"msg": "rng_pkg_init"}
{"utime": 20512,"msg": "twr_ss_pkg_init"}
{"utime": 24182,"msg": "twr_ss_ack_pkg_init"}
{"utime": 28201,"msg": "twr_ss_ext_pkg_init"}
{"utime": 32221,"msg": "twr_ds_pkg_init"}
{"utime": 35895,"msg": "twr_ds_ext_pkg_init"}
main(): This is RIOT! (Version: 2021.01-devel-78-gefb18d-review_uwb)
pkg uwb-dw1000 + uwb-core test application
{"utime": 49651,"exec": "/work/riot/RIOT/examples/twr_aloha/control.c"}
{"device_id"="deca0130","panid="DECA","addr"="989C","part_id"="cae2989c","lot_id"="402c188"}
{"utime": 49651,"msg": "frame_duration = 201 usec"}
{"utime": 49651,"msg": "SHR_duration = 139 usec"}
{"utime": 49651,"msg": "holdoff = 821 usec"}
Node role: TAG 
> range start
range start
Start ranging
> {"utime": 3505358,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.561713],"rssi": [-88.538536],"los": [0.000000]}
{"utime": 3636526,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.602430],"rssi": [-88.202758],"los": [0.000000]}
{"utime": 3721072,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.580643],"rssi": [-88.470497],"los": [0.000000]}
{"utime": 3765095,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.583068],"rssi": [-88.515731],"los": [0.000000]}
{"utime": 3809904,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.591281],"rssi": [-88.223968],"los": [0.000000]}
{"utime": 3852587,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.566892],"rssi": [-88.446014],"los": [0.000000]}
{"utime": 3937132,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.563466],"rssi": [-88.470497],"los": [0.000000]}
{"utime": 3981155,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.576010],"rssi": [-88.290184],"los": [0.000000]}
{"utime": 4025972,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.568954],"rssi": [-88.223968],"los": [0.000000]}
```

</details>

- `UWB_DATA_CODE_DS_TWR`

<details>

```
{"utime": 218,"msg": "dw1000_dev_init"}
dpl: starting thread uwb_irq
{"utime": 17079,"msg": "rng_pkg_init"}
{"utime": 20512,"msg": "twr_ss_pkg_init"}
{"utime": 24182,"msg": "twr_ss_ack_pkg_init"}
{"utime": 28201,"msg": "twr_ss_ext_pkg_init"}
{"utime": 32221,"msg": "twr_ds_pkg_init"}
{"utime": 35896,"msg": "twr_ds_ext_pkg_init"}
main(): This is RIOT! (Version: 2021.01-devel-78-gefb18d-review_uwb)
pkg uwb-dw1000 + uwb-core test application
{"utime": 49651,"exec": "/work/riot/RIOT/examples/twr_aloha/control.c"}
{"device_id"="deca0130","panid="DECA","addr"="989C","part_id"="cae2989c","lot_id"="402c188"}
{"utime": 49651,"msg": "frame_duration = 201 usec"}
{"utime": 49651,"msg": "SHR_duration = 139 usec"}
{"utime": 49651,"msg": "holdoff = 821 usec"}
Node role: TAG 
> range start
range start
Start ranging
> {"utime": 4284144,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.552608],"rssi": [-88.355438],"los": [0.000000]}
{"utime": 4415312,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.579110],"rssi": [-88.446014],"los": [0.000000]}
{"utime": 4499858,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.542129],"rssi": [-88.401496],"los": [0.000000]}
{"utime": 4543873,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.596262],"rssi": [-88.268646],"los": [0.000000]}
{"utime": 4588690,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.596225],"rssi": [-88.202758],"los": [0.000000]}
{"utime": 4631381,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.614417],"rssi": [-88.538536],"los": [0.000000]}
{"utime": 4715927,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.610880],"rssi": [-88.682189],"los": [0.000000]}
{"utime": 4759950,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.624316],"rssi": [-88.633064],"los": [0.000000]}
{"utime": 4804759,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.594917],"rssi": [-88.538536],"los": [0.000000]}
{"utime": 4847450,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.558114],"rssi": [-88.379409],"los": [0.000000]}
```

</details>

- `UWB_DATA_CODE_DS_TWR_EXT`

<details>

```
{"utime": 218,"msg": "dw1000_dev_init"}
dpl: starting thread uwb_irq
{"utime": 17071,"msg": "rng_pkg_init"}
{"utime": 20503,"msg": "twr_ss_pkg_init"}
{"utime": 24174,"msg": "twr_ss_ack_pkg_init"}
{"utime": 28193,"msg": "twr_ss_ext_pkg_init"}
{"utime": 32212,"msg": "twr_ds_pkg_init"}
{"utime": 35887,"msg": "twr_ds_ext_pkg_init"}
main(): This is RIOT! (Version: 2021.01-devel-78-gefb18d-review_uwb)
pkg uwb-dw1000 + uwb-core test application
{"utime": 49642,"exec": "/work/riot/RIOT/examples/twr_aloha/control.c"}
{"device_id"="deca0130","panid="DECA","addr"="989C","part_id"="cae2989c","lot_id"="402c188"}
{"utime": 49642,"msg": "frame_duration = 201 usec"}
{"utime": 49642,"msg": "SHR_duration = 139 usec"}
{"utime": 49642,"msg": "holdoff = 821 usec"}
Node role: TAG 
> range start
range start
Start ranging
> {"utime": 3270534,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.567840],"rssi": [-88.538536],"los": [0.000000]}
{"utime": 3401702,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.544250],"rssi": [-88.379409],"los": [0.000000]}
{"utime": 3486248,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.617828],"rssi": [-88.493057],"los": [0.000000]}
{"utime": 3530271,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.548103],"rssi": [-88.515731],"los": [0.000000]}
{"utime": 3575073,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.592764],"rssi": [-88.633064],"los": [0.000000]}
{"utime": 3617770,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.587404],"rssi": [-88.379409],"los": [0.000000]}
{"utime": 3702316,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.572762],"rssi": [-88.586593],"los": [0.000000]}
{"utime": 3746339,"c": 291,"uid": 4660,"ouid": 39068,"raz": [4.583347],"rssi": [-88.705879],"los": [0.000000]}
{"utime": 3791148,"c": 296,"uid": 4660,"ouid": 39068,"raz": [4.562242],"rssi": [-88.493057],"los": [0.000000]}
{"utime": 3833838,"c": 274,"uid": 39068,"ouid": 4660,"raz": [4.599436],"rssi": [-88.515731],"los": [0.000000]}
{"utime": 3918384,"c": 278,"uid": 39068,"ouid": 4660,"raz": [4.569953],"rssi": [-88.609771],"los": [0.000000]}
```

</details>

So in the best case we have a 9cm error, in the worst case it's 18cm.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15070#issuecomment-721242318
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201103/eced4417/attachment.htm>


More information about the notifications mailing list