Added TA to metrics

master
Ismael Gomez 7 years ago
parent 040c33497d
commit 81b69327b1

@ -32,6 +32,7 @@ namespace srsue {
struct sync_metrics_t
{
float ta_us;
float cfo;
float sfo;
};

@ -72,7 +72,7 @@ void metrics_csv::set_metrics(ue_metrics_t &metrics, const uint32_t period_usec)
{
if (file.is_open() && ue != NULL) {
if(n_reports == 0) {
file << "time;rsrp;pl;cfo;dl_mcs;dl_snr;dl_turbo;dl_brate;dl_bler;ul_mcs;ul_buff;ul_brate;ul_bler;rf_o;rf_u;rf_l;is_attached\n";
file << "time;rsrp;pl;cfo;dl_mcs;dl_snr;dl_turbo;dl_brate;dl_bler;ul_ta,ul_mcs;ul_buff;ul_brate;ul_bler;rf_o;rf_u;rf_l;is_attached\n";
}
file << (metrics_report_period*n_reports) << ";";
file << float_to_string(metrics.phy.dl.rsrp, 2);
@ -87,6 +87,7 @@ void metrics_csv::set_metrics(ue_metrics_t &metrics, const uint32_t period_usec)
} else {
file << float_to_string(0, 2);
}
file << float_to_string(metrics.phy.sync.ta_us, 2);
file << float_to_string(metrics.phy.ul.mcs, 2);
file << float_to_string((float) metrics.mac.ul_buffer, 2);
file << float_to_string((float) metrics.mac.tx_brate/period_usec*1e6, 2);

@ -79,7 +79,7 @@ void metrics_stdout::set_metrics(ue_metrics_t &metrics, const uint32_t period_us
n_reports = 0;
cout << endl;
cout << "--Signal--------------DL------------------------------UL----------------------" << endl;
cout << " rsrp pl cfo mcs snr turbo brate bler mcs buff brate bler" << endl;
cout << " rsrp pl cfo mcs snr turbo brate bler ta_us mcs buff brate bler" << endl;
}
cout << float_to_string(metrics.phy.dl.rsrp, 2);
cout << float_to_string(metrics.phy.dl.pathloss, 2);
@ -93,6 +93,7 @@ void metrics_stdout::set_metrics(ue_metrics_t &metrics, const uint32_t period_us
} else {
cout << float_to_string(0, 1) << "%";
}
cout << float_to_string(metrics.phy.sync.ta_us, 2);
cout << float_to_string(metrics.phy.ul.mcs, 2);
cout << float_to_eng_string((float) metrics.mac.ul_buffer, 2);
cout << float_to_eng_string((float) metrics.mac.tx_brate/period_usec*1e6, 2);

@ -432,6 +432,7 @@ void phch_recv::run_thread()
metrics.sfo = srslte_ue_sync_get_sfo(&ue_sync);
metrics.cfo = srslte_ue_sync_get_cfo(&ue_sync);
metrics.ta_us = time_adv_sec*1e6;
worker_com->set_sync_metrics(metrics);
// Check if we need to TX a PRACH

Loading…
Cancel
Save