u-blox / c209-aoa-tag

Bluetooth Direction Finding Tag sample application. Works with u-connectLocate.
https://www.u-blox.com/en/technologies/bluetooth-indoor-positioning
Apache License 2.0
31 stars 12 forks source link

[Question] Number of CTE for best performances #28

Closed pmancele closed 8 months ago

pmancele commented 8 months ago

Hello,

I'm working with 4 XPLR-KIT-AOA3, trying to locate my tags.

I'm wondering what are the best parameters for CTE emission if I don't care about power consumption ?

For reference here is the related code :

/* Length of CTE in unit of 8[us] */
#define CTE_LEN (0x14U)

/* Number of CTE send in single periodic advertising train
* Tradeoff with power consumption for the tag and
* number of samples received at anchor.
*/
#define PER_ADV_EVENT_CTE_COUNT 1

Can I increase the CTE_COUNT or the length ? Or is it useless ?

Thank you for your response and for the great Zephyr example !

jakkra commented 8 months ago

Hi @pmancele The CTE_LEN is already max set in C209.

Increasing PER_ADV_EVENT_CTE_COUNT will not make a difference as u-locateEmbed will not sample more than one of the received CTE's per periodic adv. interval anyway.

Best way to get u-locateEmbed to output more angles to you, is to decrease the periodic advertising intervals: https://github.com/u-blox/c209-aoa-tag/blob/master/src/main.c#L76C17-L76C29 The first one in that list will be the default one, so you can decrease it to 8 (ms) for example to get the most CTE's / angles out of u-locateEmbed..

Something like this: static uint16_t advIntervals[] = {8 10, 250, 1000};

pmancele commented 8 months ago

Thank you, I understand that I can get more angles by decreasing the advertising interval.

But more than the sample rate I wonder if the precision can be increased. Regarding the CTE, you said that CTE_LEN is already max set. I guess it is the best for precesion to let it at the max ?

jakkra commented 8 months ago

u-locateEmbed only works with max CTE len right now. So that's already maxed.

With more packets/angles, then you have more data and you can get a more accurate estimate. Each individual estimates will fluctuate, and the more packets you have the more stable it will be. There is already post processing in u-locateEmbed which you can tune (check manual). It's also possible to configure u-locateEmbed to output the raw estimates, then it's up to you to stabalize /smooth them.

pmancele commented 8 months ago

Thank you I will let those parameters as is.

Should I close the issue ? If yes feel free to do it.