Commit 1813e9a4 authored by Haruki NAOI's avatar Haruki NAOI

Fix: TPC control with average SNR value.

(cherry picked from commit 243c90f647a1f97dc3a1486502dc6263b5705e39)
parent 379fc455
......@@ -2448,6 +2448,7 @@ add_new_ue(module_id_t mod_idP,
UE_list->assoc_dl_slice_idx[UE_id] = 0;
UE_list->assoc_ul_slice_idx[UE_id] = 0;
UE_list->UE_sched_ctrl[UE_id].ta_update = 31;
UE_scheduling_control->pusch_snr[CC_idP] = 0;
for (j = 0; j < 8; j++) {
UE_list->UE_template[cc_idP][UE_id].oldNDI[j][TB1] = (j == 0) ? 1 : 0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0
......
......@@ -172,7 +172,14 @@ rx_sdu(const module_id_t enb_mod_idP,
* maybe it's even not correct at all?
*/
UE_scheduling_control->ta_update = (UE_scheduling_control->ta_update * 3 + timing_advance) / 4;
if(UE_scheduling_control->pusch_snr[CC_idP] == 0) {
UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi;
}
else {
UE_scheduling_control->pusch_snr[CC_idP] = (UE_scheduling_control->pusch_snr[CC_idP] * 3 + ul_cqi) / 4;
}
UE_scheduling_control->ul_consecutive_errors = 0;
first_rb = UE_template_ptr->first_rb_ul[harq_pid];
......
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