Added more options to change parameters

master
ismagom 9 years ago
parent fbaa559e37
commit 837326f575

@ -40,9 +40,9 @@
#include "srslte/rf/rf_utils.h" #include "srslte/rf/rf_utils.h"
cell_search_cfg_t cell_detect_config = { cell_search_cfg_t cell_detect_config = {
500, SRSLTE_DEFAULT_MAX_FRAMES_PBCH,
50, SRSLTE_DEFAULT_MAX_FRAMES_PSS,
10, SRSLTE_DEFAULT_NOF_VALID_PSS_FRAMES,
0 0
}; };

@ -57,9 +57,9 @@ int earfcn_start=-1, earfcn_end = -1;
cell_search_cfg_t cell_detect_config = { cell_search_cfg_t cell_detect_config = {
500, SRSLTE_DEFAULT_MAX_FRAMES_PBCH,
50, SRSLTE_DEFAULT_MAX_FRAMES_PSS,
10, SRSLTE_DEFAULT_NOF_VALID_PSS_FRAMES,
0 0
}; };

@ -47,9 +47,9 @@
#include "srslte/rf/rf_utils.h" #include "srslte/rf/rf_utils.h"
cell_search_cfg_t cell_detect_config = { cell_search_cfg_t cell_detect_config = {
500, SRSLTE_DEFAULT_MAX_FRAMES_PBCH,
50, SRSLTE_DEFAULT_MAX_FRAMES_PSS,
10, SRSLTE_DEFAULT_NOF_VALID_PSS_FRAMES,
0 0
}; };

@ -90,6 +90,9 @@ SRSLTE_API void srslte_chest_dl_set_smooth_filter(srslte_chest_dl_t *q,
float *filter, float *filter,
uint32_t filter_len); uint32_t filter_len);
SRSLTE_API void srslte_chest_dl_set_smooth_filter3_coeff(srslte_chest_dl_t* q,
float w);
SRSLTE_API int srslte_chest_dl_estimate(srslte_chest_dl_t *q, SRSLTE_API int srslte_chest_dl_estimate(srslte_chest_dl_t *q,
cf_t *input, cf_t *input,
cf_t *ce[SRSLTE_MAX_PORTS], cf_t *ce[SRSLTE_MAX_PORTS],

@ -127,6 +127,11 @@ typedef enum {SRSLTE_CP_NORM, SRSLTE_CP_EXT} srslte_cp_t;
#define SRSLTE_NOF_LTE_BANDS 29 #define SRSLTE_NOF_LTE_BANDS 29
#define SRSLTE_DEFAULT_MAX_FRAMES_PBCH 500
#define SRSLTE_DEFAULT_MAX_FRAMES_PSS 50
#define SRSLTE_DEFAULT_NOF_VALID_PSS_FRAMES 10
typedef enum SRSLTE_API { typedef enum SRSLTE_API {
SRSLTE_PHICH_NORM = 0, SRSLTE_PHICH_NORM = 0,
SRSLTE_PHICH_EXT SRSLTE_PHICH_EXT

@ -55,7 +55,7 @@ SRSLTE_API int srslte_crc_init(srslte_crc_t *h,
int srslte_crc_order); int srslte_crc_order);
SRSLTE_API int srslte_crc_set_init(srslte_crc_t *h, SRSLTE_API int srslte_crc_set_init(srslte_crc_t *h,
uint64_t srslte_crc_init_value); uint64_t init_value);
SRSLTE_API uint32_t srslte_crc_attach(srslte_crc_t *h, SRSLTE_API uint32_t srslte_crc_attach(srslte_crc_t *h,
uint8_t *data, uint8_t *data,

@ -53,10 +53,6 @@
#include "srslte/phch/pbch.h" #include "srslte/phch/pbch.h"
#include "srslte/dft/ofdm.h" #include "srslte/dft/ofdm.h"
/**
* TODO: Check also peak offset
*/
#define SRSLTE_CS_NOF_PRB 6 #define SRSLTE_CS_NOF_PRB 6
#define SRSLTE_CS_SAMP_FREQ 1920000.0 #define SRSLTE_CS_SAMP_FREQ 1920000.0

@ -175,7 +175,7 @@ SRSLTE_API float srslte_ue_sync_get_sfo(srslte_ue_sync_t *q);
SRSLTE_API int srslte_ue_sync_get_last_sample_offset(srslte_ue_sync_t *q); SRSLTE_API int srslte_ue_sync_get_last_sample_offset(srslte_ue_sync_t *q);
SRSLTE_API void srslte_ue_sync_set_sample_offset_mean_len(srslte_ue_sync_t *q, SRSLTE_API void srslte_ue_sync_set_sample_offset_correct_period(srslte_ue_sync_t *q,
uint32_t nof_subframes); uint32_t nof_subframes);
SRSLTE_API void srslte_ue_sync_get_last_timestamp(srslte_ue_sync_t *q, SRSLTE_API void srslte_ue_sync_get_last_timestamp(srslte_ue_sync_t *q,

@ -281,6 +281,15 @@ void srslte_chest_dl_set_smooth_filter(srslte_chest_dl_t *q, float *filter, uint
} }
} }
void srslte_chest_dl_set_smooth_filter3_coeff(srslte_chest_dl_t* q, float w)
{
if (q->smooth_filter_len == 3) {
q->smooth_filter[0] = w;
q->smooth_filter[2] = w;
q->smooth_filter[1] = 1-2*w;
}
}
static void average_pilots(srslte_chest_dl_t *q, cf_t *input, cf_t *output, uint32_t port_id) { static void average_pilots(srslte_chest_dl_t *q, cf_t *input, cf_t *output, uint32_t port_id) {
uint32_t nsymbols = srslte_refsignal_cs_nof_symbols(port_id); uint32_t nsymbols = srslte_refsignal_cs_nof_symbols(port_id);
uint32_t nref = 2*q->cell.nof_prb; uint32_t nref = 2*q->cell.nof_prb;

@ -122,7 +122,7 @@ int rf_mib_decoder(srslte_rf_t *rf, cell_search_cfg_t *config, srslte_cell_t *ce
} }
/* Find and decody MIB */ /* Find and decody MIB */
ret = srslte_ue_mib_sync_decode(&ue_mib, config->max_frames_pss, bch_payload, &cell->nof_ports, NULL); ret = srslte_ue_mib_sync_decode(&ue_mib, config->max_frames_pbch, bch_payload, &cell->nof_ports, NULL);
if (ret < 0) { if (ret < 0) {
fprintf(stderr, "Error decoding MIB\n"); fprintf(stderr, "Error decoding MIB\n");
goto clean_exit; goto clean_exit;

@ -182,7 +182,7 @@ int srslte_ue_sync_init(srslte_ue_sync_t *q,
q->nof_avg_find_frames = FIND_NOF_AVG_FRAMES; q->nof_avg_find_frames = FIND_NOF_AVG_FRAMES;
srslte_sync_set_threshold(&q->sfind, 2.0); srslte_sync_set_threshold(&q->sfind, 2.0);
srslte_sync_set_threshold(&q->strack, 1.0); srslte_sync_set_threshold(&q->strack, 1.2);
} else { } else {
srslte_sync_set_N_id_2(&q->sfind, cell.id%3); srslte_sync_set_N_id_2(&q->sfind, cell.id%3);

Loading…
Cancel
Save