Hi,
I'm working on direction finding with nrf52833dk (my own board latter on) and Nordic antenna matrix. I'm using NCS v1.6.0-rc2 and example Direction fing connectionless locator & bacon. I want to compute aoa and since i've only one antenna matrix i disabled aod of bacon example by adding "SET(OVERLAY_CONFIG "overlay-aoa.conf")" to CMakeLists.txt.
After few try, my locator found the beacon and print parameter as expected. I want to compute angle, so i print all IQ sample by modifying main.c with
static void cte_recv_cb(struct bt_le_per_adv_sync *sync,
struct bt_df_per_adv_sync_iq_samples_report const *report)
{
printk("CTE[%u]: samples count %d, cte type %s, slot durations: %u [us], "
"packet status %s, RSSI %i\n",
bt_le_per_adv_sync_get_index(sync), report->sample_count,
cte_type2str(report->cte_type), report->slot_durations,
packet_status2str(report->packet_status), report->rssi);
printk("IQ sample content : \n");
for(int i=0; i<report->sample_count; i++){
printk("sample[%d] = I:%d Q:%d\n", i, report->sample[i].i, report->sample[i].q);
}
}
and include bluetooth/hci.h. I got on my output
PER_ADV_SYNC[0]: [DEVICE]: 23:13:D2:D8:82:4B (random), tx_power 127, RSSI -63, CTE AOA, data length 0, data: CTE[0]: samples count 45, cte type AOA, slot durations: 2 [us], packet status CRC OK, RSSI -630 IQ sample content : sample[0] = I:5 Q:0 sample[1] = I:-6 Q:-1 sample[2] = I:5 Q:0 sample[3] = I:-6 Q:0 sample[4] = I:5 Q:-1 sample[5] = I:-6 Q:0 sample[6] = I:5 Q:-1 sample[7] = I:-6 Q:0 sample[8] = I:7 Q:8 sample[9] = I:15 Q:20 sample[10] = I:-17 Q:20 sample[11] = I:-4 Q:-5 sample[12] = I:-6 Q:14 sample[13] = I:-14 Q:-2 sample[14] = I:-7 Q:-6 sample[15] = I:-18 Q:-1 sample[16] = I:-1 Q:4 sample[17] = I:-15 Q:9 sample[18] = I:-7 Q:-32 sample[19] = I:4 Q:-11 sample[20] = I:10 Q:-23 sample[21] = I:26 Q:4 sample[22] = I:-3 Q:4 sample[23] = I:16 Q:-2 sample[24] = I:6 Q:12 sample[25] = I:-2 Q:7 sample[26] = I:9 Q:14 sample[27] = I:4 Q:-2 sample[28] = I:14 Q:8 sample[29] = I:-26 Q:20 sample[30] = I:-11 Q:1 sample[31] = I:-26 Q:3 sample[32] = I:-9 Q:-26 sample[33] = I:5 Q:0 sample[34] = I:-10 Q:-13 sample[35] = I:8 Q:-12 sample[36] = I:8 Q:-2 sample[37] = I:9 Q:-15 sample[38] = I:-3 Q:-4 sample[39] = I:-1 Q:-17 sample[40] = I:30 Q:10 sample[41] = I:6 Q:8 sample[42] = I:14 Q:21 sample[43] = I:-18 Q:21 sample[44] = I:-3 Q:-5
I have several question about the output :
- Why am i having 45 samples? I know there is a guard period and then as many samples as ant_pattern_length but it is 12 antenna long.
- Since there are more value than i expect, should i make an algorithm in order to discard the wrong one ?
- Is the values correct ? i know the swing of IQ value are bigger than those.
- Last but not least, where can i find in example project all the parameter such as TSAMPLESPACINGREF / TSAMPLESPACING / TSWITCHSPACING ?
I read very carefully your whitepaper, but i need a little help to put all this fine.
Regards,
Nathan