mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-01 07:43:04 +00:00
bds_b3i: Updating branch with new changes from upstream repo
This commit is contained in:
@@ -95,15 +95,17 @@ add_library(acquisition_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
|
||||
|
||||
target_link_libraries(acquisition_adapters
|
||||
PUBLIC
|
||||
Gnuradio::blocks
|
||||
algorithms_libs
|
||||
gnss_sdr_flags
|
||||
acquisition_gr_blocks
|
||||
core_system_parameters
|
||||
Gnuradio::blocks
|
||||
Volk::volk
|
||||
PRIVATE
|
||||
Boost::boost
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Gnuradio::fft
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
acquisition_libs
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file beidou_bi1_pcps_acquisition.h
|
||||
* \file beidou_b1i_pcps_acquisition.h
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* Beidou B1I signals
|
||||
* \authors <ul>
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
|
||||
@@ -34,7 +34,15 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
#include <cstring> // for memcpy
|
||||
|
||||
|
||||
GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
@@ -69,12 +77,12 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||
acq_parameters.sampled_ms = sampled_ms;
|
||||
|
||||
acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); //will be true in future versions
|
||||
acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); // could be true in future versions
|
||||
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
// Find number of samples per spreading code (4 ms)
|
||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
acq_parameters.code_length = code_length;
|
||||
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f((float)code_length * 2));
|
||||
uint32_t nsamples_total = pow(2, nbits);
|
||||
@@ -246,6 +254,7 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_state(int state)
|
||||
acquisition_fpga_->set_state(state);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* \file galileo_e1_pcps_ambiguous_acquisition_fpga.h
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* Galileo E1 Signals
|
||||
* Galileo E1 Signals for the FPGA
|
||||
* \author Marc Majoral, 2019. mmajoral(at)cttc.es
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
@@ -34,19 +34,20 @@
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <string>
|
||||
|
||||
|
||||
class Gnss_Synchro;
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class adapts a PCPS acquisition block to an
|
||||
* AcquisitionInterface for Galileo E1 Signals
|
||||
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||
* to an AcquisitionInterface for Galileo E1 Signals
|
||||
*/
|
||||
class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
@@ -85,7 +86,7 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
@@ -135,8 +136,8 @@ public:
|
||||
void set_state(int state) override;
|
||||
|
||||
/*!
|
||||
* \brief Stop running acquisition
|
||||
*/
|
||||
* \brief Stop running acquisition
|
||||
*/
|
||||
void stop_acquisition() override;
|
||||
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
@@ -34,9 +34,15 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
#include <cstring> // for strcpy, memcpy
|
||||
|
||||
|
||||
GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration,
|
||||
|
||||
@@ -34,14 +34,22 @@
|
||||
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
class Gnss_Synchro;
|
||||
class ConfigurationInterface;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||
* to an AcquisitionInterface for Galileo E5a signals
|
||||
*/
|
||||
class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
public:
|
||||
@@ -67,7 +75,7 @@ public:
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return sizeof(int);
|
||||
return sizeof(lv_16sc_t);
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
@@ -78,7 +86,7 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
@@ -146,7 +154,6 @@ public:
|
||||
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
|
||||
|
||||
@@ -36,10 +36,16 @@
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <new>
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
#include <cstring> // for memcpy
|
||||
|
||||
|
||||
#define NUM_PRNs 32
|
||||
|
||||
@@ -36,16 +36,18 @@
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <string> // for string
|
||||
|
||||
class Gnss_Synchro;
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
||||
* for GPS L1 C/A signals
|
||||
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||
* to an AcquisitionInterface for GPS L1 C/A signals
|
||||
*/
|
||||
class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
@@ -84,7 +86,7 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*!
|
||||
* \file gps_l2_m_pcps_acquisition.cc
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* GPS L2 M signals
|
||||
* \file gps_l2_m_pcps_acquisition_fpga.cc
|
||||
* \brief Adapts an FPGA-offloaded PCPS acquisition block
|
||||
* to an AcquisitionInterface for GPS L2 M signals
|
||||
* \authors <ul>
|
||||
* <li> Javier Arribas, 2015. jarribas(at)cttc.es
|
||||
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@@ -35,9 +35,16 @@
|
||||
#include "GPS_L2C.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
#include <cstring> // for memcpy
|
||||
|
||||
#define NUM_PRNs 32
|
||||
|
||||
@@ -80,14 +87,13 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
std::string device_name = configuration_->property(role + ".devicename", default_device_name);
|
||||
acq_parameters.device_name = device_name;
|
||||
acq_parameters.samples_per_ms = nsamples_total / acq_parameters.sampled_ms;
|
||||
//acq_parameters.samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001));
|
||||
acq_parameters.samples_per_code = nsamples_total;
|
||||
|
||||
acq_parameters.downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||
acq_parameters.excludelimit = static_cast<uint32_t>(std::round(static_cast<double>(fs_in_) / GPS_L2_M_CODE_RATE_HZ));
|
||||
|
||||
// compute all the GPS L1 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// compute all the GPS L2C PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time
|
||||
// a channel is assigned)
|
||||
auto* fft_if = new gr::fft::fft_complex(vector_length, true); // Direct FFT
|
||||
// allocate memory to compute all the PRNs and compute all the possible codes
|
||||
@@ -125,7 +131,6 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
}
|
||||
}
|
||||
|
||||
//acq_parameters
|
||||
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
||||
|
||||
// temporary buffers that we can delete
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*!
|
||||
* \file gps_l2_m_pcps_acquisition.h
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* GPS L2 M signals
|
||||
* \file gps_l2_m_pcps_acquisition_fpga.h
|
||||
* \brief Adapts an FPGA-offloaded PCPS acquisition block
|
||||
* to an AcquisitionInterface for GPS L2 M signals
|
||||
* \authors <ul>
|
||||
* <li> Javier Arribas, 2015. jarribas(at)cttc.es
|
||||
* <li> Javier Arribas, 2019. jarribas(at)cttc.es
|
||||
* </ul>
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@@ -36,19 +36,20 @@
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <string> // for string
|
||||
|
||||
class Gnss_Synchro;
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
||||
* for GPS L2 M signals
|
||||
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||
* to an AcquisitionInterface for GPS L2 M signals
|
||||
*/
|
||||
class GpsL2MPcpsAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
@@ -66,16 +67,16 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns "GPS_L2_M_PCPS_Acquisition"
|
||||
* \brief Returns "GPS_L2_M_PCPS_Acquisition_Fpga"
|
||||
*/
|
||||
inline std::string implementation() override
|
||||
{
|
||||
return "GPS_L2_M_PCPS_Acquisition";
|
||||
return "GPS_L2_M_PCPS_Acquisition_Fpga";
|
||||
}
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return sizeof(int);
|
||||
return sizeof(lv_16sc_t);
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
@@ -86,7 +87,7 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
@@ -144,7 +145,6 @@ public:
|
||||
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
//pcps_acquisition_sptr acquisition_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file gps_l5i pcps_acquisition_fpga.cc
|
||||
* \file gps_l5i_pcps_acquisition_fpga.cc
|
||||
* \brief Adapts a PCPS acquisition block to an Acquisition Interface for
|
||||
* GPS L5i signals for the FPGA
|
||||
* \authors <ul>
|
||||
@@ -36,9 +36,16 @@
|
||||
#include "GPS_L5.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/fft/fft.h> // for fft_complex
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <volk/volk.h> // for volk_32fc_conjugate_32fc
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath> // for abs, pow, floor
|
||||
#include <complex> // for complex
|
||||
#include <cstring> // for memcpy
|
||||
|
||||
#define NUM_PRNs 32
|
||||
|
||||
@@ -133,7 +140,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
}
|
||||
}
|
||||
|
||||
//acq_parameters
|
||||
acq_parameters.all_fft_codes = d_all_fft_codes_;
|
||||
|
||||
// reference for the FPGA FFT-IFFT attenuation factor
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file GPS_L5i_PCPS_Acquisition_fpga.h
|
||||
* \file gps_l5i_pcps_acquisition_fpga.h
|
||||
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
|
||||
* GPS L5i signals for the FPGA
|
||||
* \authors <ul>
|
||||
@@ -32,24 +32,25 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_
|
||||
#define GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_
|
||||
#ifndef GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
||||
#define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstddef> // for size_t
|
||||
#include <string>
|
||||
|
||||
|
||||
class Gnss_Synchro;
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
||||
* for GPS L5i signals
|
||||
* \brief This class adapts a PCPS acquisition block off-loaded on an FPGA
|
||||
* to an AcquisitionInterface for GPS L5i signals
|
||||
*/
|
||||
class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface
|
||||
{
|
||||
@@ -76,7 +77,7 @@ public:
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return sizeof(int);
|
||||
return sizeof(lv_16sc_t);
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
@@ -87,7 +88,7 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
* tracking blocks
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
@@ -117,7 +118,7 @@ public:
|
||||
void init() override;
|
||||
|
||||
/*!
|
||||
* \brief Sets local code for GPS L2/M PCPS acquisition algorithm.
|
||||
* \brief Sets local code for GPS L5 PCPS acquisition algorithm.
|
||||
*/
|
||||
void set_local_code() override;
|
||||
|
||||
@@ -164,4 +165,4 @@ private:
|
||||
float calculate_threshold(float pfa);
|
||||
};
|
||||
|
||||
#endif /* GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_ */
|
||||
#endif /* GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_ */
|
||||
|
||||
@@ -36,13 +36,22 @@
|
||||
#include "pcps_acquisition.h"
|
||||
#include "GLONASS_L1_L2_CA.h" // for GLONASS_TWO_PI
|
||||
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
||||
#include "gnss_frequencies.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h> // for from_long
|
||||
#include <pmt/pmt_sugar.h> // for mp
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cstring>
|
||||
#include <algorithm> // for fill_n, min
|
||||
#include <cmath> // for floor, fmod, rint, ceil
|
||||
#include <cstring> // for memcpy
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
|
||||
pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_)
|
||||
|
||||
@@ -53,14 +53,17 @@
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <volk/volk.h>
|
||||
#include <gnuradio/gr_complex.h> // for gr_complex
|
||||
#include <gnuradio/thread/thread.h> // for scoped_lock
|
||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
class Gnss_Synchro;
|
||||
class pcps_acquisition;
|
||||
|
||||
using pcps_acquisition_sptr = boost::shared_ptr<pcps_acquisition>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file pcps_acquisition_fine_doppler_acquisition_cc.cc
|
||||
* \file pcps_acquisition_fine_doppler_cc.cc
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation
|
||||
* \authors <ul>
|
||||
* <li> Javier Arribas, 2013. jarribas(at)cttc.es
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file pcps_acquisition_fine_doppler_acquisition_cc.h
|
||||
* \file pcps_acquisition_fine_doppler_cc.h
|
||||
* \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation
|
||||
* for GPS L1 C/A signal
|
||||
*
|
||||
|
||||
@@ -33,9 +33,15 @@
|
||||
|
||||
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <utility>
|
||||
#include <pmt/pmt.h> // for from_long
|
||||
#include <pmt/pmt_sugar.h> // for mp
|
||||
#include <cmath> // for ceil
|
||||
#include <iostream> // for operator<<
|
||||
#include <utility> // for move
|
||||
|
||||
|
||||
#define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition
|
||||
|
||||
@@ -133,7 +139,7 @@ void pcps_acquisition_fpga::set_state(int32_t state)
|
||||
void pcps_acquisition_fpga::send_positive_acquisition()
|
||||
{
|
||||
// Declare positive acquisition using a message port
|
||||
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
// 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
|
||||
DLOG(INFO) << "positive acquisition"
|
||||
<< ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||
<< ", sample_stamp " << d_sample_counter
|
||||
|
||||
@@ -42,8 +42,15 @@
|
||||
|
||||
|
||||
#include "fpga_acquisition.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/block.h> // for block
|
||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstdint> // for uint32_t
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for string
|
||||
|
||||
class Gnss_Synchro;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -78,9 +85,7 @@ pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
class pcps_acquisition_fpga : public gr::block
|
||||
{
|
||||
private:
|
||||
friend pcps_acquisition_fpga_sptr
|
||||
|
||||
pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
friend pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
|
||||
pcps_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
|
||||
@@ -115,10 +120,10 @@ public:
|
||||
~pcps_acquisition_fpga();
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to exchange synchronization data between acquisition and tracking blocks.
|
||||
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
||||
*/
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to exchange synchronization data between acquisition and tracking blocks.
|
||||
* \param p_gnss_synchro Satellite information shared by the processing blocks.
|
||||
*/
|
||||
inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
d_gnss_synchro = p_gnss_synchro;
|
||||
@@ -133,53 +138,53 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
* \brief Initializes acquisition algorithm.
|
||||
*/
|
||||
void init();
|
||||
|
||||
/*!
|
||||
* \brief Sets local code for PCPS acquisition algorithm.
|
||||
* \param code - Pointer to the PRN code.
|
||||
*/
|
||||
* \brief Sets local code for PCPS acquisition algorithm.
|
||||
* \param code - Pointer to the PRN code.
|
||||
*/
|
||||
void set_local_code();
|
||||
|
||||
/*!
|
||||
* \brief If set to 1, ensures that acquisition starts at the
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
* \brief If set to 1, ensures that acquisition starts at the
|
||||
* first available sample.
|
||||
* \param state - int=1 forces start of acquisition
|
||||
*/
|
||||
void set_state(int32_t state);
|
||||
|
||||
/*!
|
||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||
* active mode
|
||||
* \param active - bool that activates/deactivates the block.
|
||||
*/
|
||||
* \brief Starts acquisition algorithm, turning from standby mode to
|
||||
* active mode
|
||||
* \param active - bool that activates/deactivates the block.
|
||||
*/
|
||||
void set_active(bool active);
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
* \brief Set acquisition channel unique ID
|
||||
* \param channel - receiver channel.
|
||||
*/
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
* Algorithm 1, for a definition of this threshold).
|
||||
*/
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
* Algorithm 1, for a definition of this threshold).
|
||||
*/
|
||||
inline void set_threshold(float threshold)
|
||||
{
|
||||
d_threshold = threshold;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
* \brief Set maximum Doppler grid search
|
||||
* \param doppler_max - Maximum Doppler shift considered in the grid search [Hz].
|
||||
*/
|
||||
inline void set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
acq_parameters.doppler_max = doppler_max;
|
||||
@@ -187,22 +192,15 @@ public:
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
* \brief Set Doppler steps for the grid search
|
||||
* \param doppler_step - Frequency bin of the search grid [Hz].
|
||||
*/
|
||||
inline void set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
d_doppler_step = doppler_step;
|
||||
acquisition_fpga->set_doppler_step(doppler_step);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||
*/
|
||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||
gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items);
|
||||
|
||||
/*!
|
||||
* \brief This funciton triggers a HW reset of the FPGA PL.
|
||||
*/
|
||||
@@ -212,6 +210,13 @@ public:
|
||||
* \brief This funciton is only used for the unit tests
|
||||
*/
|
||||
void read_fpga_total_scale_factor(uint32_t* total_scale_factor, uint32_t* fw_scale_factor);
|
||||
|
||||
/*!
|
||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
||||
*/
|
||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
||||
gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items);
|
||||
};
|
||||
|
||||
#endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/
|
||||
|
||||
@@ -37,7 +37,6 @@ add_library(acquisition_libs
|
||||
target_link_libraries(acquisition_libs
|
||||
PUBLIC
|
||||
Volk::volk
|
||||
Gnuradio::fft
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* \file acq_conf.cc
|
||||
* \file acq_conf.h
|
||||
* \brief Class that contains all the configuration parameters for generic
|
||||
* acquisition block based on the PCPS algoritm.
|
||||
* \author Carles Fernandez, 2018. cfernandez(at)cttc.es
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*!
|
||||
* \file fpga_acquisition.cc
|
||||
* \brief High optimized FPGA vector correlator class
|
||||
* \brief Highly optimized FPGA vector correlator class
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.cat
|
||||
* </ul>
|
||||
*
|
||||
* Class that controls and executes a high optimized acquisition HW
|
||||
* Class that controls and executes a highly optimized acquisition HW
|
||||
* accelerator in the FPGA
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@@ -34,13 +34,14 @@
|
||||
*/
|
||||
|
||||
#include "fpga_acquisition.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
#include <fcntl.h> // libraries used by the GIPO
|
||||
#include <iostream>
|
||||
#include <sys/mman.h> // libraries used by the GIPO
|
||||
#include <utility>
|
||||
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
||||
#include <glog/logging.h> // for LOG
|
||||
#include <cmath> // for log2
|
||||
#include <fcntl.h> // libraries used by the GIPO
|
||||
#include <iostream> // for operator<<
|
||||
#include <sys/mman.h> // libraries used by the GIPO
|
||||
#include <unistd.h> // for write, close, read, ssize_t
|
||||
#include <utility> // for move
|
||||
|
||||
|
||||
// FPGA register parameters
|
||||
@@ -75,26 +76,6 @@
|
||||
})
|
||||
#endif
|
||||
|
||||
bool Fpga_Acquisition::init()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Fpga_Acquisition::set_local_code(uint32_t PRN)
|
||||
{
|
||||
// select the code with the chosen PRN
|
||||
d_PRN = PRN;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Fpga_Acquisition::write_local_code()
|
||||
{
|
||||
Fpga_Acquisition::fpga_configure_acquisition_local_code(
|
||||
&d_all_fft_codes[d_nsamples_total * (d_PRN - 1)]);
|
||||
}
|
||||
|
||||
|
||||
Fpga_Acquisition::Fpga_Acquisition(std::string device_name,
|
||||
uint32_t nsamples,
|
||||
@@ -132,6 +113,30 @@ Fpga_Acquisition::Fpga_Acquisition(std::string device_name,
|
||||
}
|
||||
|
||||
|
||||
Fpga_Acquisition::~Fpga_Acquisition() = default;
|
||||
|
||||
|
||||
bool Fpga_Acquisition::init()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Fpga_Acquisition::set_local_code(uint32_t PRN)
|
||||
{
|
||||
// select the code with the chosen PRN
|
||||
d_PRN = PRN;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Fpga_Acquisition::write_local_code()
|
||||
{
|
||||
Fpga_Acquisition::fpga_configure_acquisition_local_code(
|
||||
&d_all_fft_codes[d_nsamples_total * (d_PRN - 1)]);
|
||||
}
|
||||
|
||||
|
||||
void Fpga_Acquisition::open_device()
|
||||
{
|
||||
// open communication with HW accelerator
|
||||
@@ -151,9 +156,6 @@ void Fpga_Acquisition::open_device()
|
||||
}
|
||||
|
||||
|
||||
Fpga_Acquisition::~Fpga_Acquisition() = default;
|
||||
|
||||
|
||||
bool Fpga_Acquisition::free()
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*!
|
||||
* \file fpga_acquisition.h
|
||||
* \brief High optimized FPGA vector correlator class
|
||||
* \brief Highly optimized FPGA vector correlator class
|
||||
* \authors <ul>
|
||||
* <li> Marc Majoral, 2019. mmajoral(at)cttc.cat
|
||||
* </ul>
|
||||
*
|
||||
* Class that controls and executes a high optimized acquisition HW
|
||||
* Class that controls and executes a highly optimized acquisition HW
|
||||
* accelerator in the FPGA
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
@@ -36,9 +36,9 @@
|
||||
#ifndef GNSS_SDR_FPGA_ACQUISITION_H_
|
||||
#define GNSS_SDR_FPGA_ACQUISITION_H_
|
||||
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
/*!
|
||||
* \brief Class that implements carrier wipe-off and correlators.
|
||||
|
||||
Reference in New Issue
Block a user