Updated create_zc to use zadoff_chu

This was done to make testing easier as there were bugs in the C++ that were painful to figure out since the raw ZC sequence was generated in this function
gr-droneid-rewrite
David Protzman 2022-10-09 11:22:24 -04:00
rodzic b700e24480
commit 96e93aa3da
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -20,9 +20,14 @@ function [samples] = create_zc(fft_size, symbol_index)
else
root = 147;
end
root
% Would use MATLAB's zadoffChuSeq function, but Octave doesn't have that
% The logic below was tested against the MATLAB function
% vals = pi * root * (0:600) .* (1:601) / 601;
% zc = cos(vals) + (1j * sin(vals));
zc = reshape(exp(-1j * pi * root * (0:600) .* (1:601) / 601), [], 1);
% Remove the middle value (this would be DC in the FFT)