kopia lustrzana https://github.com/proto17/dji_droneid
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 functiongr-droneid-rewrite
rodzic
b700e24480
commit
96e93aa3da
|
@ -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)
|
||||
|
|
Ładowanie…
Reference in New Issue