1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-07 12:14:20 +00:00
This commit is contained in:
Carles Fernandez 2019-02-11 17:52:59 +01:00
commit 1fda0bd920
121 changed files with 346 additions and 385 deletions

View File

@ -1,3 +1,4 @@
---
Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,performance-faster-string-find,performance-inefficient-algorithm,performance-move-const-arg,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-container-size-empty,readability-named-parameter,readability-non-const-parameter,readability-string-compare'
Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,performance-faster-string-find,performance-inefficient-algorithm,performance-move-const-arg,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-container-size-empty,readability-named-parameter,readability-non-const-parameter,readability-string-compare'
HeaderFilterRegex: '.*'
FormatStyle: 'file'

View File

@ -56,7 +56,7 @@
class rtklib_pvt_cc;
typedef boost::shared_ptr<rtklib_pvt_cc> rtklib_pvt_cc_sptr;
using rtklib_pvt_cc_sptr = boost::shared_ptr<rtklib_pvt_cc>;
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t n_channels,
const Pvt_Conf& conf_,

View File

@ -1657,8 +1657,8 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
// -------- Line 6 leap seconds
// For leap second information, see http://www.endruntechnologies.com/leap.htm
line.clear();
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LS), 6);
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LSF), 6);
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
line += std::string(36, ' ');
@ -2831,8 +2831,8 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_M
}
else if (line_str.find("LEAP SECONDS", 59) != std::string::npos)
{
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LS), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LSF), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
line_aux += std::string(36, ' ');
@ -7666,8 +7666,8 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_M
if (line_str.find("TIME OF FIRST OBS", 59) != std::string::npos)
{
data.push_back(line_str);
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LS), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LSF), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
line_aux += std::string(36, ' ');

View File

