mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-03-05 02:58:16 +00:00
Use aligned memory in acquisition adapters
This commit is contained in:
parent
1b6b8ee268
commit
ff72204400
@ -100,6 +100,7 @@ target_link_libraries(acquisition_adapters
|
||||
PUBLIC
|
||||
acquisition_gr_blocks
|
||||
Gnuradio::blocks
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
PRIVATE
|
||||
gnss_sdr_flags
|
||||
Boost::headers
|
||||
@ -124,7 +125,6 @@ if(ENABLE_FPGA)
|
||||
algorithms_libs
|
||||
core_libs
|
||||
Volk::volk
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -40,7 +40,10 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -62,7 +65,7 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
num_codes_ = acq_parameters_.sampled_ms;
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
@ -73,10 +76,6 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -141,7 +140,7 @@ void BeidouB1iPcpsAcquisition::init()
|
||||
|
||||
void BeidouB1iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
beidou_b1i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
|
@ -26,10 +26,10 @@
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -152,7 +152,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
|
@ -38,7 +38,10 @@ BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -60,7 +63,7 @@ BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition(
|
||||
num_codes_ = acq_parameters_.sampled_ms;
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
@ -71,10 +74,6 @@ BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -138,7 +137,7 @@ void BeidouB3iPcpsAcquisition::init()
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
beidou_b3i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
|
@ -25,10 +25,10 @@
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -151,7 +151,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
|
@ -37,11 +37,16 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
configuration_(configuration),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
acq_parameters_.ms_per_code = 4;
|
||||
acq_parameters_.SetFromConfiguration(configuration_, role, GALILEO_E1_CODE_CHIP_RATE_CPS, GALILEO_E1_OPT_ACQ_FS_SPS);
|
||||
|
||||
@ -60,7 +65,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
|
||||
@ -73,11 +78,6 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_center_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -152,7 +152,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acquire_pilot_ == true)
|
||||
{
|
||||
|
@ -23,10 +23,10 @@
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -156,7 +156,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
|
@ -35,7 +35,11 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -95,7 +99,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
auto fft_if = gnss_fft_fwd_make_unique(nsamples_total); // Direct FFT
|
||||
volk_gnsssdr::vector<std::complex<float>> code(nsamples_total); // buffer for the local code
|
||||
volk_gnsssdr::vector<gr_complex> fft_codes_padded(nsamples_total);
|
||||
d_all_fft_codes_ = std::vector<uint32_t>(nsamples_total * GALILEO_E1_NUMBER_OF_CODES); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = volk_gnsssdr::vector<uint32_t>(nsamples_total * GALILEO_E1_NUMBER_OF_CODES); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
|
||||
float max; // temporary maxima search
|
||||
int32_t tmp;
|
||||
@ -172,10 +176,6 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -191,7 +192,7 @@ private:
|
||||
static const uint32_t shl_code_bits = 65536; // shift left by 10 bits
|
||||
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
volk_gnsssdr::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string dump_filename_;
|
||||
|
@ -37,7 +37,12 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -65,18 +70,13 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_center_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -145,7 +145,7 @@ void GalileoE5aPcpsAcquisition::init()
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
std::array<char, 3> signal_{};
|
||||
signal_[0] = '5';
|
||||
signal_[2] = '\0';
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -149,7 +149,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
Acq_Conf acq_parameters_;
|
||||
|
@ -34,7 +34,11 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -96,7 +100,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(
|
||||
auto fft_if = gnss_fft_fwd_make_unique(nsamples_total); // Direct FFT
|
||||
volk_gnsssdr::vector<std::complex<float>> code(nsamples_total);
|
||||
volk_gnsssdr::vector<std::complex<float>> fft_codes_padded(nsamples_total);
|
||||
d_all_fft_codes_ = std::vector<uint32_t>(nsamples_total * GALILEO_E5A_NUMBER_OF_CODES); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = volk_gnsssdr::vector<uint32_t>(nsamples_total * GALILEO_E5A_NUMBER_OF_CODES); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
|
||||
float max; // temporary maxima search
|
||||
int32_t tmp;
|
||||
@ -175,10 +179,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -200,7 +200,7 @@ private:
|
||||
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
std::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
volk_gnsssdr::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
|
@ -37,7 +37,12 @@ namespace own = gsl;
|
||||
GalileoE5bPcpsAcquisition::GalileoE5bPcpsAcquisition(const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -65,18 +70,13 @@ GalileoE5bPcpsAcquisition::GalileoE5bPcpsAcquisition(const ConfigurationInterfac
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E5B_CODE_CHIP_RATE_CPS / GALILEO_E5B_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0F : 1.0F));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_center_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -143,7 +143,7 @@ void GalileoE5bPcpsAcquisition::init()
|
||||
|
||||
void GalileoE5bPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
std::array<char, 3> signal_{};
|
||||
signal_[0] = '7';
|
||||
signal_[2] = '\0';
|
||||
|
@ -23,9 +23,9 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -181,7 +181,7 @@ public:
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
|
@ -26,15 +26,18 @@
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <algorithm> // for copy_n
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
#include <algorithm> // for copy_n
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
|
||||
GalileoE5bPcpsAcquisitionFpga::GalileoE5bPcpsAcquisitionFpga(const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -96,7 +99,7 @@ GalileoE5bPcpsAcquisitionFpga::GalileoE5bPcpsAcquisitionFpga(const Configuration
|
||||
auto fft_if = gnss_fft_fwd_make_unique(nsamples_total); // Direct FFT
|
||||
volk_gnsssdr::vector<std::complex<float>> code(nsamples_total); // Buffer for local code
|
||||
volk_gnsssdr::vector<std::complex<float>> fft_codes_padded(nsamples_total);
|
||||
d_all_fft_codes_ = std::vector<uint32_t>(nsamples_total * GALILEO_E5B_NUMBER_OF_CODES); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = volk_gnsssdr::vector<uint32_t>(nsamples_total * GALILEO_E5B_NUMBER_OF_CODES); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
|
||||
float max; // temporary maxima search
|
||||
int32_t tmp;
|
||||
@ -175,10 +178,6 @@ GalileoE5bPcpsAcquisitionFpga::GalileoE5bPcpsAcquisitionFpga(const Configuration
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -23,9 +23,9 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -198,7 +198,7 @@ private:
|
||||
static const uint32_t shl_code_bits = 65536; // shift left by 10 bits
|
||||
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
volk_gnsssdr::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
|
@ -36,11 +36,15 @@ GalileoE6PcpsAcquisition::GalileoE6PcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
configuration_(configuration),
|
||||
role_(role),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
acq_parameters_.ms_per_code = 1;
|
||||
acq_parameters_.SetFromConfiguration(configuration_, role, GALILEO_E6_B_CODE_CHIP_RATE_CPS, GALILEO_E6_OPT_ACQ_FS_SPS);
|
||||
|
||||
@ -58,7 +62,7 @@ GalileoE6PcpsAcquisition::GalileoE6PcpsAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E6_B_CODE_CHIP_RATE_CPS / GALILEO_E6_B_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
|
||||
@ -71,11 +75,6 @@ GalileoE6PcpsAcquisition::GalileoE6PcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_center_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -147,7 +146,7 @@ void GalileoE6PcpsAcquisition::init()
|
||||
|
||||
void GalileoE6PcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
|
@ -24,9 +24,9 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -156,7 +156,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
|
@ -38,7 +38,10 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -59,7 +62,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
|
||||
@ -72,11 +75,6 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -142,7 +140,7 @@ void GlonassL1CaPcpsAcquisition::init()
|
||||
|
||||
void GlonassL1CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
glonass_l1_ca_code_gen_complex_sampled(code, fs_in_, 0);
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -150,7 +150,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
|
@ -37,7 +37,10 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -58,7 +61,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
|
||||
@ -71,11 +74,6 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -141,7 +139,7 @@ void GlonassL2CaPcpsAcquisition::init()
|
||||
|
||||
void GlonassL2CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
glonass_l2_ca_code_gen_complex_sampled(code, fs_in_, 0);
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -149,7 +149,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
|
@ -40,7 +40,12 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -61,7 +66,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
|
||||
@ -74,11 +79,6 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_center_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -150,7 +150,7 @@ void GpsL1CaPcpsAcquisition::init()
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
|
@ -28,9 +28,9 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* Classes for GNSS signal acquisition
|
||||
@ -162,7 +162,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <algorithm> // for copy_n
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
@ -37,7 +36,11 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -89,7 +92,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
// allocate memory to compute all the PRNs and compute all the possible codes
|
||||
volk_gnsssdr::vector<std::complex<float>> code(nsamples_total);
|
||||
volk_gnsssdr::vector<std::complex<float>> fft_codes_padded(nsamples_total);
|
||||
d_all_fft_codes_ = std::vector<uint32_t>(nsamples_total * NUM_PRNs); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = volk_gnsssdr::vector<uint32_t>(nsamples_total * NUM_PRNs); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
float max;
|
||||
int32_t tmp;
|
||||
int32_t tmp2;
|
||||
@ -151,10 +154,6 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -196,7 +196,7 @@ private:
|
||||
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
std::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
volk_gnsssdr::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
int32_t doppler_center_;
|
||||
|
@ -38,7 +38,11 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -59,7 +63,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L2_M_CODE_RATE_CPS / GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
|
||||
@ -70,11 +74,6 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_center_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
num_codes_ = acq_parameters_.sampled_ms / acq_parameters_.ms_per_code;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
@ -149,7 +148,7 @@ void GpsL2MPcpsAcquisition::init()
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -157,7 +158,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
|
@ -37,7 +37,10 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -89,7 +92,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
// allocate memory to compute all the PRNs and compute all the possible codes
|
||||
volk_gnsssdr::vector<std::complex<float>> code(nsamples_total);
|
||||
volk_gnsssdr::vector<std::complex<float>> fft_codes_padded(nsamples_total);
|
||||
d_all_fft_codes_ = std::vector<uint32_t>(nsamples_total * NUM_PRNs); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = volk_gnsssdr::vector<uint32_t>(nsamples_total * NUM_PRNs); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
|
||||
float max; // temporary maxima search
|
||||
int32_t tmp;
|
||||
|
@ -23,10 +23,10 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory> // for weak_ptr
|
||||
#include <string> // for string
|
||||
#include <vector>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory> // for weak_ptr
|
||||
#include <string> // for string
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -158,7 +158,7 @@ private:
|
||||
static const uint32_t SHL_CODE_BITS = 65536; // shift left by 10 bits
|
||||
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
volk_gnsssdr::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string item_type_;
|
||||
|
@ -37,7 +37,12 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -58,7 +63,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5I_CODE_RATE_CPS / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_ = volk_gnsssdr::vector<std::complex<float>>(vector_length_);
|
||||
fs_in_ = acq_parameters_.fs_in;
|
||||
|
||||
num_codes_ = acq_parameters_.sampled_ms;
|
||||
@ -72,11 +77,6 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_center_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -150,7 +150,7 @@ void GpsL5iPcpsAcquisition::init()
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::vector<std::complex<float>> code(code_length_);
|
||||
volk_gnsssdr::vector<std::complex<float>> code(code_length_);
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -157,7 +157,7 @@ public:
|
||||
|
||||
private:
|
||||
pcps_acquisition_sptr acquisition_;
|
||||
std::vector<std::complex<float>> code_;
|
||||
volk_gnsssdr::vector<std::complex<float>> code_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
|
@ -37,7 +37,11 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
unsigned int out_streams) : gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
doppler_center_(0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
@ -92,7 +96,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
auto fft_if = gnss_fft_fwd_make_unique(nsamples_total); // Direct FFT
|
||||
volk_gnsssdr::vector<std::complex<float>> code(nsamples_total);
|
||||
volk_gnsssdr::vector<std::complex<float>> fft_codes_padded(nsamples_total);
|
||||
d_all_fft_codes_ = std::vector<uint32_t>(nsamples_total * NUM_PRNs); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = volk_gnsssdr::vector<uint32_t>(nsamples_total * NUM_PRNs); // memory containing all the possible fft codes for PRN 0 to 32
|
||||
|
||||
float max; // temporary maxima search
|
||||
int32_t tmp;
|
||||
@ -153,10 +157,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -198,7 +199,7 @@ private:
|
||||
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
std::weak_ptr<ChannelFsm> channel_fsm_;
|
||||
std::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
volk_gnsssdr::vector<uint32_t> d_all_fft_codes_; // memory that contains all the code ffts
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user