From bfe6b1a2a89a172274e19e391a6a87f6eda05ee2 Mon Sep 17 00:00:00 2001 From: Marc Majoral <=> Date: Tue, 21 Dec 2021 18:03:02 +0100 Subject: [PATCH] Do not take into account max_dwells when bit_transition_flag is true --- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 254cd27ce..53dba2af7 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -852,7 +852,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count) } d_worker_active = false; - if ((d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells) or (d_positive_acq == 1)) + if ((d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells) or (d_positive_acq == 1) or (d_acq_parameters.bit_transition_flag)) { // Record results to file if required if (d_dump and d_channel == d_dump_channel) @@ -888,7 +888,7 @@ void pcps_acquisition::calculate_threshold() const int num_bins = effective_fft_size * num_doppler_bins; - d_threshold = static_cast(2.0 * boost::math::gamma_p_inv(2.0 * d_acq_parameters.max_dwells, std::pow(1.0 - pfa, 1.0 / static_cast(num_bins)))); + d_threshold = static_cast(2.0 * boost::math::gamma_p_inv(2.0 * (d_acq_parameters.bit_transition_flag ? 1 : d_acq_parameters.max_dwells), std::pow(1.0 - pfa, 1.0 / static_cast(num_bins)))); }