Hi everyone,
I’m working on the detection of LOS/NLOS scenario with DW1000. First, i worked with the reported diagnostics (First path, peak path, amplitude etc…) but i need to go further by analyzing the CIR values in the accumulator. When i plot the values, it seems that there is a lot of noise and the values reported by the diagnostics don’t match any of the value i get from the accumulator data (Amplitude and index of firstPath/peakPath). Moreover, in the different application notes provided by Decawave, the max amplitude of every CIRs figures is lower than 20 000 and mine is greater than 30 000.
Here is the code for the Accumulator data extraction :
- I’m reading tap by tap for memory issue
- The computed magnitude is the approximation of the SQRT func used by the hardware
[font=Courier New]for(int i = 0;i<992;i++)
[/font]
[font=Courier New] {[/font]
[font=Courier New] uint8 cir; cir = (uint8 )malloc(4sizeof(uint8));[/font]
[font=Courier New] dwt_readaccdata(cir, 4, CIR_OFFSET+4i);[/font]
[font=Courier New] int16 real =0;[/font]
[font=Courier New] int16 imag =0;[/font]
[font=Courier New] double amp = 0;[/font]
[font=Courier New] real = (int16)(cir[1] << 8) | (int16)(cir[0]);/printf("%i,",real);/[/font]
[font=Courier New] imag = (int16)(cir[3] << 8) | (int16)(cir[2]); /printf("%u\n",imag);/[/font]
[font=Courier New] amp = max(abs(real),abs(imag)) + 1/4*min(abs(real),abs(imag));[/font]
[font=Courier New] printf("%u,", real);[/font]
[font=Courier New] printf("%u,",imag);[/font]
[font=Courier New] printf("%f\n", amp);[/font]
[font=Courier New] free(cir);[/font]
[font=Courier New]}[/font]
Im trying to figure out what can be wrong in my process but i’m still stuck with this problem and can’t fix it.
You’ll find in attached file the plot of the CIR magnitude with the data
[font=Courier New] Value read in ACC / Reported value (dw_diagnostics)[/font]
[font=Courier New]------------------------------------[/font]
[font=Courier New]FPAmp1 19690.0 / 339.0[/font]
[font=Courier New]FPAmp2 23830.0 / 278.0[/font]
[font=Courier New]FPAmp3 9238.0 / 209.0[/font]
[font=Courier New]PeakAmp 32256.0 / 727.0[/font]
[font=Courier New]FPAmp 2582.0 / 339.0[/font]
[font=Courier New]PeakIndex 751 / 749.0[/font]
I have read all the application notes and the different thread concerning that problem on this forum but i still can’t manage to fix my problem and go ahead in my work.
Does someone have an idea about this ? :huh: :huh: Thanks a lot for your help !
Best regards,
Morgan