mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
446d3baf32
@ -98,6 +98,7 @@ target_link_libraries(acquisition_adapters
|
||||
algorithms_libs
|
||||
gnss_sdr_flags
|
||||
acquisition_gr_blocks
|
||||
channel_libs
|
||||
core_system_parameters
|
||||
Gnuradio::blocks
|
||||
Volk::volk
|
||||
|
@ -124,6 +124,7 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -145,12 +146,6 @@ void BeidouB1iPcpsAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
void BeidouB1iPcpsAcquisition::set_channel(uint32_t channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB1iPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifndef GNSS_SDR_BEIDOU_B1I_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_BEIDOU_B1I_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -93,7 +93,21 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(uint32_t channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -159,6 +173,7 @@ private:
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
uint32_t channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
|
@ -121,6 +121,7 @@ BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -142,13 +143,6 @@ void BeidouB3iPcpsAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void BeidouB3iPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define GNSS_SDR_BEIDOU_B3I_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -92,7 +92,21 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -158,6 +172,7 @@ private:
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -110,6 +110,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -132,16 +133,6 @@ void GalileoE1Pcps8msAmbiguousAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1Pcps8msAmbiguousAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -87,7 +87,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -143,6 +156,7 @@ private:
|
||||
unsigned int vector_length_;
|
||||
unsigned int code_length_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -154,6 +154,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -175,14 +176,6 @@ void GalileoE1PcpsAmbiguousAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -91,8 +91,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -159,6 +171,7 @@ private:
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
bool acquire_pilot_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -64,6 +64,9 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
|
||||
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||
|
||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0);
|
||||
acq_parameters.downsampling_factor = downsampling_factor;
|
||||
|
||||
@ -163,12 +166,11 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
channel_fsm_ = nullptr;
|
||||
// temporary buffers that we can delete
|
||||
delete[] code;
|
||||
delete fft_if;
|
||||
@ -189,13 +191,6 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisitionFpga::set_threshold(float threshold)
|
||||
{
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold;
|
||||
@ -281,5 +276,5 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_left_block()
|
||||
|
||||
gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_right_block()
|
||||
{
|
||||
return acquisition_fpga_;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -32,11 +32,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.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
|
||||
@ -93,7 +90,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -145,11 +155,9 @@ public:
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
bool acquire_pilot_;
|
||||
uint32_t channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
std::string dump_filename_;
|
||||
|
@ -111,6 +111,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -134,31 +135,8 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
// float pfa = configuration_->property(role_+ std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
||||
// if(pfa==0.0) pfa = configuration_->property(role_+".pfa", 0.0);
|
||||
|
||||
// if(pfa==0.0)
|
||||
// {
|
||||
// threshold_ = threshold;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// threshold_ = calculate_threshold(pfa);
|
||||
// }
|
||||
|
||||
threshold_ = threshold;
|
||||
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_cccwsr_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
@ -87,8 +87,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of CCCWSR algorithm
|
||||
*/
|
||||
@ -143,6 +155,7 @@ private:
|
||||
unsigned int code_length_;
|
||||
//unsigned int satellite_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -144,6 +144,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -166,16 +167,6 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
@ -88,8 +88,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -147,6 +159,7 @@ private:
|
||||
unsigned int code_length_;
|
||||
bool bit_transition_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -114,6 +114,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -136,16 +137,6 @@ void GalileoE1PcpsTongAmbiguousAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsTongAmbiguousAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
@ -87,8 +87,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of TONG algorithm
|
||||
*/
|
||||
@ -145,6 +157,7 @@ private:
|
||||
unsigned int vector_length_;
|
||||
unsigned int code_length_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -119,6 +119,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -142,16 +143,6 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -38,7 +38,7 @@
|
||||
#ifndef GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_
|
||||
#define GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf_cc.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <string>
|
||||
@ -88,8 +88,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -148,6 +160,7 @@ private:
|
||||
unsigned int code_length_;
|
||||
bool bit_transition_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -152,6 +152,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -174,13 +175,6 @@ void GalileoE5aPcpsAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define GALILEO_E5A_PCPS_ACQUISITION_H_
|
||||
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include <string>
|
||||
@ -79,8 +79,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -157,6 +169,7 @@ private:
|
||||
unsigned int vector_length_;
|
||||
unsigned int code_length_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
unsigned int sampled_ms_;
|
||||
|
@ -61,6 +61,9 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
|
||||
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
|
||||
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||
|
||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
||||
acq_parameters.downsampling_factor = downsampling_factor;
|
||||
fs_in = fs_in / downsampling_factor;
|
||||
@ -164,12 +167,11 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
channel_fsm_ = nullptr;
|
||||
// temporary buffers that we can delete
|
||||
delete[] code;
|
||||
delete fft_if;
|
||||
@ -190,13 +192,6 @@ void GalileoE5aPcpsAcquisitionFpga::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GalileoE5aPcpsAcquisitionFpga::set_threshold(float threshold)
|
||||
{
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold;
|
||||
@ -281,5 +276,5 @@ gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_left_block()
|
||||
|
||||
gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_right_block()
|
||||
{
|
||||
return acquisition_fpga_;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -33,9 +33,8 @@
|
||||
#define GNSS_SDR_GALILEO_E5A_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.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
|
||||
@ -93,7 +92,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -155,7 +167,6 @@ public:
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
@ -165,6 +176,7 @@ private:
|
||||
bool acq_iq_;
|
||||
|
||||
uint32_t channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
unsigned int in_streams_;
|
||||
|
@ -125,6 +125,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -146,14 +147,6 @@ void GlonassL1CaPcpsAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GlonassL1CaPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GlonassL1CaPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L1_CA_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GLONASS_L1_CA_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -86,12 +86,23 @@ public:
|
||||
* tracking blocks
|
||||
*/
|
||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -151,6 +162,7 @@ private:
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -124,6 +124,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -146,13 +147,6 @@ void GlonassL2CaPcpsAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GlonassL2CaPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GlonassL2CaPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
|
@ -33,7 +33,7 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L2_CA_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GLONASS_L2_CA_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -89,8 +89,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -150,6 +162,7 @@ private:
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -147,6 +147,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -168,14 +169,6 @@ void GpsL1CaPcpsAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
|
@ -37,7 +37,7 @@
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -95,8 +95,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -162,6 +174,7 @@ private:
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -97,6 +97,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -119,13 +120,6 @@ void GpsL1CaPcpsAcquisitionFineDoppler::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::set_threshold(float threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include <string>
|
||||
@ -88,8 +88,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -140,6 +152,7 @@ private:
|
||||
std::string item_type_;
|
||||
unsigned int vector_length_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -68,6 +68,9 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
|
||||
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||
|
||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0);
|
||||
acq_parameters.downsampling_factor = downsampling_factor;
|
||||
|
||||
@ -146,12 +149,11 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
channel_fsm_ = nullptr;
|
||||
// temporary buffers that we can delete
|
||||
delete[] code;
|
||||
delete fft_if;
|
||||
@ -172,13 +174,6 @@ void GpsL1CaPcpsAcquisitionFpga::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFpga::set_threshold(float threshold)
|
||||
{
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold;
|
||||
@ -264,5 +259,5 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_left_block()
|
||||
|
||||
gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block()
|
||||
{
|
||||
return acquisition_fpga_;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||
@ -93,7 +93,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -146,6 +159,7 @@ private:
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
uint32_t channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
|
@ -89,6 +89,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -111,13 +112,6 @@ void GpsL1CaPcpsAssistedAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAssistedAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAssistedAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include <string>
|
||||
@ -88,8 +88,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -137,6 +149,7 @@ private:
|
||||
unsigned int vector_length_;
|
||||
//unsigned int satellite_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -105,6 +105,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -126,17 +127,6 @@ void GpsL1CaPcpsOpenClAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsOpenClAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_opencl_acquisition_cc.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
@ -87,8 +87,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -142,6 +154,7 @@ private:
|
||||
unsigned int code_length_;
|
||||
bool bit_transition_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -137,6 +137,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -158,17 +159,6 @@ void GpsL1CaPcpsQuickSyncAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsQuickSyncAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -33,7 +33,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
@ -89,8 +89,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -148,6 +160,7 @@ private:
|
||||
unsigned int code_length_;
|
||||
bool bit_transition_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -99,6 +99,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -120,17 +121,6 @@ void GpsL1CaPcpsTongAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsTongAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
@ -88,8 +88,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of TONG algorithm
|
||||
*/
|
||||
@ -146,6 +158,7 @@ private:
|
||||
unsigned int vector_length_;
|
||||
unsigned int code_length_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -151,6 +151,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
num_codes_ = acq_parameters_.sampled_ms / acq_parameters_.ms_per_code;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
@ -174,13 +175,6 @@ void GpsL2MPcpsAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -92,8 +92,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -159,6 +171,7 @@ private:
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -70,6 +70,9 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
|
||||
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
@ -139,13 +142,11 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
delete[] fft_codes_padded;
|
||||
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
||||
channel_fsm_ = nullptr;
|
||||
|
||||
threshold_ = 0.0;
|
||||
}
|
||||
@ -162,13 +163,6 @@ void GpsL2MPcpsAcquisitionFpga::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisitionFpga::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MPcpsAcquisitionFpga::set_threshold(float threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
@ -260,5 +254,5 @@ gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_left_block()
|
||||
|
||||
gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_right_block()
|
||||
{
|
||||
return acquisition_fpga_;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -34,11 +34,8 @@
|
||||
#ifndef GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H_
|
||||
#define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.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
|
||||
@ -94,7 +91,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -146,11 +156,9 @@ public:
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
std::string item_type_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -147,6 +147,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
channel_fsm_ = nullptr;
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
@ -169,13 +170,6 @@ void GpsL5iPcpsAcquisition::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
@ -34,7 +34,7 @@
|
||||
#ifndef GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acquisition_interface.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
@ -92,8 +92,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -158,6 +170,7 @@ private:
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
|
@ -67,6 +67,9 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
|
||||
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||
|
||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
||||
acq_parameters.downsampling_factor = downsampling_factor;
|
||||
|
||||
@ -146,12 +149,11 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
||||
|
||||
channel_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
channel_fsm_ = nullptr;
|
||||
// temporary buffers that we can delete
|
||||
delete[] code;
|
||||
delete fft_if;
|
||||
@ -173,13 +175,6 @@ void GpsL5iPcpsAcquisitionFpga::stop_acquisition()
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
|
||||
void GpsL5iPcpsAcquisitionFpga::set_threshold(float threshold)
|
||||
{
|
||||
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold;
|
||||
@ -265,5 +260,5 @@ gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_left_block()
|
||||
|
||||
gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_right_block()
|
||||
{
|
||||
return acquisition_fpga_;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -35,11 +35,8 @@
|
||||
#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 "channel_fsm.h"
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.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
|
||||
@ -95,8 +92,20 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
inline void set_channel(unsigned int channel) override
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_fpga_->set_channel(channel_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
@ -147,11 +156,9 @@ public:
|
||||
private:
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
std::string item_type_;
|
||||
uint32_t channel_;
|
||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
std::string dump_filename_;
|
||||
|
@ -71,6 +71,7 @@ target_link_libraries(acquisition_gr_blocks
|
||||
Gnuradio::runtime
|
||||
Gnuradio::fft
|
||||
Volk::volk
|
||||
channel_libs
|
||||
acquisition_libs
|
||||
core_system_parameters
|
||||
${OPT_LIBRARIES}
|
||||
|
@ -38,6 +38,7 @@
|
||||
#ifndef GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H_
|
||||
#define GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -99,6 +100,7 @@ private:
|
||||
int doppler_offset);
|
||||
float estimate_input_power(gr_complex* in);
|
||||
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
int64_t d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_sampled_ms;
|
||||
@ -211,6 +213,13 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -32,6 +32,7 @@
|
||||
#ifndef GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -117,6 +118,7 @@ private:
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
uint32_t d_channel;
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -180,6 +182,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -429,7 +429,15 @@ void pcps_acquisition::send_positive_acquisition()
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
d_positive_acq = 1;
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(1));
|
||||
if (d_channel_fsm)
|
||||
{
|
||||
//the channel FSM is set, so, notify it directly the positive acquisition to minimize delays
|
||||
d_channel_fsm->Event_valid_acquisition();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "channel_fsm.h"
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -123,6 +124,7 @@ private:
|
||||
int64_t d_old_freq;
|
||||
int32_t d_state;
|
||||
uint32_t d_channel;
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
uint32_t d_doppler_step;
|
||||
float d_doppler_center_step_two;
|
||||
uint32_t d_num_noncoherent_integrations_counter;
|
||||
@ -204,10 +206,18 @@ public:
|
||||
*/
|
||||
inline void set_channel(uint32_t channel)
|
||||
{
|
||||
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -50,6 +50,7 @@
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
@ -121,10 +122,11 @@ private:
|
||||
int d_n_samples_in_buffer;
|
||||
bool d_dump;
|
||||
unsigned int d_channel;
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
|
||||
std::string d_dump_filename;
|
||||
|
||||
arma ::fmat grid_;
|
||||
arma::fmat grid_;
|
||||
int64_t d_dump_number;
|
||||
unsigned int d_dump_channel;
|
||||
|
||||
@ -183,6 +185,14 @@ public:
|
||||
d_dump_channel = d_channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -35,12 +35,9 @@
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#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
|
||||
#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
|
||||
@ -52,12 +49,8 @@ pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||
}
|
||||
|
||||
|
||||
pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block("pcps_acquisition_fpga",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||
{
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
|
||||
acq_parameters = std::move(conf_);
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
@ -150,7 +143,8 @@ void pcps_acquisition_fpga::send_positive_acquisition()
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(1));
|
||||
//the channel FSM is set, so, notify it directly the positive acquisition to minimize delays
|
||||
d_channel_fsm->Event_valid_acquisition();
|
||||
}
|
||||
|
||||
|
||||
@ -167,7 +161,14 @@ void pcps_acquisition_fpga::send_negative_acquisition()
|
||||
<< ", magnitude " << d_mag
|
||||
<< ", input signal power " << d_input_power;
|
||||
|
||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(2));
|
||||
if (acq_parameters.repeat_satellite == true)
|
||||
{
|
||||
d_channel_fsm->Event_failed_acquisition_repeat();
|
||||
}
|
||||
else
|
||||
{
|
||||
d_channel_fsm->Event_failed_acquisition_no_repeat();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -258,16 +259,6 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
}
|
||||
|
||||
|
||||
int pcps_acquisition_fpga::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_int& ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star& input_items __attribute__((unused)),
|
||||
gr_vector_void_star& output_items __attribute__((unused)))
|
||||
{
|
||||
// the general work is not used with the acquisition that uses the FPGA
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
|
||||
void pcps_acquisition_fpga::reset_acquisition(void)
|
||||
{
|
||||
// this function triggers a HW reset of the FPGA PL.
|
||||
|
@ -41,10 +41,9 @@
|
||||
#define GNSS_SDR_PCPS_ACQUISITION_FPGA_H_
|
||||
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "fpga_acquisition.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
|
||||
@ -67,6 +66,7 @@ typedef struct
|
||||
float downsampling_factor;
|
||||
uint32_t total_block_exp;
|
||||
uint32_t excludelimit;
|
||||
bool repeat_satellite;
|
||||
} pcpsconf_fpga_t;
|
||||
|
||||
class pcps_acquisition_fpga;
|
||||
@ -82,7 +82,7 @@ pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
* Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver",
|
||||
* Algorithm 1, for a pseudocode description of this implementation.
|
||||
*/
|
||||
class pcps_acquisition_fpga : public gr::block
|
||||
class pcps_acquisition_fpga
|
||||
{
|
||||
private:
|
||||
friend pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||
@ -104,6 +104,7 @@ private:
|
||||
float d_test_statistics;
|
||||
int32_t d_state;
|
||||
uint32_t d_channel;
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
uint32_t d_doppler_step;
|
||||
uint32_t d_fft_size;
|
||||
uint32_t d_num_doppler_bins;
|
||||
@ -171,6 +172,15 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
@ -210,13 +220,6 @@ 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_*/
|
||||
|
@ -48,6 +48,7 @@
|
||||
#ifndef GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -137,7 +138,7 @@ private:
|
||||
int32_t d_well_count;
|
||||
bool d_dump;
|
||||
uint32_t d_channel;
|
||||
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -194,6 +195,15 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -37,6 +37,7 @@
|
||||
#ifndef GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -116,6 +117,7 @@ private:
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
uint32_t d_channel;
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -180,6 +182,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of CCCWSR algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -51,6 +51,7 @@
|
||||
#ifndef GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_OPENCL_ACQUISITION_CC_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "opencl/fft_internal.h"
|
||||
#include <gnuradio/block.h>
|
||||
@ -161,7 +162,7 @@ private:
|
||||
cl::CommandQueue* d_cl_queue;
|
||||
clFFT_Plan d_cl_fft_plan;
|
||||
cl_int d_cl_fft_batch_size;
|
||||
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
int d_opencl;
|
||||
|
||||
public:
|
||||
@ -225,6 +226,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -51,6 +51,7 @@
|
||||
#ifndef GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -150,6 +151,7 @@ private:
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
uint32_t d_channel;
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -213,6 +215,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -51,6 +51,7 @@
|
||||
#ifndef GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H_
|
||||
#define GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
@ -133,6 +134,7 @@ private:
|
||||
int32_t d_state;
|
||||
bool d_dump;
|
||||
uint32_t d_channel;
|
||||
std::shared_ptr<ChannelFsm> d_channel_fsm;
|
||||
std::string d_dump_filename;
|
||||
|
||||
public:
|
||||
@ -196,6 +198,14 @@ public:
|
||||
d_channel = channel;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Set channel fsm associated to this acquisition instance
|
||||
*/
|
||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
}
|
||||
/*!
|
||||
* \brief Set statistics threshold of TONG algorithm.
|
||||
* \param threshold - Threshold for signal detection (check \ref Navitec2012,
|
||||
|
@ -55,8 +55,9 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s
|
||||
queue_ = std::move(queue);
|
||||
channel_fsm_ = std::make_shared<ChannelFsm>();
|
||||
|
||||
flag_enable_fpga = configuration->property("Channel.enable_FPGA", false);
|
||||
flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false);
|
||||
acq_->set_channel(channel_);
|
||||
acq_->set_channel_fsm(channel_fsm_);
|
||||
trk_->set_channel(channel_);
|
||||
nav_->set_channel(channel_);
|
||||
|
||||
@ -124,7 +125,10 @@ Channel::~Channel() = default;
|
||||
|
||||
void Channel::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
acq_->connect(top_block);
|
||||
if (!flag_enable_fpga)
|
||||
{
|
||||
acq_->connect(top_block);
|
||||
}
|
||||
trk_->connect(top_block);
|
||||
nav_->connect(top_block);
|
||||
|
||||
@ -135,7 +139,10 @@ void Channel::connect(gr::top_block_sptr top_block)
|
||||
DLOG(INFO) << "tracking -> telemetry_decoder";
|
||||
|
||||
// Message ports
|
||||
top_block->msg_connect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||
if (!flag_enable_fpga)
|
||||
{
|
||||
top_block->msg_connect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||
}
|
||||
top_block->msg_connect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||
|
||||
connected_ = true;
|
||||
@ -151,12 +158,18 @@ void Channel::disconnect(gr::top_block_sptr top_block)
|
||||
}
|
||||
|
||||
top_block->disconnect(trk_->get_right_block(), 0, nav_->get_left_block(), 0);
|
||||
|
||||
acq_->disconnect(top_block);
|
||||
if (!flag_enable_fpga)
|
||||
{
|
||||
acq_->disconnect(top_block);
|
||||
}
|
||||
trk_->disconnect(top_block);
|
||||
nav_->disconnect(top_block);
|
||||
|
||||
top_block->msg_disconnect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk"));
|
||||
top_block->msg_disconnect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||
if (!flag_enable_fpga)
|
||||
{
|
||||
top_block->msg_disconnect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||
}
|
||||
top_block->msg_disconnect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||
connected_ = false;
|
||||
}
|
||||
@ -177,6 +190,10 @@ gr::basic_block_sptr Channel::get_left_block_trk()
|
||||
|
||||
gr::basic_block_sptr Channel::get_left_block_acq()
|
||||
{
|
||||
if (flag_enable_fpga)
|
||||
{
|
||||
LOG(ERROR) << "Enabled FPGA and called get_left_block() in channel interface";
|
||||
}
|
||||
return acq_->get_left_block();
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#ifndef GNSS_SDR_CHANNEL_H_
|
||||
#define GNSS_SDR_CHANNEL_H_
|
||||
|
||||
#include "channel_fsm.h"
|
||||
#include "channel_interface.h"
|
||||
#include "channel_msg_receiver_cc.h"
|
||||
#include "gnss_signal.h"
|
||||
@ -51,7 +51,7 @@ class ConfigurationInterface;
|
||||
class AcquisitionInterface;
|
||||
class TrackingInterface;
|
||||
class TelemetryDecoderInterface;
|
||||
class ChannelFsm;
|
||||
//class ChannelFsm;
|
||||
|
||||
/*!
|
||||
* \brief This class represents a GNSS channel. It wraps an AcquisitionInterface,
|
||||
|
@ -24,7 +24,7 @@ set(CHANNEL_FSM_SOURCES
|
||||
set(CHANNEL_FSM_HEADERS
|
||||
channel_fsm.h
|
||||
channel_msg_receiver_cc.h
|
||||
)
|
||||
)
|
||||
|
||||
list(SORT CHANNEL_FSM_HEADERS)
|
||||
list(SORT CHANNEL_FSM_SOURCES)
|
||||
|
@ -67,6 +67,8 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
||||
switch (message)
|
||||
{
|
||||
case 1: // positive acquisition
|
||||
// Now the acquisition block can optionally trigger the event valid acquisition internally,
|
||||
// in order to reduce acquisition to tracking delay.
|
||||
result = d_channel_fsm->Event_valid_acquisition();
|
||||
break;
|
||||
case 2: // negative acquisition
|
||||
|
@ -44,6 +44,8 @@
|
||||
template <typename Data>
|
||||
class Concurrent_Queue;
|
||||
|
||||
class ChannelFsm;
|
||||
|
||||
/*! \brief This abstract class represents an interface to an acquisition GNSS block.
|
||||
*
|
||||
* Abstract class for acquisition algorithms. Since all its methods are virtual,
|
||||
@ -55,7 +57,8 @@ class AcquisitionInterface : public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
virtual void set_gnss_synchro(Gnss_Synchro* gnss_synchro) = 0;
|
||||
virtual void set_channel(unsigned int channel) = 0;
|
||||
virtual void set_channel(unsigned int channel_id) = 0;
|
||||
virtual void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) = 0;
|
||||
virtual void set_threshold(float threshold) = 0;
|
||||
virtual void set_doppler_max(unsigned int doppler_max) = 0;
|
||||
virtual void set_doppler_step(unsigned int doppler_step) = 0;
|
||||
|
@ -140,6 +140,7 @@ target_link_libraries(core_receiver
|
||||
Boost::boost
|
||||
Boost::thread
|
||||
Gnuradio::runtime
|
||||
channel_libs
|
||||
core_libs
|
||||
core_monitor
|
||||
PRIVATE
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "channel.h"
|
||||
#include "channel_fsm.h"
|
||||
#include "channel_interface.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_block_factory.h"
|
||||
@ -214,7 +215,7 @@ void GNSSFlowgraph::connect()
|
||||
}
|
||||
|
||||
DLOG(INFO) << "blocks connected internally";
|
||||
// Signal Source (i) > Signal conditioner (i) >
|
||||
// Signal Source (i) > Signal conditioner (i) >
|
||||
#ifndef ENABLE_FPGA
|
||||
int RF_Channels = 0;
|
||||
int signal_conditioner_ID = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user