Commit 2a57046f authored by Wolfgang A. Mozart's avatar Wolfgang A. Mozart

adding correlation output to scope

parent e1625b00
...@@ -35,6 +35,9 @@ float tput_time_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; ...@@ -35,6 +35,9 @@ float tput_time_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
float tput_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}}; float tput_ue[NUMBER_OF_UE_MAX][TPUT_WINDOW_LENGTH] = {{0}};
float tput_ue_max[NUMBER_OF_UE_MAX] = {0}; float tput_ue_max[NUMBER_OF_UE_MAX] = {0};
extern int64_t *pss_corr_ue[3];
static void ia_receiver_on_off( FL_OBJECT *button, long arg) static void ia_receiver_on_off( FL_OBJECT *button, long arg)
{ {
...@@ -494,6 +497,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -494,6 +497,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int16_t **rxsig_t; int16_t **rxsig_t;
float **rxsig_t_dB; float **rxsig_t_dB;
float *time; float *time;
float *corr;
/* /*
int16_t **chest_t; int16_t **chest_t;
int16_t **chest_f; int16_t **chest_f;
...@@ -572,6 +576,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -572,6 +576,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
rxsig_t_dB[arx] = (float*) calloc(samples_per_frame,sizeof(float)); rxsig_t_dB[arx] = (float*) calloc(samples_per_frame,sizeof(float));
} }
time = calloc(samples_per_frame,sizeof(float)); time = calloc(samples_per_frame,sizeof(float));
corr = calloc(samples_per_frame,sizeof(float));
/* /*
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id]; chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id];
...@@ -610,6 +615,21 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -610,6 +615,21 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
*/ */
} }
for (ind=0;ind<3;ind++) {
if (pss_corr_ue[ind]) {
for (i=0; i<samples_per_frame; i++) {
corr[i] = (float) pss_corr_ue[ind][i];
time[i] = (float) i;
}
if (ind==0)
fl_set_xyplot_data(form->chest_t,time,corr,samples_per_frame,"","","");
else
fl_add_xyplot_overlay(form->chest_t,ind,time,corr,samples_per_frame,rx_antenna_colors[ind]);
}
}
/* /*
// Channel Impulse Response (still repeated format) // Channel Impulse Response (still repeated format)
if (chest_t != NULL) { if (chest_t != NULL) {
...@@ -798,6 +818,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -798,6 +818,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
fl_check_forms(); fl_check_forms();
free(time); free(time);
free(corr);
for (arx=0; arx<nb_antennas_rx; arx++) { for (arx=0; arx<nb_antennas_rx; arx++) {
free(rxsig_t_dB[arx]); free(rxsig_t_dB[arx]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment