1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-04-14 23:03:14 +00:00

avoiding division by zero

This commit is contained in:
Carles Fernandez 2015-05-23 09:54:23 +02:00
parent 650045fb94
commit f180de905d

View File

@ -338,7 +338,11 @@ int Viterbi_Decoder::do_tb_and_decode(int traceback_length, int requested_decodi
state = it->get_anchestor_state_of_current_state(state);
t_out--;
}
indicator_metric /= n_im;
if(n_im > 0)
{
indicator_metric /= n_im;
}
VLOG(BLOCK) << "indicator metric: " << indicator_metric;
// remove old states
if (d_trellis_paths.begin() + traceback_length + overstep_length <= d_trellis_paths.end())