mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-10-11 02:01:50 +00:00
Fix QuickSync acquisition
This commit is contained in:
@@ -262,6 +262,12 @@ Acq_Conf get_acq_conf(
|
||||
acq_parameters.num_codes = acq_parameters.sampled_ms / ms_per_code;
|
||||
acq_parameters.code_length = static_cast<unsigned int>(round(acq_parameters.fs_in / (chip_rate / code_length_chips)));
|
||||
acq_parameters.vector_length = acq_parameters.code_length * acq_parameters.num_codes;
|
||||
if (default_folding_factor)
|
||||
{
|
||||
// QuickSync folds folding_factor^2 chunks of code_length / folding_factor
|
||||
// samples, so each input vector must hold folding_factor full code periods
|
||||
acq_parameters.vector_length *= acq_parameters.folding_factor;
|
||||
}
|
||||
acq_parameters.threshold = threshold_compute->calculate_threshold(acq_parameters);
|
||||
|
||||
if (implementation == "GPS_L1_CA_PCPS_Acquisition_Fine_Doppler")
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#if USE_GLOG_AND_GFLAGS
|
||||
#include <glog/logging.h>
|
||||
@@ -73,6 +75,15 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(const Acq_Conf& con
|
||||
d_magnitude_folded(d_fft_size),
|
||||
d_possible_delay(d_folding_factor)
|
||||
{
|
||||
// Each call to general_work() processes d_samples_per_code * d_folding_factor
|
||||
// samples from a single input item, so the item must be at least that long
|
||||
if (static_cast<int64_t>(d_vector_length) < static_cast<int64_t>(d_samples_per_code) * static_cast<int64_t>(d_folding_factor))
|
||||
{
|
||||
throw std::invalid_argument("pcps_quicksync_acquisition_cc: input vector length (" + std::to_string(d_vector_length) +
|
||||
" samples) is shorter than folding_factor code periods (" +
|
||||
std::to_string(static_cast<int64_t>(d_samples_per_code) * static_cast<int64_t>(d_folding_factor)) + " samples)");
|
||||
}
|
||||
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
|
||||
// Create the d_code vector, which would store the values of the code in its
|
||||
|
||||
+5
-2
@@ -502,8 +502,6 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test::wait_message()
|
||||
|
||||
while (!stop)
|
||||
{
|
||||
acquisition->reset();
|
||||
|
||||
begin = std::chrono::system_clock::now();
|
||||
|
||||
channel_internal_queue.wait_and_pop(message);
|
||||
@@ -514,6 +512,11 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test::wait_message()
|
||||
mean_acq_time_us += elapsed_seconds.count() * 1e6;
|
||||
|
||||
process_message();
|
||||
|
||||
if (!stop)
|
||||
{
|
||||
acquisition->reset(); // arm the next realization
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -491,8 +491,6 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test::wait_message()
|
||||
|
||||
while (!stop)
|
||||
{
|
||||
acquisition->reset();
|
||||
|
||||
start = std::chrono::system_clock::now();
|
||||
|
||||
channel_internal_queue.wait_and_pop(message);
|
||||
@@ -503,6 +501,11 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test::wait_message()
|
||||
mean_acq_time_us += elapsed_seconds.count() * 1e6;
|
||||
|
||||
process_message();
|
||||
|
||||
if (!stop)
|
||||
{
|
||||
acquisition->reset(); // arm the next realization
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user