Discard cells if not found during cel selection

This commit is contained in:
Ismael Gomez 2020-07-20 00:51:36 +02:00
parent 138ec1f8e7
commit 06eba7eb72
3 changed files with 4 additions and 3 deletions

View File

@ -438,7 +438,7 @@ void rrc::in_sync()
// Cell selection criteria Section 5.2.3.2 of 36.304 // Cell selection criteria Section 5.2.3.2 of 36.304
bool rrc::cell_selection_criteria(float rsrp, float rsrq) bool rrc::cell_selection_criteria(float rsrp, float rsrq)
{ {
return (get_srxlev(rsrp) > 0 || !meas_cells.serving_cell().has_sib3()); return std::isnormal(rsrp) && (get_srxlev(rsrp) > 0 || !meas_cells.serving_cell().has_sib3());
} }
float rrc::get_srxlev(float Qrxlevmeas) float rrc::get_srxlev(float Qrxlevmeas)

View File

@ -494,7 +494,7 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers()
float Ms = is_rsrp(report_cfg.trigger_quant.value) ? serv_cell->get_rsrp() : serv_cell->get_rsrq(); float Ms = is_rsrp(report_cfg.trigger_quant.value) ? serv_cell->get_rsrp() : serv_cell->get_rsrq();
if (!std::isnormal(Ms)) { if (!std::isnormal(Ms)) {
log_h->warning("MEAS: Serving cell Ms=%f invalid when evaluating triggers\n", Ms); log_h->debug("MEAS: Serving cell Ms=%f invalid when evaluating triggers\n", Ms);
return; return;
} }

View File

@ -564,7 +564,7 @@ proc_outcome_t rrc::cell_selection_proc::start_cell_selection()
} }
// If any of the known cells meets the selection criteria or could not be selected, search again. // If any of the known cells meets the selection criteria or could not be selected, search again.
Info("Could not select any kown cell. Searching new cells\n"); Info("Could not select any known cell. Searching new cells\n");
if (not rrc_ptr->cell_searcher.launch(&cell_search_fut)) { if (not rrc_ptr->cell_searcher.launch(&cell_search_fut)) {
return proc_outcome_t::error; return proc_outcome_t::error;
} }
@ -590,6 +590,7 @@ proc_outcome_t rrc::cell_selection_proc::step_cell_selection(const bool& cs_ret)
Error("Could not camp on serving cell.\n"); Error("Could not camp on serving cell.\n");
} }
rrc_ptr->meas_cells.serving_cell().set_rsrp(-INFINITY);
discard_serving = true; // Discard this cell discard_serving = true; // Discard this cell
// Continue to next neighbour cell // Continue to next neighbour cell
++neigh_index; ++neigh_index;