diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c index 8718d3e98bb386d0abc99c53c67d9a2ce2348737..e4c9375330f7ef97356f871f5936ff8a2f9e3f9d 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c @@ -240,7 +240,7 @@ void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue, } } - + LOG_D(PHY,"eNB: %d, RSRP_tmp: %d \n",eNB_offset,phy_vars_ue->PHY_measurements.rsrp[eNB_offset]); // 2 RE per PRB phy_vars_ue->PHY_measurements.rsrp[eNB_offset]/=(24*phy_vars_ue->lte_frame_parms.N_RB_DL); diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c index 64e8928301980947eb55a49d30d771a612c6f603..8e48fabbb9e79d2034c5d7ce0aa94858916d778b 100644 --- a/openair2/RRC/LITE/rrc_UE.c +++ b/openair2/RRC/LITE/rrc_UE.c @@ -2416,11 +2416,11 @@ void ue_meas_filtering(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index) //LOG_D(RRC,"RSRP_total_dB: %3.2f \n",(dB_fixed_times10(mac_xface->get_RSRP(ue_mod_idP,0,eNB_offset))/10.0)-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)-dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12)); - //LOG_D(RRC,"RSRP_dB: %3.2f \n",(dB_fixed_times10(mac_xface->get_RSRP(ue_mod_idP,0,eNB_offset))/10.0)); - //LOG_D(RRC,"gain_loss_dB: %d \n",mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)); - //LOG_D(RRC,"gain_fixed_dB: %d \n",dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12)); - //LOG_D(PHY,"[UE %d] Frame %d, RRC Measurements => rssi %3.1f dBm (digital: %3.1f dB)\n", - //ue_mod_idP, frameP, 10*log10(mac_xface->get_RSSI(ue_mod_idP,0))-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0),10*log10(mac_xface->get_RSSI(ue_mod_idP,0))); + LOG_D(RRC,"RSRP_dBm: %3.2f \n",(dB_fixed_times10(mac_xface->get_RSRP(ue_mod_idP,0,eNB_offset))/10.0)); + LOG_D(RRC,"gain_loss_dB: %d \n",mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)); + LOG_D(RRC,"gain_fixed_dB: %d \n",dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12)); + LOG_D(PHY,"[UE %d] Frame %d, RRC Measurements => rssi %3.1f dBm (digital: %3.1f dB)\n", + ue_mod_idP, frameP, 10*log10(mac_xface->get_RSSI(ue_mod_idP,0))-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0),10*log10(mac_xface->get_RSSI(ue_mod_idP,0))); LOG_D(RRC,"[UE %d] Frame %d: Meas RSRP: eNB_offset: %d rsrp_coef: %3.1f filter_coef: %d before L3 filtering: rsrp: %3.1f after L3 filtering: rsrp: %3.1f \n ", ue_mod_idP, frameP, eNB_offset,a, *UE_rrc_inst->QuantityConfig[0]->quantityConfigEUTRA->filterCoefficientRSRP, @@ -2444,9 +2444,8 @@ void ue_meas_filtering(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index) UE_rrc_inst[ue_mod_idP].rsrq_db_filtered[eNB_offset]=(1-a1)*UE_rrc_inst[ue_mod_idP].rsrq_db_filtered[eNB_offset] + a1 *UE_rrc_inst[ue_mod_idP].rsrq_db[eNB_offset]; //mac_xface->set_RSRP_filtered(ue_mod_idP,eNB_offset,UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]); /* - LOG_D(RRC,"[UE %d] meas RSRQ: eNB_offset: %d rsrq_coef: %3.2f filter_coef: %d before L3 filtering: rsrq: %3.1f after L3 filtering: rsrq: %3.1f \n ", - ue_mod_idP, eNB_offset, - a1, + LOG_D(RRC,"[UE %d] Frame %d: Meas RSRQ: eNB_offset: %d rsrq_coef: %3.2f filter_coef: %d before L3 filtering: rsrq: %3.1f after L3 filtering: rsrq: %3.1f \n ", + ue_mod_idP,frameP,eNB_offset,a1, *UE_rrc_inst->QuantityConfig[0]->quantityConfigEUTRA->filterCoefficientRSRQ, mac_xface->get_RSRQ(ue_mod_idP,0,eNB_offset), UE_rrc_inst[ue_mod_idP].rsrq_db[eNB_offset], @@ -2558,8 +2557,8 @@ void ue_measurement_report_triggering(module_id_t ue_mod_idP, frame_t frameP,uin //LOG_N(RRC,"[UE%d] Frame %d Check below lines for segfault :), Fix me \n",ue_mod_idP, frameP); ttt_ms = timeToTrigger_ms[UE_rrc_inst[ue_mod_idP].ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger]; // Freq specific offset of neighbor cell freq - ofn = ((UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq != NULL) ? - *UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq : 15); // /* 15 is the Default */ + ofn = 5;//((UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq != NULL) ? + // *UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq : 15); // /* 15 is the Default */ // cellIndividualOffset of neighbor cell - not defined yet ocn = 0; a3_offset = UE_rrc_inst[ue_mod_idP].ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset; @@ -2637,13 +2636,13 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t } if(UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]+ofn+ocn-hys > UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_index]+ofs+ocs-1/*+a3_offset*/) { UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] += 2; //Called every subframe = 2ms - LOG_D(RRC,"[UE %d] Frame %d: Entry measTimer[%d][%d]: %d currentCell: %d betterCell: %d \n", - ue_mod_idP, frameP, ue_cnx_index,meas_index,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset); + LOG_D(RRC,"[UE %d] Frame %d: Entry measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n", + ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset); } else { UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] = 0; //Exit condition: Resetting the measurement timer - LOG_D(RRC,"[UE %d] Frame %d: Exit measTimer[%d][%d]: %d currentCell: %d betterCell: %d \n", - ue_mod_idP, frameP, ue_cnx_index,meas_index,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset); + LOG_D(RRC,"[UE %d] Frame %d: Exit measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n", + ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset); } if (UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] >= ttt) { UE_rrc_inst->HandoverInfoUe.targetCellId = get_adjacent_cell_id(ue_mod_idP,tmp_offset); //WARNING!!!...check this! @@ -2656,6 +2655,9 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t //LOG_D(RRC,"PHY_ID: %d \n",UE_rrc_inst->HandoverInfoUe.targetCellId); return 1; } + // else{ + // LOG_D(RRC,"Condition does not hold\n"); + // } } } return 0; diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index 05355002a84c06300aba32beccd83292ddc3c75c..4281fb98a33270d415e46f154d3a0e2c9d652dfb 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -1386,7 +1386,7 @@ void rrc_eNB_generate_HandoverPreparationInformation( memcpy((void *)&eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->as_config, (void *)&eNB_rrc_inst[enb_mod_idP].handover_info[ue_mod_idP]->as_config, sizeof(AS_Config_t)); - eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->ho_prepare = 0xFF; + eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->ho_prepare = 0x00;// 0xFF; eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->ho_complete = 0; eNB_rrc_inst[enb_mod_idP].handover_info[ue_mod_idP]->modid_t = mod_id_target; diff --git a/openair2/UTIL/OMG/TRACE/handover.tr b/openair2/UTIL/OMG/TRACE/handover.tr index cbfa892d8c1c860da09db0fef5d14d8c34972d4b..decdf355ee4021c0e36786e99782a92e6c25e406 100644 --- a/openair2/UTIL/OMG/TRACE/handover.tr +++ b/openair2/UTIL/OMG/TRACE/handover.tr @@ -1,13 +1,4 @@ -0 0 867 1440 40 -1 0 887 1460 40 -2 0 907 1480 30 -3 0 927 1500 30 -4 0 947 1520 30 -5 0 967 1540 30 -6 0 987 1560 30 -7 0 1007 1580 30 -8 0 1027 1600 30 -9 0 1047 1620 30 -10 0 1067 1640 30 -11 0 1087 1660 30 -12 0 1107 1680 30 +0 0 1800 4800 200 +10 0 4700 4840 200 +20 0 6500 4880 200 + diff --git a/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr b/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr index cc4ea41b4b857650ecd2a1a393bc18a81de717df..09d8cb40910634e2dde67ff2fb5bcdbd3880ddda 100644 --- a/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr +++ b/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr @@ -1,3 +1,3 @@ -0 0 670 1200 0 -0 1 1162 1800 0 -0 2 1162 600 0 \ No newline at end of file +0 0 2680 4800 0 +0 1 4648 4800 0 +0 2 6648 4800 0 diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml index e7ef5433cd5cf9a39b9df16a3c63e9b01d1902b2..cbec73e902c6afc96584671b90eab874e1be3ac6 100644 --- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml +++ b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml @@ -4,7 +4,8 @@ <LARGE_SCALE>urban</LARGE_SCALE> <FREE_SPACE_MODEL_PARAMETERS> <PATHLOSS_EXPONENT>3.67</PATHLOSS_EXPONENT> - <PATHLOSS_0_dB>-120</PATHLOSS_0_dB><!--pathloss at 1km --> + <!-- <PATHLOSS_0_dB>-100</PATHLOSS_0_dB> --> <!--pathloss at 1km --> + <PATHLOSS_0_dB>-120</PATHLOSS_0_dB><!--pathloss at 1km --> </FREE_SPACE_MODEL_PARAMETERS> <SMALL_SCALE>AWGN</SMALL_SCALE> </FADING> @@ -29,8 +30,8 @@ <TOPOLOGY_CONFIG> <AREA> - <X_m>2400</X_m> - <Y_m>2400</Y_m> + <X_m>10000</X_m> //2400 + <Y_m>10000</Y_m> //2400 </AREA> <MOBILITY> <UE_MOBILITY> @@ -54,7 +55,7 @@ </TOPOLOGY_CONFIG> <EMULATION_CONFIG> - <EMULATION_TIME_ms>3000</EMULATION_TIME_ms> + <EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <LOG> <!-- set the global log level --> <LEVEL>debug</LEVEL> diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index 6c731d9ee7a5d9bf3db45cbe203c6a6c19237edc..aca03d4ca2349e6cef3ea478b7066b153552179b 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -93,6 +93,7 @@ uint16_t Nid_cell = 0; //needed by init_lte_vars int nb_antennas_rx = 2; // // uint8_t target_dl_mcs = 16; // max mcs used by MAC scheduler uint8_t rate_adaptation_flag = 0; +uint8_t set_snr = 0; uint8_t set_sinr = 0; double snr_dB=0, sinr_dB=0; uint8_t set_seed = 0;