[hamradio-commits] [gnss-sdr] 133/251: avoiding division by zero
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.
commit f180de905dee0da2f6aca4e33adf1a60b207ed77
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Sat May 23 09:54:23 2015 +0200
avoiding division by zero
---
src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc
index 9750d22..3a90ab1 100644
--- a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc
+++ b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc
@@ -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())
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list