PHY_vars_UE_g[0][CC_id]->rx_total_gain_dB=PHY_vars_UE_g[0][CC_id]->rx_gain_max[0]+(int)rx_gain[CC_id][0]-30;//-30 because it was calibrated with a 30dB gain
}
elseif((mode==rx_calib_ue_med)){
for(i=0;i<4;i++)
rx_gain_mode[CC_id][i]=med_gain;
PHY_vars_UE_g[0][CC_id]->rx_total_gain_dB=PHY_vars_UE_g[0][CC_id]->rx_gain_med[0]+(int)rx_gain[CC_id][0]-30;//-30 because it was calibrated with a 30dB gain;
}
elseif((mode==rx_calib_ue_byp)){
for(i=0;i<4;i++)
rx_gain_mode[CC_id][i]=byp_gain;
PHY_vars_UE_g[0][CC_id]->rx_total_gain_dB=PHY_vars_UE_g[0][CC_id]->rx_gain_byp[0]+(int)rx_gain[CC_id][0]-30;//-30 because it was calibrated with a 30dB gain;
PHY_vars_UE_g[0][CC_id]->rx_total_gain_dB=PHY_vars_UE_g[0][CC_id]->rx_gain_max[0]+(int)rx_gain[CC_id][0]-30;//-30 because it was calibrated with a 30dB gain
}
elseif((mode==rx_calib_ue_med)){
for(i=0;i<4;i++)
rx_gain_mode[CC_id][i]=med_gain;
PHY_vars_UE_g[0][CC_id]->rx_total_gain_dB=PHY_vars_UE_g[0][CC_id]->rx_gain_med[0]+(int)rx_gain[CC_id][0]-30;//-30 because it was calibrated with a 30dB gain;
}
elseif((mode==rx_calib_ue_byp)){
for(i=0;i<4;i++)
rx_gain_mode[CC_id][i]=byp_gain;
PHY_vars_UE_g[0][CC_id]->rx_total_gain_dB=PHY_vars_UE_g[0][CC_id]->rx_gain_byp[0]+(int)rx_gain[CC_id][0]-30;//-30 because it was calibrated with a 30dB gain;