mirror of https://github.com/PentHertz/srsLTE.git
Minor fixes and improvements
This commit is contained in:
parent
c137091dc3
commit
cc4a4b0536
|
@ -128,7 +128,7 @@ typedef enum {SRSLTE_CP_NORM, SRSLTE_CP_EXT} srslte_cp_t;
|
|||
#define SRSLTE_NOF_LTE_BANDS 29
|
||||
|
||||
#define SRSLTE_DEFAULT_MAX_FRAMES_PBCH 500
|
||||
#define SRSLTE_DEFAULT_MAX_FRAMES_PSS 50
|
||||
#define SRSLTE_DEFAULT_MAX_FRAMES_PSS 10
|
||||
#define SRSLTE_DEFAULT_NOF_VALID_PSS_FRAMES 10
|
||||
|
||||
|
||||
|
|
|
@ -125,14 +125,8 @@ int srslte_chest_dl_init(srslte_chest_dl_t *q, srslte_cell_t cell)
|
|||
goto clean_exit;
|
||||
}
|
||||
|
||||
q->smooth_filter_len = 0;
|
||||
|
||||
#ifdef DEFAULT_FILTER_LEN
|
||||
set_default_filter(q, DEFAULT_FILTER_LEN);
|
||||
#else
|
||||
float fil[3] = {0.1, 0.8, 0.1};
|
||||
srslte_chest_dl_set_smooth_filter(q, fil, 3);
|
||||
#endif
|
||||
q->smooth_filter_len = 3;
|
||||
srslte_chest_dl_set_smooth_filter3_coeff(q, 0.1);
|
||||
|
||||
q->cell = cell;
|
||||
}
|
||||
|
|
|
@ -471,7 +471,7 @@ srslte_sync_find_ret_t srslte_sync_find(srslte_sync_t *q, cf_t *input, uint32_t
|
|||
ret = SRSLTE_SYNC_NOFOUND;
|
||||
}
|
||||
|
||||
INFO("SYNC ret=%d N_id_2=%d find_offset=%d frame_len=%d, pos=%d peak=%.2f threshold=%.2f sf_idx=%d, CFO=%.3f KHz\n",
|
||||
DEBUG("SYNC ret=%d N_id_2=%d find_offset=%d frame_len=%d, pos=%d peak=%.2f threshold=%.2f sf_idx=%d, CFO=%.3f KHz\n",
|
||||
ret, q->N_id_2, find_offset, q->frame_size, peak_pos, q->peak_value,
|
||||
q->threshold, q->sf_idx, 15*(q->cfo_i+q->mean_cfo));
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ int srslte_ue_dl_init(srslte_ue_dl_t *q,
|
|||
fprintf(stderr, "Error initiating SFO correct\n");
|
||||
goto clean_exit;
|
||||
}
|
||||
srslte_cfo_set_tol(&q->sfo_correct, 0);
|
||||
srslte_cfo_set_tol(&q->sfo_correct, 1e-5/q->fft.symbol_sz);
|
||||
|
||||
q->sf_symbols = srslte_vec_malloc(CURRENT_SFLEN_RE * sizeof(cf_t));
|
||||
if (!q->sf_symbols) {
|
||||
|
@ -194,12 +194,16 @@ int srslte_ue_dl_decode_fft_estimate(srslte_ue_dl_t *q, cf_t *input, uint32_t sf
|
|||
|
||||
/* Correct SFO multiplying by complex exponential in the time domain */
|
||||
if (q->sample_offset) {
|
||||
struct timeval t[3];
|
||||
gettimeofday(&t[1], NULL);
|
||||
for (int i=0;i<2*SRSLTE_CP_NSYMB(q->cell.cp);i++) {
|
||||
srslte_cfo_correct(&q->sfo_correct,
|
||||
&q->sf_symbols[i*q->cell.nof_prb*SRSLTE_NRE],
|
||||
&q->sf_symbols[i*q->cell.nof_prb*SRSLTE_NRE],
|
||||
q->sample_offset / q->fft.symbol_sz);
|
||||
}
|
||||
gettimeofday(&t[2], NULL);
|
||||
get_time_interval(t);
|
||||
}
|
||||
|
||||
return srslte_ue_dl_decode_estimate(q, sf_idx, cfi);
|
||||
|
|
|
@ -361,7 +361,7 @@ static int track_peak_ok(srslte_ue_sync_t *q, uint32_t track_idx) {
|
|||
q->sf_idx = srslte_sync_get_sf_idx(&q->strack);
|
||||
q->frame_no_cnt++;
|
||||
if (q->frame_no_cnt >= TRACK_MAX_LOST) {
|
||||
printf("\n%d frames lost. Going back to FIND\n", (int) q->frame_no_cnt);
|
||||
INFO("\n%d frames lost. Going back to FIND\n", (int) q->frame_no_cnt);
|
||||
q->state = SF_FIND;
|
||||
}
|
||||
} else {
|
||||
|
@ -426,7 +426,7 @@ static int track_peak_no(srslte_ue_sync_t *q) {
|
|||
/* if we missed too many PSS go back to FIND and consider this frame unsynchronized */
|
||||
q->frame_no_cnt++;
|
||||
if (q->frame_no_cnt >= TRACK_MAX_LOST) {
|
||||
printf("\n%d frames lost. Going back to FIND\n", (int) q->frame_no_cnt);
|
||||
INFO("\n%d frames lost. Going back to FIND\n", (int) q->frame_no_cnt);
|
||||
q->state = SF_FIND;
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -622,6 +622,7 @@ int srslte_ue_sync_zerocopy(srslte_ue_sync_t *q, cf_t *input_buffer) {
|
|||
void srslte_ue_sync_reset(srslte_ue_sync_t *q) {
|
||||
|
||||
if (!q->file_mode) {
|
||||
srslte_sync_reset(&q->sfind);
|
||||
srslte_sync_reset(&q->strack);
|
||||
} else {
|
||||
q->sf_idx = 9;
|
||||
|
|
Loading…
Reference in New Issue