autotest_ue_offsets_metric.patch 1.31 KB
Newer Older
1
diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c
2
index 5dc629b..4d31ad3 100644
3 4
--- a/openair1/SCHED/phy_procedures_lte_ue.c
+++ b/openair1/SCHED/phy_procedures_lte_ue.c
5
@@ -3347,6 +3347,22 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
6 7
 
   // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
8 9
  
+   #if UE_AUTOTEST_TRACE
10 11 12 13 14 15 16 17 18 19 20 21
+    if ( (frame_rx % 10 == 0) && (subframe_rx == 0)) {
+      printf("AUTOTEST Metric : UE_FREQ_OFFSET = %d Hz (frame = %d) \n", ue->common_vars.freq_offset, frame_rx);
+      printf("AUTOTEST Metric : UE_RX_OFFSET = %d (frame = %d) \n", ue->rx_offset, frame_rx);
+
+      printf("AUTOTEST Metric : RRC Measurments RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE, NF %.1f dB (frame = %d)\n",
+        10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB,
+        10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB, 
+        10*log10(ue->measurements.rsrq[0]),
+        ue->measurements.n0_power_tot_dBm,
+        (double)ue->measurements.n0_power_tot_dBm+132.24,
+        frame_rx);
+     }
22
+  #endif
23
+
24
+ 
25 26
   // do procedures for C-RNTI
   if (ue->dlsch[eNB_id][0]->active == 1) {
27
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);