1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00
This commit is contained in:
Carles Fernandez 2019-02-12 01:37:07 +01:00
commit a29ecd3e02
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
56 changed files with 137 additions and 132 deletions

View File

@ -34,9 +34,9 @@
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(std::vector<std::string> addresses, const uint16_t& port) : socket{io_service} Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port) : socket{io_service}
{ {
for (auto address : addresses) for (const auto& address : addresses)
{ {
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port); boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port);
endpoints.push_back(endpoint); endpoints.push_back(endpoint);
@ -50,7 +50,7 @@ bool Monitor_Pvt_Udp_Sink::write_monitor_pvt(Monitor_Pvt monitor_pvt)
oa << monitor_pvt; oa << monitor_pvt;
std::string outbound_data = archive_stream.str(); std::string outbound_data = archive_stream.str();
for (auto endpoint : endpoints) for (const auto& endpoint : endpoints)
{ {
socket.open(endpoint.protocol(), error); socket.open(endpoint.protocol(), error);
socket.connect(endpoint, error); socket.connect(endpoint, error);

View File

@ -38,7 +38,7 @@
class Monitor_Pvt_Udp_Sink class Monitor_Pvt_Udp_Sink
{ {
public: public:
Monitor_Pvt_Udp_Sink(std::vector<std::string> addresses, const uint16_t &port); Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port);
bool write_monitor_pvt(Monitor_Pvt monitor_pvt); bool write_monitor_pvt(Monitor_Pvt monitor_pvt);
private: private:

View File

@ -269,7 +269,7 @@ bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& pvt_dat
} }
char Nmea_Printer::checkSum(std::string sentence) char Nmea_Printer::checkSum(const std::string& sentence)
{ {
char check = 0; char check = 0;
// iterate over the string, XOR each byte with the total sum: // iterate over the string, XOR each byte with the total sum:

View File

@ -82,7 +82,7 @@ private:
std::string get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time); std::string get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time);
std::string longitude_to_hm(double longitude); std::string longitude_to_hm(double longitude);
std::string latitude_to_hm(double lat); std::string latitude_to_hm(double lat);
char checkSum(std::string sentence); char checkSum(const std::string& sentence);
bool print_avg_pos; bool print_avg_pos;
bool d_flag_nmea_output_file; bool d_flag_nmea_output_file;
}; };

View File

@ -39,15 +39,16 @@
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition( BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams) : role_(role), unsigned int out_streams) : role_(std::move(role)),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams) out_streams_(out_streams)
{ {

View File

@ -55,7 +55,7 @@ class BeidouB1iPcpsAcquisition : public AcquisitionInterface
{ {
public: public:
BeidouB1iPcpsAcquisition(ConfigurationInterface* configuration, BeidouB1iPcpsAcquisition(ConfigurationInterface* configuration,
const std::string& role, unsigned int in_streams, std::string role, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);
virtual ~BeidouB1iPcpsAcquisition(); virtual ~BeidouB1iPcpsAcquisition();

View File

@ -37,6 +37,7 @@
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -44,9 +45,9 @@ using google::LogMessage;
GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams) : role_(role), unsigned int out_streams) : role_(std::move(role)),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams) out_streams_(out_streams)
{ {

View File

@ -52,7 +52,7 @@ class GalileoE1PcpsAmbiguousAcquisition : public AcquisitionInterface
{ {
public: public:
GalileoE1PcpsAmbiguousAcquisition(ConfigurationInterface* configuration, GalileoE1PcpsAmbiguousAcquisition(ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);

View File

@ -41,6 +41,7 @@
#include "gps_sdr_signal_processing.h" #include "gps_sdr_signal_processing.h"
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -48,9 +49,9 @@ using google::LogMessage;
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams) : role_(role), unsigned int out_streams) : role_(std::move(role)),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams) out_streams_(out_streams)
{ {

View File

@ -56,7 +56,7 @@ class GpsL1CaPcpsAcquisition : public AcquisitionInterface
{ {
public: public:
GpsL1CaPcpsAcquisition(ConfigurationInterface* configuration, GpsL1CaPcpsAcquisition(ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);

View File

@ -39,6 +39,7 @@
#include "gps_l2c_signal.h" #include "gps_l2c_signal.h"
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -46,9 +47,9 @@ using google::LogMessage;
GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams) : role_(role), unsigned int out_streams) : role_(std::move(role)),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams) out_streams_(out_streams)
{ {

View File

@ -53,7 +53,7 @@ class GpsL2MPcpsAcquisition : public AcquisitionInterface
{ {
public: public:
GpsL2MPcpsAcquisition(ConfigurationInterface* configuration, GpsL2MPcpsAcquisition(ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);

View File

@ -39,6 +39,7 @@
#include "gps_l5_signal.h" #include "gps_l5_signal.h"
#include <boost/math/distributions/exponential.hpp> #include <boost/math/distributions/exponential.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -46,9 +47,9 @@ using google::LogMessage;
GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
ConfigurationInterface* configuration, ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams) : role_(role), unsigned int out_streams) : role_(std::move(role)),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams) out_streams_(out_streams)
{ {

View File

@ -53,7 +53,7 @@ class GpsL5iPcpsAcquisition : public AcquisitionInterface
{ {
public: public:
GpsL5iPcpsAcquisition(ConfigurationInterface* configuration, GpsL5iPcpsAcquisition(ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);

View File

@ -53,7 +53,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
bool both_signal_components_, bool both_signal_components_,
int CAF_window_hz_, int CAF_window_hz_,
int Zero_padding_) int Zero_padding_)
@ -73,7 +73,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
int samples_per_code, int samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
bool both_signal_components_, bool both_signal_components_,
int CAF_window_hz_, int CAF_window_hz_,
int Zero_padding_) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc", int Zero_padding_) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc",

View File

@ -56,7 +56,7 @@ galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(unsigned int sampled_ms,
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
bool both_signal_components_, bool both_signal_components_,
int CAF_window_hz_, int CAF_window_hz_,
int Zero_padding_); int Zero_padding_);
@ -78,7 +78,7 @@ private:
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
bool both_signal_components_, bool both_signal_components_,
int CAF_window_hz_, int CAF_window_hz_,
int Zero_padding_); int Zero_padding_);
@ -90,7 +90,7 @@ private:
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
bool both_signal_components_, bool both_signal_components_,
int CAF_window_hz_, int CAF_window_hz_,
int Zero_padding_); int Zero_padding_);

View File

@ -47,7 +47,7 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
int64_t fs_in, int64_t fs_in,
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, std::string dump_filename) bool dump, const std::string &dump_filename)
{ {
return galileo_pcps_8ms_acquisition_cc_sptr( return galileo_pcps_8ms_acquisition_cc_sptr(
new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
@ -63,7 +63,7 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, bool dump,
std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc", const std::string &dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms))
{ {

View File

@ -51,7 +51,7 @@ galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms,
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
/*! /*!
* \brief This class implements a Parallel Code Phase Search Acquisition for * \brief This class implements a Parallel Code Phase Search Acquisition for
@ -69,7 +69,7 @@ private:
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
galileo_pcps_8ms_acquisition_cc( galileo_pcps_8ms_acquisition_cc(
uint32_t sampled_ms, uint32_t sampled_ms,
@ -79,7 +79,7 @@ private:
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
void calculate_magnitudes( void calculate_magnitudes(
gr_complex* fft_begin, gr_complex* fft_begin,

View File

@ -49,7 +49,7 @@ using google::LogMessage;
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
int64_t fs_in, int32_t samples_per_ms, bool dump, int64_t fs_in, int32_t samples_per_ms, bool dump,
std::string dump_filename) const std::string &dump_filename)
{ {
return pcps_assisted_acquisition_cc_sptr( return pcps_assisted_acquisition_cc_sptr(
new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min, new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min,
@ -60,7 +60,7 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min,
int64_t fs_in, int32_t samples_per_ms, bool dump, int64_t fs_in, int32_t samples_per_ms, bool dump,
std::string dump_filename) : gr::block("pcps_assisted_acquisition_cc", const std::string &dump_filename) : gr::block("pcps_assisted_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex)), gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(0, 0, sizeof(gr_complex))) gr::io_signature::make(0, 0, sizeof(gr_complex)))
{ {

View File

@ -67,7 +67,7 @@ pcps_make_assisted_acquisition_cc(
int32_t doppler_min, int32_t doppler_min,
int64_t fs_in, int64_t fs_in,
int32_t samples_per_ms, int32_t samples_per_ms,
bool dump, std::string dump_filename); bool dump, const std::string& dump_filename);
/*! /*!
* \brief This class implements a Parallel Code Phase Search Acquisition. * \brief This class implements a Parallel Code Phase Search Acquisition.
@ -82,12 +82,12 @@ private:
pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
int32_t doppler_max, int32_t doppler_min, int64_t fs_in, int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
int32_t samples_per_ms, bool dump, int32_t samples_per_ms, bool dump,
std::string dump_filename); const std::string& dump_filename);
pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms,
int32_t doppler_max, int32_t doppler_min, int64_t fs_in, int32_t doppler_max, int32_t doppler_min, int64_t fs_in,
int32_t samples_per_ms, bool dump, int32_t samples_per_ms, bool dump,
std::string dump_filename); const std::string& dump_filename);
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
int32_t doppler_offset); int32_t doppler_offset);

View File

@ -53,7 +53,7 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
int64_t fs_in, int64_t fs_in,
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, std::string dump_filename) bool dump, const std::string &dump_filename)
{ {
return pcps_cccwsr_acquisition_cc_sptr( return pcps_cccwsr_acquisition_cc_sptr(
new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in,
@ -69,7 +69,7 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, bool dump,
std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc", const std::string &dump_filename) : gr::block("pcps_cccwsr_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms))
{ {

View File

@ -58,7 +58,7 @@ pcps_cccwsr_make_acquisition_cc(
int32_t samples_per_ms, int32_t samples_per_ms,
int32_t samples_per_code, int32_t samples_per_code,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
/*! /*!
* \brief This class implements a Parallel Code Phase Search Acquisition with * \brief This class implements a Parallel Code Phase Search Acquisition with
@ -71,12 +71,12 @@ private:
pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
uint32_t doppler_max, int64_t fs_in, uint32_t doppler_max, int64_t fs_in,
int32_t samples_per_ms, int32_t samples_per_code, int32_t samples_per_ms, int32_t samples_per_code,
bool dump, std::string dump_filename); bool dump, const std::string& dump_filename);
pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells,
uint32_t doppler_max, int64_t fs_in, uint32_t doppler_max, int64_t fs_in,
int32_t samples_per_ms, int32_t samples_per_code, int32_t samples_per_ms, int32_t samples_per_code,
bool dump, std::string dump_filename); bool dump, const std::string& dump_filename);
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
int32_t doppler_offset); int32_t doppler_offset);

View File

@ -52,7 +52,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
int32_t samples_per_code, int32_t samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename) const std::string& dump_filename)
{ {
return pcps_quicksync_acquisition_cc_sptr( return pcps_quicksync_acquisition_cc_sptr(
new pcps_quicksync_acquisition_cc( new pcps_quicksync_acquisition_cc(
@ -72,7 +72,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
int32_t samples_per_ms, int32_t samples_per_code, int32_t samples_per_ms, int32_t samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename) : gr::block("pcps_quicksync_acquisition_cc", const std::string& dump_filename) : gr::block("pcps_quicksync_acquisition_cc",
gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)), gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)),
gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms))) gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms)))
{ {

View File

@ -76,7 +76,7 @@ pcps_quicksync_make_acquisition_cc(
int32_t samples_per_code, int32_t samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
/*! /*!
* \brief This class implements a Parallel Code Phase Search Acquisition with * \brief This class implements a Parallel Code Phase Search Acquisition with
@ -95,7 +95,7 @@ private:
int32_t samples_per_ms, int32_t samples_per_code, int32_t samples_per_ms, int32_t samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
pcps_quicksync_acquisition_cc(uint32_t folding_factor, pcps_quicksync_acquisition_cc(uint32_t folding_factor,
uint32_t sampled_ms, uint32_t max_dwells, uint32_t sampled_ms, uint32_t max_dwells,
@ -103,7 +103,7 @@ private:
int32_t samples_per_ms, int32_t samples_per_code, int32_t samples_per_ms, int32_t samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
int32_t doppler_offset); int32_t doppler_offset);

View File

@ -69,7 +69,7 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
uint32_t tong_init_val, uint32_t tong_init_val,
uint32_t tong_max_val, uint32_t tong_max_val,
uint32_t tong_max_dwells, uint32_t tong_max_dwells,
bool dump, std::string dump_filename) bool dump, const std::string &dump_filename)
{ {
return pcps_tong_acquisition_cc_sptr( return pcps_tong_acquisition_cc_sptr(
new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code, new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code,
@ -87,7 +87,7 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
uint32_t tong_max_val, uint32_t tong_max_val,
uint32_t tong_max_dwells, uint32_t tong_max_dwells,
bool dump, bool dump,
std::string dump_filename) : gr::block("pcps_tong_acquisition_cc", const std::string &dump_filename) : gr::block("pcps_tong_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms))
{ {

View File

@ -74,7 +74,7 @@ pcps_tong_make_acquisition_cc(
uint32_t tong_max_val, uint32_t tong_max_val,
uint32_t tong_max_dwells, uint32_t tong_max_dwells,
bool dump, bool dump,
std::string dump_filename); const std::string& dump_filename);
/*! /*!
* \brief This class implements a Parallel Code Phase Search Acquisition with * \brief This class implements a Parallel Code Phase Search Acquisition with
@ -88,13 +88,13 @@ private:
int64_t fs_in, int32_t samples_per_ms, int64_t fs_in, int32_t samples_per_ms,
int32_t samples_per_code, uint32_t tong_init_val, int32_t samples_per_code, uint32_t tong_init_val,
uint32_t tong_max_val, uint32_t tong_max_dwells, uint32_t tong_max_val, uint32_t tong_max_dwells,
bool dump, std::string dump_filename); bool dump, const std::string& dump_filename);
pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max, pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max,
int64_t fs_in, int32_t samples_per_ms, int64_t fs_in, int32_t samples_per_ms,
int32_t samples_per_code, uint32_t tong_init_val, int32_t samples_per_code, uint32_t tong_init_val,
uint32_t tong_max_val, uint32_t tong_max_dwells, uint32_t tong_max_val, uint32_t tong_max_dwells,
bool dump, std::string dump_filename); bool dump, const std::string& dump_filename);
void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift,
int32_t doppler_offset); int32_t doppler_offset);

View File

@ -629,7 +629,7 @@ private:
recent_msgs_.pop_front(); recent_msgs_.pop_front();
} }
for (auto participant : participants_) for (const auto& participant : participants_)
{ {
participant->deliver(msg); participant->deliver(msg);
} }

View File

@ -48,7 +48,7 @@
* a boost shared_ptr. This is effectively the public constructor. * a boost shared_ptr. This is effectively the public constructor.
*/ */
signal_generator_c_sptr signal_generator_c_sptr
signal_make_generator_c(std::vector<std::string> signal1, std::vector<std::string> system, const std::vector<unsigned int> &PRN, signal_make_generator_c(const std::vector<std::string> &signal1, const std::vector<std::string> &system, const std::vector<unsigned int> &PRN,
const std::vector<float> &CN0_dB, const std::vector<float> &doppler_Hz, const std::vector<float> &CN0_dB, const std::vector<float> &doppler_Hz,
const std::vector<unsigned int> &delay_chips, const std::vector<unsigned int> &delay_sec, bool data_flag, bool noise_flag, const std::vector<unsigned int> &delay_chips, const std::vector<unsigned int> &delay_sec, bool data_flag, bool noise_flag,
unsigned int fs_in, unsigned int vector_length, float BW_BB) unsigned int fs_in, unsigned int vector_length, float BW_BB)

View File

@ -61,7 +61,7 @@ using signal_generator_c_sptr = boost::shared_ptr<signal_generator_c>;
* interface for creating new instances. * interface for creating new instances.
*/ */
signal_generator_c_sptr signal_generator_c_sptr
signal_make_generator_c(std::vector<std::string> signal1, std::vector<std::string> system, const std::vector<unsigned int> &PRN, signal_make_generator_c(const std::vector<std::string> &signal1, const std::vector<std::string> &system, const std::vector<unsigned int> &PRN,
const std::vector<float> &CN0_dB, const std::vector<float> &doppler_Hz, const std::vector<float> &CN0_dB, const std::vector<float> &doppler_Hz,
const std::vector<unsigned int> &delay_chips, const std::vector<unsigned int> &delay_sec, bool data_flag, bool noise_flag, const std::vector<unsigned int> &delay_chips, const std::vector<unsigned int> &delay_sec, bool data_flag, bool noise_flag,
unsigned int fs_in, unsigned int vector_length, float BW_BB); unsigned int fs_in, unsigned int vector_length, float BW_BB);
@ -80,7 +80,7 @@ private:
/* Create the signal_generator_c object*/ /* Create the signal_generator_c object*/
friend signal_generator_c_sptr friend signal_generator_c_sptr
signal_make_generator_c(std::vector<std::string> signal1, std::vector<std::string> system, const std::vector<unsigned int> &PRN, signal_make_generator_c(const std::vector<std::string> &signal1, const std::vector<std::string> &system, const std::vector<unsigned int> &PRN,
const std::vector<float> &CN0_dB, const std::vector<float> &doppler_Hz, const std::vector<float> &CN0_dB, const std::vector<float> &doppler_Hz,
const std::vector<unsigned int> &delay_chips, const std::vector<unsigned int> &delay_sec, bool data_flag, bool noise_flag, const std::vector<unsigned int> &delay_chips, const std::vector<unsigned int> &delay_sec, bool data_flag, bool noise_flag,
unsigned int fs_in, unsigned int vector_length, float BW_BB); unsigned int fs_in, unsigned int vector_length, float BW_BB);

View File

@ -42,14 +42,15 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
ConfigurationInterface* configuration, const std::string& role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
//################# CONFIGURATION PARAMETERS ######################## //################# CONFIGURATION PARAMETERS ########################

View File

@ -54,7 +54,7 @@ class GlonassL1CaDllPllCAidTracking : public TrackingInterface
{ {
public: public:
GlonassL1CaDllPllCAidTracking(ConfigurationInterface* configuration, GlonassL1CaDllPllCAidTracking(ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);

View File

@ -40,14 +40,15 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
ConfigurationInterface* configuration, const std::string& role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
//################# CONFIGURATION PARAMETERS ######################## //################# CONFIGURATION PARAMETERS ########################

View File

@ -52,7 +52,7 @@ class GlonassL2CaDllPllCAidTracking : public TrackingInterface
{ {
public: public:
GlonassL2CaDllPllCAidTracking(ConfigurationInterface* configuration, GlonassL2CaDllPllCAidTracking(ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);

View File

@ -41,14 +41,15 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking( GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
ConfigurationInterface* configuration, const std::string& role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
//################# CONFIGURATION PARAMETERS ######################## //################# CONFIGURATION PARAMETERS ########################

View File

@ -53,7 +53,7 @@ class GpsL1CaDllPllCAidTracking : public TrackingInterface
{ {
public: public:
GpsL1CaDllPllCAidTracking(ConfigurationInterface* configuration, GpsL1CaDllPllCAidTracking(ConfigurationInterface* configuration,
const std::string& role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams); unsigned int out_streams);

View File

@ -65,7 +65,7 @@ glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -88,7 +88,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::forecast(int noutput_items,
} }
void glonass_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pmt_t msg) void glonass_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(const pmt::pmt_t &msg)
{ {
//pmt::print(msg); //pmt::print(msg);
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
@ -105,7 +105,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,

View File

@ -59,7 +59,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc( glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -90,7 +90,7 @@ private:
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc( glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -101,7 +101,7 @@ private:
glonass_l1_ca_dll_pll_c_aid_tracking_cc( glonass_l1_ca_dll_pll_c_aid_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -169,7 +169,7 @@ private:
int32_t d_extend_correlation_ms; int32_t d_extend_correlation_ms;
bool d_enable_extended_integration; bool d_enable_extended_integration;
bool d_preamble_synchronized; bool d_preamble_synchronized;
void msg_handler_preamble_index(pmt::pmt_t msg); void msg_handler_preamble_index(const pmt::pmt_t& msg);
//Integration period in samples //Integration period in samples
int32_t d_correlation_length_samples; int32_t d_correlation_length_samples;

View File

@ -62,7 +62,7 @@ glonass_l1_ca_dll_pll_make_tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips) float early_late_space_chips)
@ -86,7 +86,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips) : gr::block("Glonass_L1_Ca_Dll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)), float early_late_space_chips) : gr::block("Glonass_L1_Ca_Dll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)),

View File

@ -56,7 +56,7 @@ glonass_l1_ca_dll_pll_tracking_cc_sptr
glonass_l1_ca_dll_pll_make_tracking_cc( glonass_l1_ca_dll_pll_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips); float early_late_space_chips);
@ -84,7 +84,7 @@ private:
glonass_l1_ca_dll_pll_make_tracking_cc( glonass_l1_ca_dll_pll_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips); float early_late_space_chips);
@ -92,7 +92,7 @@ private:
Glonass_L1_Ca_Dll_Pll_Tracking_cc( Glonass_L1_Ca_Dll_Pll_Tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips); float early_late_space_chips);

View File

@ -62,7 +62,7 @@ glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -85,7 +85,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::forecast(int noutput_items,
} }
void glonass_l2_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pmt_t msg) void glonass_l2_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(const pmt::pmt_t &msg)
{ {
//pmt::print(msg); //pmt::print(msg);
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
@ -102,7 +102,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,

View File

@ -57,7 +57,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc( glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -88,7 +88,7 @@ private:
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc( glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -99,7 +99,7 @@ private:
glonass_l2_ca_dll_pll_c_aid_tracking_cc( glonass_l2_ca_dll_pll_c_aid_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -167,7 +167,7 @@ private:
int32_t d_extend_correlation_ms; int32_t d_extend_correlation_ms;
bool d_enable_extended_integration; bool d_enable_extended_integration;
bool d_preamble_synchronized; bool d_preamble_synchronized;
void msg_handler_preamble_index(pmt::pmt_t msg); void msg_handler_preamble_index(const pmt::pmt_t& msg);
//Integration period in samples //Integration period in samples
int32_t d_correlation_length_samples; int32_t d_correlation_length_samples;

View File

@ -62,7 +62,7 @@ glonass_l2_ca_dll_pll_make_tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips) float early_late_space_chips)
@ -86,7 +86,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips) : gr::block("Glonass_L2_Ca_Dll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)), float early_late_space_chips) : gr::block("Glonass_L2_Ca_Dll_Pll_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)),

View File

@ -54,7 +54,7 @@ glonass_l2_ca_dll_pll_tracking_cc_sptr
glonass_l2_ca_dll_pll_make_tracking_cc( glonass_l2_ca_dll_pll_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips); float early_late_space_chips);
@ -82,7 +82,7 @@ private:
glonass_l2_ca_dll_pll_make_tracking_cc( glonass_l2_ca_dll_pll_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips); float early_late_space_chips);
@ -90,7 +90,7 @@ private:
Glonass_L2_Ca_Dll_Pll_Tracking_cc( Glonass_L2_Ca_Dll_Pll_Tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips); float early_late_space_chips);

View File

@ -54,7 +54,7 @@ gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -77,7 +77,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::forecast(int noutput_items,
} }
void gps_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pmt_t msg) void gps_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(const pmt::pmt_t &msg)
{ {
//pmt::print(msg); //pmt::print(msg);
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
@ -94,7 +94,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,

View File

@ -57,7 +57,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
gps_l1_ca_dll_pll_c_aid_make_tracking_cc( gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -88,7 +88,7 @@ private:
gps_l1_ca_dll_pll_c_aid_make_tracking_cc( gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -99,7 +99,7 @@ private:
gps_l1_ca_dll_pll_c_aid_tracking_cc( gps_l1_ca_dll_pll_c_aid_tracking_cc(
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float dll_bw_hz, float dll_bw_hz,
float pll_bw_narrow_hz, float pll_bw_narrow_hz,
@ -163,7 +163,7 @@ private:
int32_t d_extend_correlation_ms; int32_t d_extend_correlation_ms;
bool d_enable_extended_integration; bool d_enable_extended_integration;
bool d_preamble_synchronized; bool d_preamble_synchronized;
void msg_handler_preamble_index(pmt::pmt_t msg); void msg_handler_preamble_index(const pmt::pmt_t& msg);
//Integration period in samples //Integration period in samples
int32_t d_correlation_length_samples; int32_t d_correlation_length_samples;

View File

@ -64,7 +64,7 @@ gps_l1_ca_kf_make_tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips, float early_late_space_chips,
bool bce_run, bool bce_run,
@ -95,7 +95,7 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc(
int64_t fs_in, int64_t fs_in,
uint32_t vector_length, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string &dump_filename,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips, float early_late_space_chips,
bool bce_run, bool bce_run,

View File

@ -60,7 +60,7 @@ gps_l1_ca_kf_make_tracking_cc(uint32_t order,
int64_t if_freq, int64_t if_freq,
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float pll_bw_hz, float pll_bw_hz,
float early_late_space_chips, float early_late_space_chips,
bool bce_run, bool bce_run,
@ -93,7 +93,7 @@ private:
int64_t if_freq, int64_t if_freq,
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips, float early_late_space_chips,
bool bce_run, bool bce_run,
@ -106,7 +106,7 @@ private:
int64_t if_freq, int64_t if_freq,
int64_t fs_in, uint32_t vector_length, int64_t fs_in, uint32_t vector_length,
bool dump, bool dump,
std::string dump_filename, const std::string& dump_filename,
float dll_bw_hz, float dll_bw_hz,
float early_late_space_chips, float early_late_space_chips,
bool bce_run, bool bce_run,

View File

@ -64,7 +64,7 @@ int INIReader::ParseError()
} }
std::string INIReader::Get(const std::string& section, const std::string& name, std::string default_value) std::string INIReader::Get(const std::string& section, const std::string& name, const std::string& default_value)
{ {
std::string key = MakeKey(section, name); std::string key = MakeKey(section, name);
return _values.count(key) ? _values[key] : default_value; return _values.count(key) ? _values[key] : default_value;

View File

@ -67,7 +67,7 @@ public:
//! Get a string value from INI file, returning default_value if not found. //! Get a string value from INI file, returning default_value if not found.
std::string Get(const std::string& section, const std::string& name, std::string Get(const std::string& section, const std::string& name,
std::string default_value); const std::string& default_value);
//! Get an integer (long) value from INI file, returning default_value if not found. //! Get an integer (long) value from INI file, returning default_value if not found.
int64_t GetInteger(const std::string& section, const std::string& name, int64_t default_value); int64_t GetInteger(const std::string& section, const std::string& name, int64_t default_value);

View File

@ -35,9 +35,9 @@
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(std::vector<std::string> addresses, const uint16_t& port) : socket{io_service} Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port) : socket{io_service}
{ {
for (auto address : addresses) for (const auto& address : addresses)
{ {
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port); boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port);
endpoints.push_back(endpoint); endpoints.push_back(endpoint);
@ -51,7 +51,7 @@ bool Gnss_Synchro_Udp_Sink::write_gnss_synchro(const std::vector<Gnss_Synchro>&
oa << stocks; oa << stocks;
std::string outbound_data = archive_stream.str(); std::string outbound_data = archive_stream.str();
for (auto endpoint : endpoints) for (const auto& endpoint : endpoints)
{ {
socket.open(endpoint.protocol(), error); socket.open(endpoint.protocol(), error);
socket.connect(endpoint, error); socket.connect(endpoint, error);

View File

@ -42,7 +42,7 @@
class Gnss_Synchro_Udp_Sink class Gnss_Synchro_Udp_Sink
{ {
public: public:
Gnss_Synchro_Udp_Sink(std::vector<std::string> addresses, const uint16_t& port); Gnss_Synchro_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port);
bool write_gnss_synchro(const std::vector<Gnss_Synchro>& stocks); bool write_gnss_synchro(const std::vector<Gnss_Synchro>& stocks);
private: private:

View File

@ -1340,7 +1340,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
} }
void GNSSFlowgraph::priorize_satellites(std::vector<std::pair<int, Gnss_Satellite>> visible_satellites) void GNSSFlowgraph::priorize_satellites(const std::vector<std::pair<int, Gnss_Satellite>>& visible_satellites)
{ {
size_t old_size; size_t old_size;
Gnss_Signal gs; Gnss_Signal gs;

View File

@ -141,7 +141,7 @@ public:
/*! /*!
* \brief Priorize visible satellites in the specified vector * \brief Priorize visible satellites in the specified vector
*/ */
void priorize_satellites(std::vector<std::pair<int, Gnss_Satellite>> visible_satellites); void priorize_satellites(const std::vector<std::pair<int, Gnss_Satellite>>& visible_satellites);
private: private:
void init(); // Populates the SV PRN list available for acquisition and tracking void init(); // Populates the SV PRN list available for acquisition and tracking

View File

@ -70,7 +70,7 @@ class GpsL1CaPcpsAcquisitionTest_msg_rx : public gr::block
{ {
private: private:
friend GpsL1CaPcpsAcquisitionTest_msg_rx_sptr GpsL1CaPcpsAcquisitionTest_msg_rx_make(); friend GpsL1CaPcpsAcquisitionTest_msg_rx_sptr GpsL1CaPcpsAcquisitionTest_msg_rx_make();
void msg_handler_events(pmt::pmt_t msg); void msg_handler_events(const pmt::pmt_t &msg);
GpsL1CaPcpsAcquisitionTest_msg_rx(); GpsL1CaPcpsAcquisitionTest_msg_rx();
public: public:
@ -85,7 +85,7 @@ GpsL1CaPcpsAcquisitionTest_msg_rx_sptr GpsL1CaPcpsAcquisitionTest_msg_rx_make()
} }
void GpsL1CaPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg) void GpsL1CaPcpsAcquisitionTest_msg_rx::msg_handler_events(const pmt::pmt_t &msg)
{ {
try try
{ {
@ -236,14 +236,14 @@ void GpsL1CaPcpsAcquisitionTest::plot_grid()
} }
TEST_F(GpsL1CaPcpsAcquisitionTest, Instantiate) TEST_F(GpsL1CaPcpsAcquisitionTest /*unused*/, Instantiate /*unused*/)
{ {
init(); init();
boost::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = boost::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition_1C", 1, 0); boost::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = boost::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition_1C", 1, 0);
} }
TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun) TEST_F(GpsL1CaPcpsAcquisitionTest /*unused*/, ConnectAndRun /*unused*/)
{ {
int fs_in = 4000000; int fs_in = 4000000;
int nsamples = 4000; int nsamples = 4000;
@ -276,7 +276,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun)
} }
TEST_F(GpsL1CaPcpsAcquisitionTest, ValidationOfResults) TEST_F(GpsL1CaPcpsAcquisitionTest /*unused*/, ValidationOfResults /*unused*/)
{ {
std::chrono::time_point<std::chrono::system_clock> start, end; std::chrono::time_point<std::chrono::system_clock> start, end;
std::chrono::duration<double> elapsed_seconds(0.0); std::chrono::duration<double> elapsed_seconds(0.0);

View File

@ -36,6 +36,7 @@
#include <gnuradio/top_block.h> #include <gnuradio/top_block.h>
#include <chrono> #include <chrono>
#include <cstdlib> #include <cstdlib>
#include <utility>
#ifdef GR_GREATER_38 #ifdef GR_GREATER_38
#include <gnuradio/analog/sig_source.h> #include <gnuradio/analog/sig_source.h>
#else #else
@ -203,7 +204,7 @@ void GpsL1CaPcpsAcquisitionTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg)
{ {
try try
{ {
int64_t message = pmt::to_long(msg); int64_t message = pmt::to_long(std::move(msg));
rx_message = message; rx_message = message;
} }
catch (boost::bad_any_cast &e) catch (boost::bad_any_cast &e)
@ -225,9 +226,7 @@ GpsL1CaPcpsAcquisitionTestFpga_msg_rx::GpsL1CaPcpsAcquisitionTestFpga_msg_rx() :
} }
GpsL1CaPcpsAcquisitionTestFpga_msg_rx::~GpsL1CaPcpsAcquisitionTestFpga_msg_rx() GpsL1CaPcpsAcquisitionTestFpga_msg_rx::~GpsL1CaPcpsAcquisitionTestFpga_msg_rx() = default;
{
}
class GpsL1CaPcpsAcquisitionTestFpga : public ::testing::Test class GpsL1CaPcpsAcquisitionTestFpga : public ::testing::Test
@ -241,9 +240,7 @@ protected:
gnss_synchro = Gnss_Synchro(); gnss_synchro = Gnss_Synchro();
} }
~GpsL1CaPcpsAcquisitionTestFpga() ~GpsL1CaPcpsAcquisitionTestFpga() = default;
{
}
void init(); void init();
@ -385,7 +382,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTestFpga, ValidationOfResults)
ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS."; ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples); double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples);
float delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000); auto delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000);
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz); double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
EXPECT_LE(doppler_error_hz, 666) << "Doppler error exceeds the expected value: 666 Hz = 2/(3*integration period)"; EXPECT_LE(doppler_error_hz, 666) << "Doppler error exceeds the expected value: 666 Hz = 2/(3*integration period)";

View File

@ -143,7 +143,7 @@ void sending_thread(gr::top_block_sptr top_block, const char *file_name)
usleep(FIVE_SECONDS); // wait for some time to give time to the other thread to program the device usleep(FIVE_SECONDS); // wait for some time to give time to the other thread to program the device
//send_tracking_gps_input_samples(dma_descr, rx_signal_file, file_length); //send_tracking_gps_input_samples(dma_descr, rx_signal_file, file_length);
send_tracking_gps_input_samples(rx_signal_file, file_length, std::move(top_block)); send_tracking_gps_input_samples(rx_signal_file, file_length, top_block);
fclose(rx_signal_file); fclose(rx_signal_file);
} }