Improve CW decoding process

Our approach exploits the autocorrelation properties of the CW signal.
Thus low, high or band pass filtering greatly affects the performance of
the algorithm, because they introduce autocorrelation.
This commit is contained in:
Manolis Surligas 2017-09-05 01:37:47 +03:00
parent 52efa4c8bd
commit f560f16af3
3 changed files with 66 additions and 62 deletions

View File

@ -91,10 +91,10 @@ namespace gr
* a false alarm. As we use the window size for setting the history
* it should have a reasonably size.
*/
size_t i = 10;
size_t i = 1;
d_window_size = d_dot_samples / i;
while(d_window_size > 200) {
i += 10;
while(d_window_size > 256) {
i++;
d_window_size = d_dot_samples / i;
}
@ -103,6 +103,9 @@ namespace gr
d_window_size++;
}
LOG_DEBUG("Dot samples: %lu", d_dot_samples);
LOG_DEBUG("Window size: %lu", d_window_size);
/* Set the duration of each symbol in multiples of the window size */
d_dot_windows_num = d_dot_samples / d_window_size;
d_dash_windows_num = 3 * d_dot_windows_num;

View File

@ -41,7 +41,7 @@ namespace gr
void
morse_decoder_impl::symbol_msg_handler (pmt::pmt_t msg)
{
bool res;
bool res = false;
std::string str;
morse_symbol_t s;
s = (morse_symbol_t) pmt::to_long (msg);
@ -85,16 +85,14 @@ namespace gr
* If the decoding return false, it means that either an non decode-able
* character situation occurred or the maximum word limit reached
*/
if (!s) {
if (!res) {
if (d_morse_tree.get_max_word_len () == d_morse_tree.get_word_len ()) {
str = d_morse_tree.get_word ();
d_morse_tree.reset ();
std::cout << "Received word: " << str << std::endl;
message_port_pub (pmt::mp ("out"),
pmt::make_blob (str.c_str (), str.length ()));
}
}
else {
LOG_DEBUG("Something went wrong");
}
}
/*

View File

@ -2,7 +2,8 @@
/*
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
*
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
* Copyright (C) 2016,2017
* Libre Space Foundation <http://librespacefoundation.org/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -273,7 +274,9 @@ namespace gr
}
tree_node::tree_node (char c) :
d_char (c), d_left (NULL), d_right (NULL)
d_char (c),
d_left (NULL),
d_right (NULL)
{
}