mirror of https://github.com/PentHertz/srsLTE.git
Cleaning
This commit is contained in:
parent
dcc36c6531
commit
815834f61b
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
recordedSignal=[];
|
recordedSignal=[];
|
||||||
|
|
||||||
Npackets = 1;
|
Npackets = 5;
|
||||||
SNR_values = 25;
|
SNR_values = linspace(18,25,5);
|
||||||
|
|
||||||
%% Choose RMC
|
%% Choose RMC
|
||||||
[waveform,rgrid,rmccFgOut] = lteRMCDLTool('R.9',[1;0;0;1]);
|
[waveform,rgrid,rmccFgOut] = lteRMCDLTool('R.9',[1;0;0;1]);
|
||||||
|
@ -79,8 +79,8 @@ for snr_idx=1:length(SNR_values)
|
||||||
%% Demodulate
|
%% Demodulate
|
||||||
frame_rx = lteOFDMDemodulate(rmccFgOut, rxWaveform);
|
frame_rx = lteOFDMDemodulate(rmccFgOut, rxWaveform);
|
||||||
|
|
||||||
%for sf_idx=0:Nsf-1
|
for sf_idx=0:Nsf-1
|
||||||
sf_idx=9;
|
% sf_idx=9;
|
||||||
subframe_rx=frame_rx(:,sf_idx*14+1:(sf_idx+1)*14);
|
subframe_rx=frame_rx(:,sf_idx*14+1:(sf_idx+1)*14);
|
||||||
rmccFgOut.NSubframe=sf_idx;
|
rmccFgOut.NSubframe=sf_idx;
|
||||||
rmccFgOut.TotSubframes=1;
|
rmccFgOut.TotSubframes=1;
|
||||||
|
@ -107,7 +107,7 @@ for snr_idx=1:length(SNR_values)
|
||||||
fprintf('Error in sf=%d\n',sf_idx);
|
fprintf('Error in sf=%d\n',sf_idx);
|
||||||
end
|
end
|
||||||
decoded_srslte(snr_idx) = decoded_srslte(snr_idx)+dec2;
|
decoded_srslte(snr_idx) = decoded_srslte(snr_idx)+dec2;
|
||||||
%end
|
end
|
||||||
|
|
||||||
if ~isempty(recordedSignal)
|
if ~isempty(recordedSignal)
|
||||||
recordedSignal = recordedSignal(flen*10+1:end);
|
recordedSignal = recordedSignal(flen*10+1:end);
|
||||||
|
|
|
@ -254,7 +254,7 @@ int cuhd_open_(char *args, void **h, bool create_thread_gain, bool tx_gain_same_
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pthread_create(&handler->thread_gain, NULL, thread_gain_fcn, *h)) {
|
if (pthread_create(&handler->thread_gain, NULL, thread_gain_fcn, handler)) {
|
||||||
perror("pthread_create");
|
perror("pthread_create");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -262,6 +262,7 @@ int cuhd_open_(char *args, void **h, bool create_thread_gain, bool tx_gain_same_
|
||||||
|
|
||||||
/* Find out if the master clock rate is configurable */
|
/* Find out if the master clock rate is configurable */
|
||||||
double cur_clock = handler->usrp->get_master_clock_rate();
|
double cur_clock = handler->usrp->get_master_clock_rate();
|
||||||
|
printf("Trying to dynamically change Master clock...\n");
|
||||||
handler->usrp->set_master_clock_rate(cur_clock/2);
|
handler->usrp->set_master_clock_rate(cur_clock/2);
|
||||||
if (handler->usrp->get_master_clock_rate() == cur_clock) {
|
if (handler->usrp->get_master_clock_rate() == cur_clock) {
|
||||||
handler->dynamic_rate = false;
|
handler->dynamic_rate = false;
|
||||||
|
@ -271,10 +272,11 @@ int cuhd_open_(char *args, void **h, bool create_thread_gain, bool tx_gain_same_
|
||||||
fprintf(stderr, "Error: LTE sampling rates are not supported. Master clock rate is %.1f MHz\n", cur_clock/1e6);
|
fprintf(stderr, "Error: LTE sampling rates are not supported. Master clock rate is %.1f MHz\n", cur_clock/1e6);
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
printf("Master clock rate is not configurable. Using default LTE sampling rates.\n");
|
printf("Master clock is not configurable. Using standard symbol sizes and sampling rates.\n");
|
||||||
srslte_use_standard_symbol_size(true);
|
srslte_use_standard_symbol_size(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
printf("Master clock is configurable. Using reduced symbol sizes and sampling rates.\n");
|
||||||
handler->dynamic_rate = true;
|
handler->dynamic_rate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue