From 5c99385ba3f34c8262faac2957573f757d0bbedb Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Thu, 14 Jul 2022 16:54:47 +0200 Subject: [PATCH] do not consume samples while performing a non-coherent integration --- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 872382f4f..a8ac0428e 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -909,7 +909,9 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), gr::thread::scoped_lock lk(d_setlock); if (!d_active or d_worker_active) { - if (!d_acq_parameters.blocking_on_standby) + // do not consume samples while performing a non-coherent integration + bool consume_samples = ((!d_active) || (d_active && (d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells))); + if ((!d_acq_parameters.blocking_on_standby) && consume_samples) { d_sample_counter += static_cast(ninput_items[0]); consume_each(ninput_items[0]);