Logs to test snr drop issue

This commit is contained in:
Ismael Gomez 2018-02-16 12:05:45 +01:00
parent f8303acba7
commit f6a17d1182
3 changed files with 22 additions and 2 deletions

View File

@ -70,6 +70,9 @@ public:
void start_plot();
float get_ref_cfo();
float get_snr();
float get_rsrp();
float get_noise();
float get_cfo();
float get_ul_cfo();

View File

@ -675,10 +675,11 @@ void phch_recv::run_thread()
case 1:
if (last_worker) {
Debug("SF: cfo_tot=%7.1f Hz, ref=%f Hz, pss=%f Hz\n",
Info("SF: cfo_tot=%7.1f Hz, ref=%f Hz, pss=%f Hz, snr_sf=%.2f dB, rsrp=%.2f dB, noise=%.2f dB\n",
srslte_ue_sync_get_cfo(&ue_sync),
15000*last_worker->get_ref_cfo(),
15000*ue_sync.strack.cfo_pss_mean);
15000*ue_sync.strack.cfo_pss_mean,
last_worker->get_snr(), last_worker->get_rsrp(), last_worker->get_noise());
}
last_worker = worker;

View File

@ -203,6 +203,22 @@ float phch_worker::get_ref_cfo()
return srslte_chest_dl_get_cfo(&ue_dl.chest);
}
float phch_worker::get_snr()
{
return 10*log10(srslte_chest_dl_get_snr(&ue_dl.chest));
}
float phch_worker::get_rsrp()
{
return 10*log10(srslte_chest_dl_get_rsrp(&ue_dl.chest));
}
float phch_worker::get_noise()
{
return 10*log10(srslte_chest_dl_get_noise_estimate(&ue_dl.chest));
}
float phch_worker::get_cfo()
{
return cfo;