Use different dewhitening sequence for code rates (4,5)/(4,6) versus (4,7) and (4,8)

pull/77/head
Wilfried.Philips 2018-09-17 20:56:30 +02:00
rodzic abcfce7e4a
commit 5b6dd4815b
2 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -86,7 +86,6 @@ namespace gr {
d_number_of_bins_hdr = (uint32_t)(1u << (d_sf-2));
d_decim_factor = d_samples_per_symbol / d_number_of_bins;
d_energy_threshold = 0.0f;
d_whitening_sequence = gr::lora::prng_payload;
d_fine_sync = 0;
d_enable_fine_sync = !disable_drift_correction;
set_output_multiple(2 * d_samples_per_symbol);
@ -565,8 +564,8 @@ namespace gr {
// For determining whitening sequence
//if (!is_header)
// values_to_file("/tmp/after_deshuffle", &d_words_deshuffled[0], d_words_deshuffled.size(), 8);
dewhiten(is_header ? gr::lora::prng_header : d_whitening_sequence);
dewhiten(is_header ? gr::lora::prng_header :
(d_phdr.cr <=2) ? gr::lora::prng_payload_cr56 : gr::lora::prng_payload_cr78);
//if (!is_header)
// values_to_file("/tmp/after_dewhiten", &d_words_dewhitened[0], d_words_dewhitened.size(), 8);

Wyświetl plik

@ -100,7 +100,6 @@ namespace gr {
uint32_t d_payload_length; ///< The number of words after decoding the HDR or payload. Calculated from an indicator in the HDR.
uint32_t d_corr_fails; ///< Indicates how many times the correlation failed. After some tries, the state will revert to `DecoderState::DETECT`.
float d_energy_threshold; ///< The absolute threshold to distinguish signal from noise.
const uint8_t* d_whitening_sequence; ///< A pointer to the whitening sequence to be used in decoding. Determined by the SF in the ctor.
float d_snr; ///< Signal to noise ratio
boost::circular_buffer<float> d_pwr_queue; ///< Queue holding symbol power values