@ -81,7 +81,7 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
acq_parameters.dump_filename = dump_filename_;
//--- Find number of samples per spreading code -------------------------
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
code_length_ = static_cast<uint32_t>(std::round(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
vector_length_ = code_length_ * sampled_ms_;
@ -144,7 +144,7 @@ void BeidouB1iPcpsAcquisition::stop_acquisition()
{
}
void BeidouB1iPcpsAcquisition::set_channel(unsigned int channel)
void BeidouB1iPcpsAcquisition::set_channel(uint32_t channel)
{
channel_ = channel;
acquisition_->set_channel(channel_);
@ -170,7 +170,7 @@ void BeidouB1iPcpsAcquisition::set_threshold(float threshold)
}
void BeidouB1iPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
void BeidouB1iPcpsAcquisition::set_doppler_max(uint32_t doppler_max)
{
doppler_max_ = doppler_max;
@ -178,7 +178,7 @@ void BeidouB1iPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
}
void BeidouB1iPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
void BeidouB1iPcpsAcquisition::set_doppler_step(uint32_t doppler_step)
{
doppler_step_ = doppler_step;
@ -213,7 +213,7 @@ void BeidouB1iPcpsAcquisition::set_local_code()
beidou_b1i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
for (unsigned int i = 0; i < sampled_ms_; i++)
for (uint32_t i = 0; i < sampled_ms_; i++)
{
memcpy(&(code_[i * code_length_]), code,
sizeof(gr_complex) * code_length_);
@ -239,7 +239,7 @@ void BeidouB1iPcpsAcquisition::set_state(int state)
float BeidouB1iPcpsAcquisition::calculate_threshold(float pfa)
{
//Calculate the threshold
unsigned int frequency_bins = 0;
uint32_t frequency_bins = 0;
/*
for (int doppler = (int)(-doppler_max_); doppler <= (int)doppler_max_; doppler += doppler_step_)
{
@ -250,7 +250,7 @@ float BeidouB1iPcpsAcquisition::calculate_threshold(float pfa)
frequency_bins = (2 * doppler_max_ + doppler_step_) / doppler_step_;
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
unsigned int ncells = vector_length_ * frequency_bins;
uint32_t ncells = vector_length_ * frequency_bins;
double exponent = 1 / static_cast<double>(ncells);
double val = pow(1.0 - pfa, exponent);
auto lambda = static_cast<double>(vector_length_);
@ -315,7 +315,7 @@ gr::basic_block_sptr BeidouB1iPcpsAcquisition::get_left_block()
{
return acquisition_;
}
else if (item_type_ == "cshort")
if (item_type_ == "cshort")
{
return acquisition_;
}

View File

@ -42,6 +42,7 @@
#include <gnuradio/blocks/stream_to_vector.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <string>
#include <cstdint>
class ConfigurationInterface;
@ -92,7 +93,7 @@ public:
/*!
* \brief Set acquisition channel unique ID
*/
void set_channel(unsigned int channel) override;
void set_channel(uint32_t channel) override;
/*!
* \brief Set statistics threshold of PCPS algorithm
@ -102,12 +103,12 @@ public:
/*!
* \brief Set maximum Doppler off grid search
*/
void set_doppler_max(unsigned int doppler_max) override;
void set_doppler_max(uint32_t doppler_max) override;
/*!
* \brief Set Doppler steps for the grid search
*/
void set_doppler_step(unsigned int doppler_step) override;
void set_doppler_step(uint32_t doppler_step) override;
/*!
* \brief Initializes acquisition algorithm.
@ -153,25 +154,25 @@ private:
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
size_t item_size_;
std::string item_type_;
unsigned int vector_length_;
unsigned int code_length_;
uint32_t vector_length_;
uint32_t code_length_;
bool bit_transition_flag_;
bool use_CFAR_algorithm_flag_;
unsigned int channel_;
uint32_t channel_;
float threshold_;
unsigned int doppler_max_;
unsigned int doppler_step_;
unsigned int sampled_ms_;
unsigned int max_dwells_;
long fs_in_;
uint32_t doppler_max_;
uint32_t doppler_step_;
uint32_t sampled_ms_;
uint32_t max_dwells_;
int64_t fs_in_;
bool dump_;
bool blocking_;
std::string dump_filename_;
std::complex<float>* code_;
Gnss_Synchro* gnss_synchro_;
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
uint32_t in_streams_;
uint32_t out_streams_;
float calculate_threshold(float pfa);
};

View File

@ -47,7 +47,7 @@
class galileo_e5a_noncoherentIQ_acquisition_caf_cc;
typedef boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc> galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr;
using galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr = boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc>;
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr
galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(unsigned int sampled_ms,

View File

@ -41,7 +41,7 @@
class galileo_pcps_8ms_acquisition_cc;
typedef boost::shared_ptr<galileo_pcps_8ms_acquisition_cc> galileo_pcps_8ms_acquisition_cc_sptr;
using galileo_pcps_8ms_acquisition_cc_sptr = boost::shared_ptr<galileo_pcps_8ms_acquisition_cc>;
galileo_pcps_8ms_acquisition_cc_sptr
galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms,

View File

@ -63,7 +63,7 @@
class pcps_acquisition;
typedef boost::shared_ptr<pcps_acquisition> pcps_acquisition_sptr;
using pcps_acquisition_sptr = boost::shared_ptr<pcps_acquisition>;
pcps_acquisition_sptr
pcps_make_acquisition(const Acq_Conf& conf_);

View File

@ -55,13 +55,13 @@
#include <gnuradio/block.h>
#include <gnuradio/fft/fft.h>
#include <gnuradio/gr_complex.h>
#include <cstdint>
#include <fstream>
#include <string>
class pcps_acquisition_fine_doppler_cc;
typedef boost::shared_ptr<pcps_acquisition_fine_doppler_cc>
pcps_acquisition_fine_doppler_cc_sptr;
using pcps_acquisition_fine_doppler_cc_sptr = boost::shared_ptr<pcps_acquisition_fine_doppler_cc>;
pcps_acquisition_fine_doppler_cc_sptr
pcps_make_acquisition_fine_doppler_cc(const Acq_Conf& conf_);
@ -87,7 +87,7 @@ private:
bool start();
Acq_Conf acq_parameters;
long d_fs_in;
int64_t d_fs_in;
int d_samples_per_ms;
int d_max_dwells;
int d_gnuradio_forecast_samples;

View File

@ -57,8 +57,7 @@
class pcps_assisted_acquisition_cc;
typedef boost::shared_ptr<pcps_assisted_acquisition_cc>
pcps_assisted_acquisition_cc_sptr;
using pcps_assisted_acquisition_cc_sptr = boost::shared_ptr<pcps_assisted_acquisition_cc>;
pcps_assisted_acquisition_cc_sptr
pcps_make_assisted_acquisition_cc(

View File

@ -47,7 +47,7 @@
class pcps_cccwsr_acquisition_cc;
typedef boost::shared_ptr<pcps_cccwsr_acquisition_cc> pcps_cccwsr_acquisition_cc_sptr;
using pcps_cccwsr_acquisition_cc_sptr = boost::shared_ptr<pcps_cccwsr_acquisition_cc>;
pcps_cccwsr_acquisition_cc_sptr
pcps_cccwsr_make_acquisition_cc(

View File

@ -63,8 +63,7 @@
class pcps_quicksync_acquisition_cc;
typedef boost::shared_ptr<pcps_quicksync_acquisition_cc>
pcps_quicksync_acquisition_cc_sptr;
using pcps_quicksync_acquisition_cc_sptr = boost::shared_ptr<pcps_quicksync_acquisition_cc>;
pcps_quicksync_acquisition_cc_sptr
pcps_quicksync_make_acquisition_cc(

View File

@ -61,7 +61,7 @@
class pcps_tong_acquisition_cc;
typedef boost::shared_ptr<pcps_tong_acquisition_cc> pcps_tong_acquisition_cc_sptr;
using pcps_tong_acquisition_cc_sptr = boost::shared_ptr<pcps_tong_acquisition_cc>;
pcps_tong_acquisition_cc_sptr
pcps_tong_make_acquisition_cc(

View File

@ -36,7 +36,7 @@
class channel_msg_receiver_cc;
typedef boost::shared_ptr<channel_msg_receiver_cc> channel_msg_receiver_cc_sptr;
using channel_msg_receiver_cc_sptr = boost::shared_ptr<channel_msg_receiver_cc>;
channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);

View File

@ -37,7 +37,7 @@
class interleaved_byte_to_complex_byte;
typedef boost::shared_ptr<interleaved_byte_to_complex_byte> interleaved_byte_to_complex_byte_sptr;
using interleaved_byte_to_complex_byte_sptr = boost::shared_ptr<interleaved_byte_to_complex_byte>;
interleaved_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte();

View File

@ -36,7 +36,7 @@
class interleaved_byte_to_complex_short;
typedef boost::shared_ptr<interleaved_byte_to_complex_short> interleaved_byte_to_complex_short_sptr;
using interleaved_byte_to_complex_short_sptr = boost::shared_ptr<interleaved_byte_to_complex_short>;
interleaved_byte_to_complex_short_sptr make_interleaved_byte_to_complex_short();

View File

@ -36,7 +36,7 @@
class interleaved_short_to_complex_short;
typedef boost::shared_ptr<interleaved_short_to_complex_short> interleaved_short_to_complex_short_sptr;
using interleaved_short_to_complex_short_sptr = boost::shared_ptr<interleaved_short_to_complex_short>;
interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short();

View File

@ -67,7 +67,7 @@ BeamformerFilter::BeamformerFilter(
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
}
samples_ = 0;
samples_ = 0ULL;
if (in_stream_ > 8)
{
LOG(ERROR) << "This implementation only supports eight input streams";

View File

@ -34,6 +34,7 @@
#include "gnss_block_interface.h"
#include <gnuradio/hier_block2.h>
#include <cstdint>
#include <string>
class ConfigurationInterface;
@ -78,7 +79,7 @@ private:
unsigned int out_stream_;
std::string item_type_;
size_t item_size_;
unsigned long long samples_;
uint64_t samples_;
bool dump_;
std::string dump_filename_;
gr::block_sptr beamformer_;

View File

@ -299,11 +299,8 @@ gr::basic_block_sptr FirFilter::get_left_block()
{
return cshort_to_float_x2_;
}
else
{
return nullptr;
LOG(ERROR) << " Unknown item type conversion";
}
LOG(WARNING) << "Unknown item type conversion";
return nullptr;
}
@ -329,11 +326,8 @@ gr::basic_block_sptr FirFilter::get_right_block()
{
return float_to_complex_;
}
else
{
return nullptr;
LOG(ERROR) << " unknown input filter item type";
}
LOG(WARNING) << "Unknown input filter taps item type";
return nullptr;
}

View File

@ -339,7 +339,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
{
return gr_char_to_short_;
}
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
{
return gr_char_to_short_;
}
@ -373,7 +373,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_right_block()
{
return freq_xlating_fir_filter_scf_;
}
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
{
return complex_to_complex_byte_;
}

View File

@ -34,7 +34,7 @@
#include <gnuradio/sync_block.h>
class beamformer;
typedef boost::shared_ptr<beamformer> beamformer_sptr;
using beamformer_sptr = boost::shared_ptr<beamformer>;
beamformer_sptr make_beamformer();

View File

@ -39,7 +39,7 @@
class Notch;
typedef boost::shared_ptr<Notch> notch_sptr;
using notch_sptr = boost::shared_ptr<Notch>;
notch_sptr make_notch_filter(float pfa, float p_c_factor,
int32_t length_, int32_t n_segments_est, int32_t n_segments_reset);

View File

@ -39,7 +39,7 @@
class NotchLite;
typedef boost::shared_ptr<NotchLite> notch_lite_sptr;
using notch_lite_sptr = boost::shared_ptr<NotchLite>;
notch_lite_sptr make_notch_filter_lite(float p_c_factor, float pfa, int32_t length_, int32_t n_segments_est, int32_t n_segments_reset, int32_t n_segments_coeff);

View File

@ -37,7 +37,7 @@
class pulse_blanking_cc;
typedef boost::shared_ptr<pulse_blanking_cc> pulse_blanking_cc_sptr;
using pulse_blanking_cc_sptr = boost::shared_ptr<pulse_blanking_cc>;
pulse_blanking_cc_sptr make_pulse_blanking_cc(float pfa, int32_t length_, int32_t n_segments_est, int32_t n_segments_reset);

View File

@ -37,7 +37,7 @@
class byte_x2_to_complex_byte;
typedef boost::shared_ptr<byte_x2_to_complex_byte> byte_x2_to_complex_byte_sptr;
using byte_x2_to_complex_byte_sptr = boost::shared_ptr<byte_x2_to_complex_byte>;
byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();

View File

@ -37,7 +37,7 @@
class complex_byte_to_float_x2;
typedef boost::shared_ptr<complex_byte_to_float_x2> complex_byte_to_float_x2_sptr;
using complex_byte_to_float_x2_sptr = boost::shared_ptr<complex_byte_to_float_x2>;
complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();

View File

@ -36,7 +36,7 @@
class complex_float_to_complex_byte;
typedef boost::shared_ptr<complex_float_to_complex_byte> complex_float_to_complex_byte_sptr;
using complex_float_to_complex_byte_sptr = boost::shared_ptr<complex_float_to_complex_byte>;
complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();

View File

@ -36,7 +36,7 @@
class conjugate_cc;
typedef boost::shared_ptr<conjugate_cc> conjugate_cc_sptr;
using conjugate_cc_sptr = boost::shared_ptr<conjugate_cc>;
conjugate_cc_sptr make_conjugate_cc();

View File

@ -36,7 +36,7 @@
class conjugate_ic;
typedef boost::shared_ptr<conjugate_ic> conjugate_ic_sptr;
using conjugate_ic_sptr = boost::shared_ptr<conjugate_ic>;
conjugate_ic_sptr make_conjugate_ic();

View File

@ -36,7 +36,7 @@
class conjugate_sc;
typedef boost::shared_ptr<conjugate_sc> conjugate_sc_sptr;
using conjugate_sc_sptr = boost::shared_ptr<conjugate_sc>;
conjugate_sc_sptr make_conjugate_sc();

View File

@ -37,7 +37,7 @@
class cshort_to_float_x2;
typedef boost::shared_ptr<cshort_to_float_x2> cshort_to_float_x2_sptr;
using cshort_to_float_x2_sptr = boost::shared_ptr<cshort_to_float_x2>;
cshort_to_float_x2_sptr make_cshort_to_float_x2();

View File

@ -38,7 +38,7 @@
class gnss_sdr_sample_counter;
typedef boost::shared_ptr<gnss_sdr_sample_counter> gnss_sdr_sample_counter_sptr;
using gnss_sdr_sample_counter_sptr = boost::shared_ptr<gnss_sdr_sample_counter>;
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(
double _fs,

View File

@ -605,14 +605,14 @@ private:
class Rtcm_Listener_Room
{
public:
inline void join(std::shared_ptr<Rtcm_Listener> participant)
inline void join(const std::shared_ptr<Rtcm_Listener>& participant)
{
participants_.insert(participant);
for (auto msg : recent_msgs_)
participant->deliver(msg);
}
inline void leave(std::shared_ptr<Rtcm_Listener> participant)
inline void leave(const std::shared_ptr<Rtcm_Listener>& participant)
{
participants_.erase(participant);
}
@ -754,7 +754,7 @@ private:
boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
: io_context_(io_context), socket_(io_context)
{
do_connect(endpoint_iterator);
do_connect(std::move(endpoint_iterator));
}
inline void close()
@ -778,7 +778,7 @@ private:
private:
inline void do_connect(boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
{
boost::asio::async_connect(socket_, endpoint_iterator,
boost::asio::async_connect(socket_, std::move(endpoint_iterator),
[this](boost::system::error_code ec, boost::asio::ip::tcp::resolver::iterator) {
if (!ec)
{

View File

@ -343,7 +343,7 @@ const int POSOPT_RINEX = 3; //!< pos option: rinex header pos
const int MAXSTRPATH = 1024; //!< max length of stream path
const int MAXSTRMSG = 1024; //!< max length of stream message
typedef void fatalfunc_t(const char *); //!< fatal callback function type
using fatalfunc_t = void (const char *); //!< fatal callback function type
#define STR_MODE_R 0x1 /* stream mode: read */
#define STR_MODE_W 0x2 /* stream mode: write */

View File

@ -3653,7 +3653,7 @@ double satwavelen(int sat, int frq, const nav_t *nav)
return SPEED_OF_LIGHT / FREQ6; /* L6/LEX */
if (frq == 4)
return SPEED_OF_LIGHT / FREQ7; /* E5b */
else if (frq == 5)
if (frq == 5)
return SPEED_OF_LIGHT / FREQ8; /* E5a+b */
else if (frq == 6)
return SPEED_OF_LIGHT / FREQ9; /* S */

View File

@ -37,7 +37,7 @@
class short_x2_to_cshort;
typedef boost::shared_ptr<short_x2_to_cshort> short_x2_to_cshort_sptr;
using short_x2_to_cshort_sptr = boost::shared_ptr<short_x2_to_cshort>;
short_x2_to_cshort_sptr make_short_x2_to_cshort();

View File

@ -45,7 +45,7 @@
class hybrid_observables_cc;
typedef boost::shared_ptr<hybrid_observables_cc> hybrid_observables_cc_sptr;
using hybrid_observables_cc_sptr = boost::shared_ptr<hybrid_observables_cc>;
hybrid_observables_cc_sptr
hybrid_make_observables_cc(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename);

View File

@ -36,8 +36,7 @@
#include <volk/volk.h>
class direct_resampler_conditioner_cb;
typedef boost::shared_ptr<direct_resampler_conditioner_cb>
direct_resampler_conditioner_cb_sptr;
using direct_resampler_conditioner_cb_sptr = boost::shared_ptr<direct_resampler_conditioner_cb>;
direct_resampler_conditioner_cb_sptr
direct_resampler_make_conditioner_cb(double sample_freq_in,

View File

@ -43,7 +43,7 @@
#include <volk/volk.h>
class direct_resampler_conditioner_cc;
typedef boost::shared_ptr<direct_resampler_conditioner_cc> direct_resampler_conditioner_cc_sptr;
using direct_resampler_conditioner_cc_sptr = boost::shared_ptr<direct_resampler_conditioner_cc>;
direct_resampler_conditioner_cc_sptr
direct_resampler_make_conditioner_cc(double sample_freq_in,
double sample_freq_out);

View File

@ -36,8 +36,7 @@
#include <volk/volk.h>
class direct_resampler_conditioner_cs;
typedef boost::shared_ptr<direct_resampler_conditioner_cs>
direct_resampler_conditioner_cs_sptr;
using direct_resampler_conditioner_cs_sptr = boost::shared_ptr<direct_resampler_conditioner_cs>;
direct_resampler_conditioner_cs_sptr
direct_resampler_make_conditioner_cs(double sample_freq_in,

View File

@ -51,7 +51,7 @@ class signal_generator_c;
*
* As a convention, the _sptr suffix indicates a boost::shared_ptr
*/
typedef boost::shared_ptr<signal_generator_c> signal_generator_c_sptr;
using signal_generator_c_sptr = boost::shared_ptr<signal_generator_c>;
/*!
* \brief Return a shared_ptr to a new instance of gen_source.

View File

@ -55,8 +55,8 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
double default_seconds_to_skip = 0.0;
size_t header_size = 0;
samples_ = configuration->property(role + ".samples", 0);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0);
samples_ = configuration->property(role + ".samples", 0ULL);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0LL);
filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present

View File

@ -97,19 +97,19 @@ public:
return repeat_;
}
inline long sampling_frequency() const
inline int64_t sampling_frequency() const
{
return sampling_frequency_;
}
inline long samples() const
inline uint64_t samples() const
{
return samples_;
}
private:
uint64_t samples_;
long sampling_frequency_;
int64_t sampling_frequency_;
std::string filename_;
std::string item_type_;
bool repeat_;

View File

@ -50,7 +50,7 @@ LabsatSignalSource::LabsatSignalSource(ConfigurationInterface* configuration,
int channel_selector = configuration->property(role + ".selected_channel", 1);
std::string default_filename = "./example_capture.LS3";
samples_ = configuration->property(role + ".samples", 0);
samples_ = configuration->property(role + ".samples", 0ULL);
filename_ = configuration->property(role + ".filename", default_filename);
if (item_type_ == "gr_complex")

View File

@ -81,7 +81,7 @@ private:
unsigned int out_stream_;
std::string item_type_;
size_t item_size_;
long samples_;
uint64_t samples_;
std::string filename_;
bool dump_;
std::string dump_filename_;

View File

@ -53,8 +53,8 @@ NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
std::string default_item_type = "byte";
std::string default_dump_filename = "../data/my_capture_dump.dat";
samples_ = configuration->property(role + ".samples", 0);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0);
samples_ = configuration->property(role + ".samples", 0ULL);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0LL);
filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present

View File

@ -96,27 +96,27 @@ public:
return repeat_;
}
inline long sampling_frequency() const
inline int64_t sampling_frequency() const
{
return sampling_frequency_;
}
inline long samples() const
inline uint64_t samples() const
{
return samples_;
}
private:
unsigned long long samples_;
long sampling_frequency_;
uint64_t samples_;
int64_t sampling_frequency_;
std::string filename_;
std::string item_type_;
bool repeat_;
bool dump_;
std::string dump_filename_;
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
uint32_t in_streams_;
uint32_t out_streams_;
gr::blocks::file_source::sptr file_source_;
unpack_byte_2bit_samples_sptr unpack_byte_;
boost::shared_ptr<gr::block> valve_;

View File

@ -57,7 +57,7 @@ RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
std::string empty = "";
std::string default_dump_file = "./data/signal_source.dat";
std::string default_item_type = "gr_complex";
samples_ = configuration->property(role + ".samples", 0);
samples_ = configuration->property(role + ".samples", 0ULL);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename",
default_dump_file);
@ -122,7 +122,7 @@ RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
item_size_ = sizeof(int16_t);
}
if (samples_ != 0)
if (samples_ != 0ULL)
{
DLOG(INFO) << "Send STOP signal after " << samples_ << " samples";
valve_ = gnss_sdr_make_valve(item_size_, samples_, queue_);
@ -167,7 +167,7 @@ void RtlTcpSignalSource::MakeBlock()
void RtlTcpSignalSource::connect(gr::top_block_sptr top_block)
{
if (samples_)
if (samples_ != 0ULL)
{
top_block->connect(signal_source_, 0, valve_, 0);
DLOG(INFO) << "connected rtl tcp source to valve";
@ -187,7 +187,7 @@ void RtlTcpSignalSource::connect(gr::top_block_sptr top_block)
void RtlTcpSignalSource::disconnect(gr::top_block_sptr top_block)
{
if (samples_)
if (samples_ != 0ULL)
{
top_block->disconnect(signal_source_, 0, valve_, 0);
if (dump_)
@ -211,12 +211,9 @@ gr::basic_block_sptr RtlTcpSignalSource::get_left_block()
gr::basic_block_sptr RtlTcpSignalSource::get_right_block()
{
if (samples_ != 0)
if (samples_ != 0ULL)
{
return valve_;
}
else
{
return signal_source_;
}
return signal_source_;
}

View File

@ -105,7 +105,7 @@ private:
std::string item_type_;
size_t item_size_;
long samples_;
uint64_t samples_;
bool dump_;
std::string dump_filename_;

View File

@ -52,8 +52,8 @@ SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration
std::string default_item_type = "int";
std::string default_dump_filename = "../data/my_capture_dump.dat";
samples_ = configuration->property(role + ".samples", 0);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0);
samples_ = configuration->property(role + ".samples", 0ULL);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0LL);
filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present

View File

@ -39,6 +39,7 @@
#include <gnuradio/blocks/throttle.h>
#include <gnuradio/hier_block2.h>
#include <gnuradio/msg_queue.h>
#include <cstdint>
#include <string>
class ConfigurationInterface;
@ -93,19 +94,19 @@ public:
return repeat_;
}
inline long sampling_frequency() const
inline int64_t sampling_frequency() const
{
return sampling_frequency_;
}
inline long samples() const
inline uint64_t samples() const
{
return samples_;
}
private:
unsigned long long samples_;
long sampling_frequency_;
uint64_t samples_;
int64_t sampling_frequency_;
std::string filename_;
std::string item_type_;
bool repeat_;

View File

@ -49,8 +49,8 @@ SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(ConfigurationInterface*
std::string default_dump_filename = "../data/my_capture_dump.dat";
item_type_ = "int";
samples_ = configuration->property(role + ".samples", 0);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0.0);
samples_ = configuration->property(role + ".samples", 0ULL);
sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0LL);
filename_ = configuration->property(role + ".filename", default_filename);
repeat_ = configuration->property(role + ".repeat", false);
dump_ = configuration->property(role + ".dump", false);

View File

@ -97,19 +97,19 @@ public:
return repeat_;
}
inline long sampling_frequency() const
inline int64_t sampling_frequency() const
{
return sampling_frequency_;
}
inline long samples() const
inline uint64_t samples() const
{
return samples_;
}
private:
uint64_t samples_;
double sampling_frequency_;
int64_t sampling_frequency_;
std::string filename_;
bool repeat_;
bool dump_; //Enables dumping the gr_complex sample output

View File

@ -77,7 +77,7 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
if (RF_channels_ == 1)
{
// Single RF channel UHD operation (backward compatible config file format)
samples_.push_back(configuration->property(role + ".samples", 0));
samples_.push_back(configuration->property(role + ".samples", 0ULL));
dump_.push_back(configuration->property(role + ".dump", false));
dump_filename_.push_back(configuration->property(role + ".dump_filename", default_dump_file));
@ -92,7 +92,7 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
for (int i = 0; i < RF_channels_; i++)
{
// Single RF channel UHD operation (backward compatible config file format)
samples_.push_back(configuration->property(role + ".samples" + std::to_string(i), 0));
samples_.push_back(configuration->property(role + ".samples" + std::to_string(i), 0ULL));
dump_.push_back(configuration->property(role + ".dump" + std::to_string(i), false));
dump_filename_.push_back(configuration->property(role + ".dump_filename" + std::to_string(i), default_dump_file));
@ -215,7 +215,7 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
for (int i = 0; i < RF_channels_; i++)
{
if (samples_.at(i) != 0)
if (samples_.at(i) != 0ULL)
{
LOG(INFO) << "RF_channel " << i << " Send STOP signal after " << samples_.at(i) << " samples";
valve_.push_back(gnss_sdr_make_valve(item_size_, samples_.at(i), queue_));
@ -247,7 +247,7 @@ void UhdSignalSource::connect(gr::top_block_sptr top_block)
{
for (int i = 0; i < RF_channels_; i++)
{
if (samples_.at(i) != 0)
if (samples_.at(i) != 0ULL)
{
top_block->connect(uhd_source_, i, valve_.at(i), 0);
DLOG(INFO) << "connected usrp source to valve RF Channel " << i;
@ -273,7 +273,7 @@ void UhdSignalSource::disconnect(gr::top_block_sptr top_block)
{
for (int i = 0; i < RF_channels_; i++)
{
if (samples_.at(i) != 0)
if (samples_.at(i) != 0ULL)
{
top_block->disconnect(uhd_source_, i, valve_.at(i), 0);
LOG(INFO) << "UHD source disconnected";
@ -310,7 +310,7 @@ gr::basic_block_sptr UhdSignalSource::get_right_block()
gr::basic_block_sptr UhdSignalSource::get_right_block(int RF_channel)
{
//TODO: There is a incoherence here: Multichannel UHD is a single block with multiple outputs, but if the sample limit is enabled, the output is a multiple block!
if (samples_.at(RF_channel) != 0)
if (samples_.at(RF_channel) != 0ULL)
{
return valve_.at(RF_channel);
}

View File

@ -37,6 +37,7 @@
#include <gnuradio/hier_block2.h>
#include <gnuradio/msg_queue.h>
#include <gnuradio/uhd/usrp_source.h>
#include <cstdint>
#include <string>
#include <vector>
@ -99,7 +100,7 @@ private:
std::vector<double> freq_;
std::vector<double> gain_;
std::vector<double> IF_bandwidth_hz_;
std::vector<long> samples_;
std::vector<uint64_t> samples_;
std::vector<bool> dump_;
std::vector<std::string> dump_filename_;

View File

@ -39,7 +39,7 @@
class labsat23_source;
typedef boost::shared_ptr<labsat23_source> labsat23_source_sptr;
using labsat23_source_sptr = boost::shared_ptr<labsat23_source>;
labsat23_source_sptr labsat23_make_source(const char *signal_file_basename, int channel_selector);

View File

@ -50,8 +50,7 @@
class rtl_tcp_signal_source_c;
typedef boost::shared_ptr<rtl_tcp_signal_source_c>
rtl_tcp_signal_source_c_sptr;
using rtl_tcp_signal_source_c_sptr = boost::shared_ptr<rtl_tcp_signal_source_c>;
rtl_tcp_signal_source_c_sptr
rtl_tcp_make_signal_source_c(const std::string &address,
@ -78,7 +77,7 @@ public:
void set_if_gain(int gain);
private:
typedef boost::circular_buffer_space_optimized<float> buffer_type;
using buffer_type = boost::circular_buffer_space_optimized<float>;
friend rtl_tcp_signal_source_c_sptr
rtl_tcp_make_signal_source_c(const std::string &address,

View File

@ -73,7 +73,7 @@
class unpack_2bit_samples;
typedef boost::shared_ptr<unpack_2bit_samples> unpack_2bit_samples_sptr;
using unpack_2bit_samples_sptr = boost::shared_ptr<unpack_2bit_samples>;
unpack_2bit_samples_sptr make_unpack_2bit_samples(bool big_endian_bytes,
size_t item_size,

View File

@ -39,7 +39,7 @@
class unpack_byte_2bit_cpx_samples;
typedef boost::shared_ptr<unpack_byte_2bit_cpx_samples> unpack_byte_2bit_cpx_samples_sptr;
using unpack_byte_2bit_cpx_samples_sptr = boost::shared_ptr<unpack_byte_2bit_cpx_samples>;
unpack_byte_2bit_cpx_samples_sptr make_unpack_byte_2bit_cpx_samples();

View File

@ -35,7 +35,7 @@
class unpack_byte_2bit_samples;
typedef boost::shared_ptr<unpack_byte_2bit_samples> unpack_byte_2bit_samples_sptr;
using unpack_byte_2bit_samples_sptr = boost::shared_ptr<unpack_byte_2bit_samples>;
unpack_byte_2bit_samples_sptr make_unpack_byte_2bit_samples();

View File

@ -37,7 +37,7 @@
class unpack_byte_4bit_samples;
typedef boost::shared_ptr<unpack_byte_4bit_samples> unpack_byte_4bit_samples_sptr;
using unpack_byte_4bit_samples_sptr = boost::shared_ptr<unpack_byte_4bit_samples>;
unpack_byte_4bit_samples_sptr make_unpack_byte_4bit_samples();

View File

@ -35,7 +35,7 @@
class unpack_intspir_1bit_samples;
typedef boost::shared_ptr<unpack_intspir_1bit_samples> unpack_intspir_1bit_samples_sptr;
using unpack_intspir_1bit_samples_sptr = boost::shared_ptr<unpack_intspir_1bit_samples>;
unpack_intspir_1bit_samples_sptr make_unpack_intspir_1bit_samples();

View File

@ -36,7 +36,7 @@
class unpack_spir_gss6450_samples;
typedef boost::shared_ptr<unpack_spir_gss6450_samples> unpack_spir_gss6450_samples_sptr;
using unpack_spir_gss6450_samples_sptr = boost::shared_ptr<unpack_spir_gss6450_samples>;
unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples(unsigned int adc_nbit);

View File

@ -138,10 +138,7 @@ double rtl_tcp_dongle_info::clip_gain(int gain) const
{
return g;
}
else
{
return last_stop;
}
return last_stop;
}
last_stop = g;
}

View File

@ -49,7 +49,7 @@
class beidou_b1i_telemetry_decoder_cc;
typedef boost::shared_ptr<beidou_b1i_telemetry_decoder_cc> beidou_b1i_telemetry_decoder_cc_sptr;
using beidou_b1i_telemetry_decoder_cc_sptr = boost::shared_ptr<beidou_b1i_telemetry_decoder_cc>;
beidou_b1i_telemetry_decoder_cc_sptr beidou_b1i_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);

View File

@ -50,7 +50,7 @@
class galileo_telemetry_decoder_cc;
typedef boost::shared_ptr<galileo_telemetry_decoder_cc> galileo_telemetry_decoder_cc_sptr;
using galileo_telemetry_decoder_cc_sptr = boost::shared_ptr<galileo_telemetry_decoder_cc>;
galileo_telemetry_decoder_cc_sptr galileo_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, int frame_type, bool dump);

View File

@ -48,7 +48,7 @@
class glonass_l1_ca_telemetry_decoder_cc;
typedef boost::shared_ptr<glonass_l1_ca_telemetry_decoder_cc> glonass_l1_ca_telemetry_decoder_cc_sptr;
using glonass_l1_ca_telemetry_decoder_cc_sptr = boost::shared_ptr<glonass_l1_ca_telemetry_decoder_cc>;
glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);

View File

@ -47,7 +47,7 @@
class glonass_l2_ca_telemetry_decoder_cc;
typedef boost::shared_ptr<glonass_l2_ca_telemetry_decoder_cc> glonass_l2_ca_telemetry_decoder_cc_sptr;
using glonass_l2_ca_telemetry_decoder_cc_sptr = boost::shared_ptr<glonass_l2_ca_telemetry_decoder_cc>;
glonass_l2_ca_telemetry_decoder_cc_sptr glonass_l2_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);

View File

@ -42,7 +42,7 @@
class gps_l1_ca_telemetry_decoder_cc;
typedef boost::shared_ptr<gps_l1_ca_telemetry_decoder_cc> gps_l1_ca_telemetry_decoder_cc_sptr;
using gps_l1_ca_telemetry_decoder_cc_sptr = boost::shared_ptr<gps_l1_ca_telemetry_decoder_cc>;
gps_l1_ca_telemetry_decoder_cc_sptr
gps_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);

View File

@ -57,7 +57,7 @@ extern "C"
class gps_l2c_telemetry_decoder_cc;
typedef boost::shared_ptr<gps_l2c_telemetry_decoder_cc> gps_l2c_telemetry_decoder_cc_sptr;
using gps_l2c_telemetry_decoder_cc_sptr = boost::shared_ptr<gps_l2c_telemetry_decoder_cc>;
gps_l2c_telemetry_decoder_cc_sptr
gps_l2c_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);

View File

@ -53,7 +53,7 @@ extern "C"
class gps_l5_telemetry_decoder_cc;
typedef boost::shared_ptr<gps_l5_telemetry_decoder_cc> gps_l5_telemetry_decoder_cc_sptr;
using gps_l5_telemetry_decoder_cc_sptr = boost::shared_ptr<gps_l5_telemetry_decoder_cc>;
gps_l5_telemetry_decoder_cc_sptr
gps_l5_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);

View File

@ -46,7 +46,7 @@
class sbas_l1_telemetry_decoder_cc;
typedef boost::shared_ptr<sbas_l1_telemetry_decoder_cc> sbas_l1_telemetry_decoder_cc_sptr;
using sbas_l1_telemetry_decoder_cc_sptr = boost::shared_ptr<sbas_l1_telemetry_decoder_cc>;
sbas_l1_telemetry_decoder_cc_sptr
sbas_l1_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);

View File

@ -88,7 +88,7 @@ inline static int parity_counter(int symbol, int length)
inline static int nsc_enc_bit(int state_out_p[],
int input,
int state_in,
int g[],
const int g[],
int KK,
int nn)
{
@ -144,7 +144,7 @@ inline static void nsc_transit(int output_p[],
* \param[in] nn The length of the received vector
*
*/
inline static float Gamma(float rec_array[],
inline static float Gamma(const float rec_array[],
int symbol,
int nn)
{
@ -175,11 +175,11 @@ inline static float Gamma(float rec_array[],
*
*/
inline static void Viterbi(int output_u_int[],
int out0[],
int state0[],
int out1[],
int state1[],
double input_c[],
const int out0[],
const int state0[],
const int out1[],
const int state1[],
const double input_c[],
int KK,
int nn,
int LL)

View File

@ -47,7 +47,7 @@
class dll_pll_veml_tracking;
typedef boost::shared_ptr<dll_pll_veml_tracking> dll_pll_veml_tracking_sptr;
using dll_pll_veml_tracking_sptr = boost::shared_ptr<dll_pll_veml_tracking>;
dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_);

View File

@ -51,7 +51,7 @@
class Galileo_E1_Tcp_Connector_Tracking_cc;
typedef boost::shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc> galileo_e1_tcp_connector_tracking_cc_sptr;
using galileo_e1_tcp_connector_tracking_cc_sptr = boost::shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc>;
galileo_e1_tcp_connector_tracking_cc_sptr
galileo_e1_tcp_connector_make_tracking_cc(

View File

@ -53,8 +53,7 @@
class glonass_l1_ca_dll_pll_c_aid_tracking_cc;
typedef boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_cc>
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr;
using glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_cc>;
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(

View File

@ -54,8 +54,7 @@
class glonass_l1_ca_dll_pll_c_aid_tracking_sc;
typedef boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_sc>
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr;
using glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_sc>;
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr
glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(

View File

@ -50,8 +50,7 @@
class Glonass_L1_Ca_Dll_Pll_Tracking_cc;
typedef boost::shared_ptr<Glonass_L1_Ca_Dll_Pll_Tracking_cc>
glonass_l1_ca_dll_pll_tracking_cc_sptr;
using glonass_l1_ca_dll_pll_tracking_cc_sptr = boost::shared_ptr<Glonass_L1_Ca_Dll_Pll_Tracking_cc>;
glonass_l1_ca_dll_pll_tracking_cc_sptr
glonass_l1_ca_dll_pll_make_tracking_cc(

View File

@ -51,8 +51,7 @@
class glonass_l2_ca_dll_pll_c_aid_tracking_cc;
typedef boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_cc>
glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr;
using glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_cc>;
glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(

View File

@ -52,8 +52,7 @@
class glonass_l2_ca_dll_pll_c_aid_tracking_sc;
typedef boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_sc>
glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr;
using glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_sc>;
glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr
glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(

View File

@ -48,8 +48,7 @@
class Glonass_L2_Ca_Dll_Pll_Tracking_cc;
typedef boost::shared_ptr<Glonass_L2_Ca_Dll_Pll_Tracking_cc>
glonass_l2_ca_dll_pll_tracking_cc_sptr;
using glonass_l2_ca_dll_pll_tracking_cc_sptr = boost::shared_ptr<Glonass_L2_Ca_Dll_Pll_Tracking_cc>;
glonass_l2_ca_dll_pll_tracking_cc_sptr
glonass_l2_ca_dll_pll_make_tracking_cc(

View File

@ -51,8 +51,7 @@
class gps_l1_ca_dll_pll_c_aid_tracking_cc;
typedef boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_cc>
gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr;
using gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_cc>;
gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr
gps_l1_ca_dll_pll_c_aid_make_tracking_cc(

View File

@ -52,8 +52,7 @@
class gps_l1_ca_dll_pll_c_aid_tracking_sc;
typedef boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_sc>
gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr;
using gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<gps_l1_ca_dll_pll_c_aid_tracking_sc>;
gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr
gps_l1_ca_dll_pll_c_aid_make_tracking_sc(

View File

@ -53,8 +53,7 @@
class Gps_L1_Ca_Kf_Tracking_cc;
typedef boost::shared_ptr<Gps_L1_Ca_Kf_Tracking_cc>
gps_l1_ca_kf_tracking_cc_sptr;
using gps_l1_ca_kf_tracking_cc_sptr = boost::shared_ptr<Gps_L1_Ca_Kf_Tracking_cc>;
gps_l1_ca_kf_tracking_cc_sptr
gps_l1_ca_kf_make_tracking_cc(uint32_t order,

View File

@ -48,7 +48,7 @@
class Gps_L1_Ca_Tcp_Connector_Tracking_cc;
typedef boost::shared_ptr<Gps_L1_Ca_Tcp_Connector_Tracking_cc> gps_l1_ca_tcp_connector_tracking_cc_sptr;
using gps_l1_ca_tcp_connector_tracking_cc_sptr = boost::shared_ptr<Gps_L1_Ca_Tcp_Connector_Tracking_cc>;
gps_l1_ca_tcp_connector_tracking_cc_sptr
gps_l1_ca_tcp_connector_make_tracking_cc(

View File

@ -34,11 +34,11 @@ extern "C"
* instead of default local one.
* On error returns -1 and errno set to EINVAL
*/
time_t asn_GT2time(const GeneralizedTime_t *, struct tm *_optional_tm4fill,
time_t asn_GT2time(const GeneralizedTime_t * /*st*/, struct tm *_optional_tm4fill,
int as_gmt);
/* A version of the above function also returning the fractions of seconds */
time_t asn_GT2time_frac(const GeneralizedTime_t *,
time_t asn_GT2time_frac(const GeneralizedTime_t * /*st*/,
int *frac_value, int *frac_digits, /* (value / (10 ^ digits)) */
struct tm *_optional_tm4fill, int as_gmt);
@ -47,7 +47,7 @@ extern "C"
* For example, parsing of the time ending with ".1" seconds
* with frac_digits=3 (msec) would yield frac_value = 100.
*/
time_t asn_GT2time_prec(const GeneralizedTime_t *,
time_t asn_GT2time_prec(const GeneralizedTime_t * /*st*/,
int *frac_value, int frac_digits,
struct tm *_optional_tm4fill, int as_gmt);
@ -59,9 +59,9 @@ extern "C"
* On error, this function returns 0 and sets errno.
*/
GeneralizedTime_t *asn_time2GT(GeneralizedTime_t *_optional_gt,
const struct tm *, int force_gmt);
const struct tm * /*tm*/, int force_gmt);
GeneralizedTime_t *asn_time2GT_frac(GeneralizedTime_t *_optional_gt,
const struct tm *, int frac_value, int frac_digits, int force_gmt);
const struct tm * /*tm*/, int frac_value, int frac_digits, int force_gmt);
#ifdef __cplusplus
}

View File

@ -27,10 +27,10 @@ extern "C"
struct tm; /* <time.h> */
/* See asn_GT2time() in GeneralizedTime.h */
time_t asn_UT2time(const UTCTime_t *, struct tm *_optional_tm4fill, int as_gmt);
time_t asn_UT2time(const UTCTime_t * /*st*/, struct tm *_optional_tm4fill, int as_gmt);
/* See asn_time2GT() in GeneralizedTime.h */
UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm *, int force_gmt);
UTCTime_t *asn_time2UT(UTCTime_t *__opt_ut, const struct tm * /*tm*/, int force_gmt);
#ifdef __cplusplus
}

View File

@ -34,7 +34,7 @@ extern "C"
* Return values correspond to their libc counterparts (if any).
*/
ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen);
ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *);
ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE * /*f*/);
char *ber_tlv_tag_string(ber_tlv_tag_t tag);

View File

@ -43,7 +43,7 @@
class gnss_synchro_monitor;
typedef boost::shared_ptr<gnss_synchro_monitor> gnss_synchro_monitor_sptr;
using gnss_synchro_monitor_sptr = boost::shared_ptr<gnss_synchro_monitor>;
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
int output_rate_ms,

View File

@ -193,7 +193,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalSource(
role = "SignalSource" + std::to_string(ID);
}
}
catch (const std::exception &e)
catch (const std::exception& e)
{
LOG(WARNING) << e.what();
}
@ -222,7 +222,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalConditioner(
role_resampler = "Resampler" + std::to_string(ID);
}
}
catch (const std::exception &e)
catch (const std::exception& e)
{
LOG(WARNING) << e.what();
}
@ -259,16 +259,14 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalConditioner(
role_conditioner, "Signal_Conditioner"));
return conditioner_;
}
else
{
//single-antenna version
std::unique_ptr<GNSSBlockInterface> conditioner_(new SignalConditioner(configuration.get(),
GetBlock(configuration, role_datatypeadapter, data_type_adapter, 1, 1),
GetBlock(configuration, role_inputfilter, input_filter, 1, 1),
GetBlock(configuration, role_resampler, resampler, 1, 1),
role_conditioner, "Signal_Conditioner"));
return conditioner_;
}
//single-antenna version
std::unique_ptr<GNSSBlockInterface> conditioner_(new SignalConditioner(configuration.get(),
GetBlock(configuration, role_datatypeadapter, data_type_adapter, 1, 1),
GetBlock(configuration, role_inputfilter, input_filter, 1, 1),
GetBlock(configuration, role_resampler, resampler, 1, 1),
role_conditioner, "Signal_Conditioner"));
return conditioner_;
}
@ -1119,7 +1117,7 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
channel_absolute_id++;
}
}
catch (const std::exception &e)
catch (const std::exception& e)
{
LOG(WARNING) << e.what();
}
@ -1162,7 +1160,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1178,7 +1176,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1193,7 +1191,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1208,7 +1206,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1222,7 +1220,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1237,7 +1235,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1251,7 +1249,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1265,7 +1263,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);
@ -1280,7 +1278,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
block = std::move(block_);
}
catch (const std::exception &e)
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
exit(1);

View File

@ -47,18 +47,19 @@
class Gnss_Satellite
{
public:
Gnss_Satellite(); //!< Default Constructor.
Gnss_Satellite(const std::string& system_, uint32_t PRN_); //!< Concrete GNSS satellite Constructor.
~Gnss_Satellite(); //!< Default Destructor.
void update_PRN(uint32_t PRN); //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages
uint32_t get_PRN() const; //!< Gets satellite's PRN
int32_t get_rf_link() const; //!< Gets the satellite's rf link
std::string get_system() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"}
std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"}
std::string get_block() const; //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"}
std::string what_block(const std::string& system_, uint32_t PRN_); //!< Gets the block of a given satellite
friend bool operator==(const Gnss_Satellite&, const Gnss_Satellite&); //!< operator== for comparison
friend std::ostream& operator<<(std::ostream&, const Gnss_Satellite&); //!< operator<< for pretty printing
Gnss_Satellite(); //!< Default Constructor.
Gnss_Satellite(const std::string& system_, uint32_t PRN_); //!< Concrete GNSS satellite Constructor.
~Gnss_Satellite(); //!< Default Destructor.
void update_PRN(uint32_t PRN); //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages
uint32_t get_PRN() const; //!< Gets satellite's PRN
int32_t get_rf_link() const; //!< Gets the satellite's rf link
std::string get_system() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"}
std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"}
std::string get_block() const; //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"}
std::string what_block(const std::string& system_, uint32_t PRN_); //!< Gets the block of a given satellite
friend bool operator==(const Gnss_Satellite& /*sat1*/, const Gnss_Satellite& /*sat2*/); //!< operator== for comparison
friend std::ostream& operator<<(std::ostream& /*out*/, const Gnss_Satellite& /*sat*/); //!< operator<< for pretty printing
//Gnss_Satellite& operator=(const Gnss_Satellite &);
private:
uint32_t PRN;

View File

@ -52,10 +52,11 @@ public:
Gnss_Signal(const std::string& signal_);
Gnss_Signal(const Gnss_Satellite& satellite_, const std::string& signal_);
~Gnss_Signal();
std::string get_signal_str() const; //!< Get the satellite signal {"1C" for GPS L1 C/A, "2S" for GPS L2C (M), "L5" for GPS L5, "1G" for GLONASS L1 C/A, "1B" for Galileo E1B, "5X" for Galileo E5a.
Gnss_Satellite get_satellite() const; //!< Get the Gnss_Satellite associated to the signal
friend bool operator==(const Gnss_Signal&, const Gnss_Signal&); //!< operator== for comparison
friend std::ostream& operator<<(std::ostream&, const Gnss_Signal&); //!< operator<< for pretty printing
std::string get_signal_str() const; //!< Get the satellite signal {"1C" for GPS L1 C/A, "2S" for GPS L2C (M), "L5" for GPS L5, "1G" for GLONASS L1 C/A, "1B" for Galileo E1B, "5X" for Galileo E5a.
Gnss_Satellite get_satellite() const; //!< Get the Gnss_Satellite associated to the signal
friend bool operator==(const Gnss_Signal& /*sig1*/, const Gnss_Signal& /*sig2*/); //!< operator== for comparison
friend std::ostream& operator<<(std::ostream& /*out*/, const Gnss_Signal& /*sig*/); //!< operator<< for pretty printing
};
#endif

View File

@ -786,7 +786,7 @@ inline Gnuplot::Gnuplot(const std::vector<double> &x,
template <typename X>
Gnuplot &Gnuplot::plot_x(const X &x, const std::string &title)
{
if (x.size() == 0)
if (x.empty())
{
throw GnuplotException("std::vector too small");
return *this;
@ -794,7 +794,7 @@ Gnuplot &Gnuplot::plot_x(const X &x, const std::string &title)
std::ofstream tmp;
std::string name = create_tmpfile(tmp);
if (name == "")
if (name.empty())
return *this;
//
@ -819,7 +819,7 @@ Gnuplot &Gnuplot::plot_x(const X &x, const std::string &title)
template <typename X, typename Y>
Gnuplot &Gnuplot::plot_xy(const X &x, const Y &y, const std::string &title, const unsigned int decimate)
{
if (x.size() == 0 || y.size() == 0)
if (x.empty() || y.empty())
{
throw GnuplotException("std::vectors too small");
return *this;
@ -833,7 +833,7 @@ Gnuplot &Gnuplot::plot_xy(const X &x, const Y &y, const std::string &title, cons
std::ofstream tmp;
std::string name = create_tmpfile(tmp);
if (name == "")
if (name.empty())
return *this;
//
@ -875,7 +875,7 @@ Gnuplot &Gnuplot::plot_xy_err(const X &x,
std::ofstream tmp;
std::string name = create_tmpfile(tmp);
if (name == "")
if (name.empty())
return *this;
//
@ -904,14 +904,14 @@ Gnuplot &Gnuplot::plot_grid3d(const X &x,
const E &mag,
const std::string &title)
{
if (x.size() == 0 || y.size() == 0)
if (x.empty() || y.empty())
{
throw GnuplotException("std::vectors too small");
return *this;
}
std::ofstream tmp;
std::string name = create_tmpfile(tmp);
if (name == "")
if (name.empty())
return *this;
//
@ -937,7 +937,7 @@ Gnuplot &Gnuplot::plot_grid3d(const X &x,
cmdstr << " splot \"" << name << "\" u 1:2:3";
if (title == "")
if (title.empty())
cmdstr << " notitle with " << pstyle << " palette";
else
cmdstr << " title \"" << title << "\" with " << pstyle << " palette";
@ -961,7 +961,7 @@ Gnuplot &Gnuplot::plot_xyz(const X &x,
const Z &z,
const std::string &title)
{
if (x.size() == 0 || y.size() == 0 || z.size() == 0)
if (x.empty() || y.empty() || z.empty())
{
throw GnuplotException("std::vectors too small");
return *this;
@ -975,7 +975,7 @@ Gnuplot &Gnuplot::plot_xyz(const X &x,
std::ofstream tmp;
std::string name = create_tmpfile(tmp);
if (name == "")
if (name.empty())
return *this;
//
@ -1507,7 +1507,7 @@ Gnuplot &Gnuplot::plot_slope(const double a,
cmdstr << a << " * x + " << b << " title \"";
if (title == "")
if (title.empty())
cmdstr << "f(x) = " << a << " * x + " << b;
else
cmdstr << title;
@ -1541,7 +1541,7 @@ Gnuplot &Gnuplot::plot_equation(const std::string &equation,
cmdstr << equation << " title \"";
if (title == "")
if (title.empty())
cmdstr << "f(x) = " << equation;
else
cmdstr << title;
@ -1575,7 +1575,7 @@ Gnuplot &Gnuplot::plot_equation3d(const std::string &equation,
cmdstr << equation << " title \"";
if (title == "")
if (title.empty())
cmdstr << "f(x,y) = " << equation;
else
cmdstr << title;
@ -1615,12 +1615,12 @@ Gnuplot &Gnuplot::plotfile_x(const std::string &filename,
cmdstr << "\"" << filename << "\" using " << column;
if (title == "")
if (title.empty())
cmdstr << " notitle ";
else
cmdstr << " title \"" << title << "\" ";
if (smooth == "")
if (smooth.empty())
cmdstr << "with " << pstyle;
else
cmdstr << "smooth " << smooth;
@ -1660,12 +1660,12 @@ Gnuplot &Gnuplot::plotfile_xy(const std::string &filename,
cmdstr << "\"" << filename << "\" using " << column_x << ":" << column_y << " every " << std::to_string(decimate);
if (title == "")
if (title.empty())
cmdstr << " notitle ";
else
cmdstr << " title \"" << title << "\" ";
if (smooth == "")
if (smooth.empty())
cmdstr << "with " << pstyle;
else
cmdstr << "smooth " << smooth;
@ -1707,7 +1707,7 @@ Gnuplot &Gnuplot::plotfile_xy_err(const std::string &filename,
<< column_x << ":" << column_y << ":" << column_dy
<< " with errorbars ";
if (title == "")
if (title.empty())
cmdstr << " notitle ";
else
cmdstr << " title \"" << title << "\" ";
@ -1748,7 +1748,7 @@ Gnuplot &Gnuplot::plotfile_xyz(const std::string &filename,
cmdstr << "\"" << filename << "\" using " << column_x << ":" << column_y
<< ":" << column_z;
if (title == "")
if (title.empty())
cmdstr << " notitle with " << pstyle;
else
cmdstr << " title \"" << title << "\" with " << pstyle;
@ -1773,7 +1773,7 @@ Gnuplot &Gnuplot::plot_image(const unsigned char *ucPicBuf,
{
std::ofstream tmp;
std::string name = create_tmpfile(tmp);
if (name == "")
if (name.empty())
return *this;
//
@ -1801,7 +1801,7 @@ Gnuplot &Gnuplot::plot_image(const unsigned char *ucPicBuf,
else
cmdstr << "plot ";
if (title == "")
if (title.empty())
cmdstr << "\"" << name << "\" with image";
else
cmdstr << "\"" << name << "\" title \"" << title << "\" with image";
@ -1824,7 +1824,7 @@ Gnuplot &Gnuplot::plot_circle(double east, double north, double radius, const st
cmdstr << "set object circle at " + std::to_string(east) + "," + std::to_string(north) + " size " +
std::to_string(radius) + " back\n";
if (label != "")
if (!label.empty())
{
double east_label = (std::cos(M_PI / 3.0) * radius) * 1.1 + east;
double north_label = (std::sin(M_PI / 3.0) * radius) * 1.1 + north;
@ -2151,7 +2151,7 @@ std::string Gnuplot::create_tmpfile(std::ofstream &tmp)
void Gnuplot::remove_tmpfiles()
{
if ((tmpfile_list).size() > 0)
if (!(tmpfile_list).empty())
{
for (auto &i : tmpfile_list)
if (remove(i.c_str()) != 0)

View File

@ -37,7 +37,7 @@
TEST(CodeGenerationTest, CodeGenGPSL1Test)
{
std::complex<float>* _dest = new std::complex<float>[1023];
auto* _dest = new std::complex<float>[1023];
signed int _prn = 1;
unsigned int _chip_shift = 4;
@ -68,7 +68,7 @@ TEST(CodeGenerationTest, CodeGenGPSL1SampledTest)
const signed int _codeFreqBasis = 1023000; //Hz
const signed int _codeLength = 1023;
int _samplesPerCode = round(_fs / static_cast<double>(_codeFreqBasis / _codeLength));
std::complex<float>* _dest = new std::complex<float>[_samplesPerCode];
auto* _dest = new std::complex<float>[_samplesPerCode];
int iterations = 1000;
@ -96,7 +96,7 @@ TEST(CodeGenerationTest, ComplexConjugateTest)
const signed int _codeFreqBasis = 1023000; //Hz
const signed int _codeLength = 1023;
int _samplesPerCode = round(_fs / static_cast<double>(_codeFreqBasis / _codeLength));
std::complex<float>* _dest = new std::complex<float>[_samplesPerCode];
auto* _dest = new std::complex<float>[_samplesPerCode];
int iterations = 1000;

View File

@ -41,10 +41,10 @@ TEST(ComplexCarrierTest, StandardComplexImplementation)
{
// Dynamic allocation creates new usable space on the program STACK
// (an area of RAM specifically allocated to the program)
std::complex<float>* output = new std::complex<float>[FLAGS_size_carrier_test];
auto* output = new std::complex<float>[FLAGS_size_carrier_test];
const double _f = 2000.0;
const double _fs = 2000000.0;
const double phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
const auto phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
double phase = 0.0;
std::chrono::time_point<std::chrono::system_clock> start, end;
@ -84,7 +84,7 @@ TEST(ComplexCarrierTest, C11ComplexImplementation)
std::vector<std::complex<float>> output(FLAGS_size_carrier_test);
const double _f = 2000.0;
const double _fs = 2000000.0;
const double phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
const auto phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
double phase = 0.0;
std::chrono::time_point<std::chrono::system_clock> start, end;
@ -113,7 +113,7 @@ TEST(ComplexCarrierTest, C11ComplexImplementation)
TEST(ComplexCarrierTest, OwnComplexImplementation)
{
std::complex<float>* output = new std::complex<float>[FLAGS_size_carrier_test];
auto* output = new std::complex<float>[FLAGS_size_carrier_test];
double _f = 2000.0;
double _fs = 2000000.0;
std::chrono::time_point<std::chrono::system_clock> start, end;

View File

@ -41,8 +41,8 @@ DEFINE_int32(size_conjugate_test, 100000, "Size of the arrays used for conjugate
TEST(ConjugateTest, StandardCComplexImplementation)
{
std::complex<float>* input = new std::complex<float>[FLAGS_size_conjugate_test];
std::complex<float>* output = new std::complex<float>[FLAGS_size_conjugate_test];
auto* input = new std::complex<float>[FLAGS_size_conjugate_test];
auto* output = new std::complex<float>[FLAGS_size_conjugate_test];
std::fill_n(input, FLAGS_size_conjugate_test, std::complex<float>(0.0, 0.0));
std::chrono::time_point<std::chrono::system_clock> start, end;
@ -114,8 +114,8 @@ TEST(ConjugateTest, ArmadilloComplexImplementation)
TEST(ConjugateTest, VolkComplexImplementation)
{
std::complex<float>* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
std::complex<float>* output = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
auto* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
auto* output = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
std::fill_n(input, FLAGS_size_conjugate_test, std::complex<float>(0.0, 0.0));
std::chrono::time_point<std::chrono::system_clock> start, end;

View File

@ -112,7 +112,7 @@ TEST(FFTLengthTest, MeasureExecutionTime)
{
boost::filesystem::path p(gnuplot_executable);
boost::filesystem::path dir = p.parent_path();
std::string gnuplot_path = dir.native();
const std::string& gnuplot_path = dir.native();
Gnuplot::set_GNUPlotPath(gnuplot_path);
Gnuplot g1("linespoints");

View File

@ -46,8 +46,9 @@ TEST(FFTSpeedTest, ArmadilloVSGNURadioExecutionTime)
unsigned int fft_sizes[19] = {16, 25, 32, 45, 64, 95, 128, 195, 256, 325, 512, 785, 1024, 1503, 2048, 3127, 4096, 6349, 8192};
double d_execution_time;
EXPECT_NO_THROW(
for (int i = 0; i < 19; i++) {
d_fft_size = fft_sizes[i];
for (unsigned int fft_size
: fft_sizes) {
d_fft_size = fft_size;
gr::fft::fft_complex* d_gr_fft;
d_gr_fft = new gr::fft::fft_complex(d_fft_size, true);
arma::arma_rng::set_seed_random();

View File

@ -42,8 +42,8 @@ DEFINE_int32(size_magnitude_test, 100000, "Size of the arrays used for magnitude
TEST(MagnitudeSquaredTest, StandardCComplexImplementation)
{
std::complex<float>* input = new std::complex<float>[FLAGS_size_magnitude_test];
float* output = new float[FLAGS_size_magnitude_test];
auto* input = new std::complex<float>[FLAGS_size_magnitude_test];
auto* output = new float[FLAGS_size_magnitude_test];
unsigned int number = 0;
std::chrono::time_point<std::chrono::system_clock> start, end;
start = std::chrono::system_clock::now();
@ -114,9 +114,9 @@ TEST(MagnitudeSquaredTest, ArmadilloComplexImplementation)
TEST(MagnitudeSquaredTest, VolkComplexImplementation)
{
std::complex<float>* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
auto* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
std::fill_n(input, FLAGS_size_magnitude_test, std::complex<float>(0.0, 0.0));
float* output = static_cast<float*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(float), volk_gnsssdr_get_alignment()));
auto* output = static_cast<float*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(float), volk_gnsssdr_get_alignment()));
std::chrono::time_point<std::chrono::system_clock> start, end;
start = std::chrono::system_clock::now();

Some files were not shown because too many files have changed in this diff Show More