This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, in this post a MATLAB script is given for reading a binary file, see also below. However I have two questions:
1. What is the chunkSize? (specifically for the AWR1843Boost)
2. There should be an `end` instruction at some point but I am not sure where?
Thankyou in advance.
%*********************************************************************
%% read binary file
%*********************************************************************
fname = strcat(DirName,fileName);
fid = fopen(fname,'r');
adcOut = [];
inputLoadingPosition = 0;
for indexFrames=1:numFrames
fseek(fid, inputLoadingPosition, 'bof');
dataChunk = fread(fid, chunkSize,'uint16','l');
inputLoadingPosition = ftell(fid);
dataChunk = dataChunk - (dataChunk >= 2^15) * 2^16;
% radar_data has data in the following format.
% Rx0I0, Rx0I1, Rx0Q0, Rx0Q1, Rx0I2, Rx0I3, Rx0Q2, Rx0Q3, ...
% The following script reshapes it into a 3-dimensional array.
% size(adcOut) = [ADC samples per chirp x Chirps per Frame x Number of virtual Channels]
len = length(dataChunk) / 2;
adcOut(1:2:len) = dataChunk(1:4:end) + 1j*dataChunk(3:4:end);
adcOut(2:2:len) = dataChunk(2:4:end) + 1j*dataChunk(4:4:end);
adcOut = reshape(adcOut, Chirp_NUM_ADC_sample_size, numTXAnt*4, Chirp_NUM_Chirps);
adcOut = permute(adcOut, [1, 3, 2]);
%*********************************************************************
%% Radar signal processing
%*********************************************************************
% Plot ADC Data for the 1st Chirp
% figure(1);clf
% plot(real(adcOut(:,1,1)),'r');
% hold on
% plot(imag(adcOut(:,1,1)));
% legend('I-Channel', 'Q-Channel'); grid on
% title('ADC data')
% 1D range-FFT across the 2nd dimensions (samples), no zero padding
fftSize1D = size(adcOut,1);
radar_data_1dFFT = fft(adcOut,[], 1);%.*window_1D
Hi Bradley,
Please find my responses below.
Regards,
Kaushik