1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00
This commit is contained in:
Carles Fernandez 2018-12-03 23:34:29 +01:00
parent d95b89beae
commit eb6ff88cec
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
18 changed files with 33 additions and 44 deletions

View File

@ -31,7 +31,6 @@
#include "fir_filter.h" #include "fir_filter.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include <boost/lexical_cast.hpp>
#include <utility> #include <utility>
#include <gnuradio/filter/pm_remez.h> #include <gnuradio/filter/pm_remez.h>
#include <glog/logging.h> #include <glog/logging.h>
@ -369,23 +368,23 @@ void FirFilter::init()
double option_value; double option_value;
for (unsigned int i = 0; i < number_of_bands; i++) for (unsigned int i = 0; i < number_of_bands; i++)
{ {
option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_begin"; option = ".band" + std::to_string(i + 1) + "_begin";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
bands.push_back(option_value); bands.push_back(option_value);
option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_end"; option = ".band" + std::to_string(i + 1) + "_end";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
bands.push_back(option_value); bands.push_back(option_value);
option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_begin"; option = ".ampl" + std::to_string(i + 1) + "_begin";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
ampl.push_back(option_value); ampl.push_back(option_value);
option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_end"; option = ".ampl" + std::to_string(i + 1) + "_end";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
ampl.push_back(option_value); ampl.push_back(option_value);
option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_error"; option = ".band" + std::to_string(i + 1) + "_error";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
error_w.push_back(option_value); error_w.push_back(option_value);
} }
@ -399,7 +398,7 @@ void FirFilter::init()
// those bands, and the weight given to the error in those bands. // those bands, and the weight given to the error in those bands.
std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density); std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
taps_.reserve(taps_d.size()); taps_.reserve(taps_d.size());
for (double & it : taps_d) for (double& it : taps_d)
{ {
taps_.push_back(float(it)); taps_.push_back(float(it));
} }

View File

@ -31,7 +31,6 @@
#include "freq_xlating_fir_filter.h" #include "freq_xlating_fir_filter.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include <boost/lexical_cast.hpp>
#include <utility> #include <utility>
#include <gnuradio/blocks/file_sink.h> #include <gnuradio/blocks/file_sink.h>
#include <gnuradio/filter/pm_remez.h> #include <gnuradio/filter/pm_remez.h>
@ -84,23 +83,23 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
for (unsigned int i = 0; i < number_of_bands; i++) for (unsigned int i = 0; i < number_of_bands; i++)
{ {
option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_begin"; option = ".band" + std::to_string(i + 1) + "_begin";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
bands.push_back(option_value); bands.push_back(option_value);
option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_end"; option = ".band" + std::to_string(i + 1) + "_end";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
bands.push_back(option_value); bands.push_back(option_value);
option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_begin"; option = ".ampl" + std::to_string(i + 1) + "_begin";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
ampl.push_back(option_value); ampl.push_back(option_value);
option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_end"; option = ".ampl" + std::to_string(i + 1) + "_end";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
ampl.push_back(option_value); ampl.push_back(option_value);
option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_error"; option = ".band" + std::to_string(i + 1) + "_error";
option_value = config_->property(role_ + option, default_bands[i]); option_value = config_->property(role_ + option, default_bands[i]);
error_w.push_back(option_value); error_w.push_back(option_value);
} }
@ -108,7 +107,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
int grid_density = config_->property(role_ + ".grid_density", default_grid_density); int grid_density = config_->property(role_ + ".grid_density", default_grid_density);
taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density); taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
taps_.reserve(taps_d.size()); taps_.reserve(taps_d.size());
for (double & it : taps_d) for (double& it : taps_d)
{ {
taps_.push_back(static_cast<float>(it)); taps_.push_back(static_cast<float>(it));
} }

View File

@ -92,14 +92,14 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
for (int i = 0; i < RF_channels_; i++) for (int i = 0; i < RF_channels_; i++)
{ {
// Single RF channel UHD operation (backward compatible config file format) // Single RF channel UHD operation (backward compatible config file format)
samples_.push_back(configuration->property(role + ".samples" + boost::lexical_cast<std::string>(i), 0)); samples_.push_back(configuration->property(role + ".samples" + std::to_string(i), 0));
dump_.push_back(configuration->property(role + ".dump" + boost::lexical_cast<std::string>(i), false)); dump_.push_back(configuration->property(role + ".dump" + std::to_string(i), false));
dump_filename_.push_back(configuration->property(role + ".dump_filename" + boost::lexical_cast<std::string>(i), default_dump_file)); dump_filename_.push_back(configuration->property(role + ".dump_filename" + std::to_string(i), default_dump_file));
freq_.push_back(configuration->property(role + ".freq" + boost::lexical_cast<std::string>(i), GPS_L1_FREQ_HZ)); freq_.push_back(configuration->property(role + ".freq" + std::to_string(i), GPS_L1_FREQ_HZ));
gain_.push_back(configuration->property(role + ".gain" + boost::lexical_cast<std::string>(i), 50.0)); gain_.push_back(configuration->property(role + ".gain" + std::to_string(i), 50.0));
IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz" + boost::lexical_cast<std::string>(i), sample_rate_ / 2)); IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz" + std::to_string(i), sample_rate_ / 2));
} }
} }
// 1. Make the uhd driver instance // 1. Make the uhd driver instance

View File

@ -439,7 +439,7 @@ void galileo_telemetry_decoder_cc::set_channel(int32_t channel)
try try
{ {
d_dump_filename = "telemetry"; d_dump_filename = "telemetry";
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -244,7 +244,7 @@ void glonass_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel)
try try
{ {
d_dump_filename = "telemetry"; d_dump_filename = "telemetry";
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -244,7 +244,7 @@ void glonass_l2_ca_telemetry_decoder_cc::set_channel(int32_t channel)
try try
{ {
d_dump_filename = "telemetry"; d_dump_filename = "telemetry";
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -167,7 +167,7 @@ void gps_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel)
try try
{ {
d_dump_filename = "telemetry"; d_dump_filename = "telemetry";
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -109,7 +109,7 @@ void gps_l2c_telemetry_decoder_cc::set_channel(int channel)
try try
{ {
d_dump_filename = "telemetry_L2CM_"; d_dump_filename = "telemetry_L2CM_";
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -121,7 +121,7 @@ void gps_l5_telemetry_decoder_cc::set_channel(int32_t channel)
try try
{ {
d_dump_filename = "telemetry_L5_"; d_dump_filename = "telemetry_L5_";
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -43,7 +43,6 @@
#include "lock_detectors.h" #include "lock_detectors.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <matio.h> #include <matio.h>
@ -567,7 +566,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -44,7 +44,6 @@
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <matio.h> #include <matio.h>
#include <pmt/pmt.h> #include <pmt/pmt.h>
@ -558,7 +557,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -43,7 +43,6 @@
#include "lock_detectors.h" #include "lock_detectors.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <matio.h> #include <matio.h>
@ -519,7 +518,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -41,7 +41,6 @@
#include "GLONASS_L1_L2_CA.h" #include "GLONASS_L1_L2_CA.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <matio.h> #include <matio.h>
@ -564,7 +563,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -42,7 +42,6 @@
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <matio.h> #include <matio.h>
#include <pmt/pmt.h> #include <pmt/pmt.h>
@ -557,7 +556,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -43,7 +43,6 @@
#include "GLONASS_L1_L2_CA.h" #include "GLONASS_L1_L2_CA.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <matio.h> #include <matio.h>
@ -519,7 +518,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -35,7 +35,6 @@
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <matio.h> #include <matio.h>
@ -546,7 +545,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -36,7 +36,6 @@
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <pmt/pmt.h> #include <pmt/pmt.h>
#include <glog/logging.h> #include <glog/logging.h>
@ -548,7 +547,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);

View File

@ -44,7 +44,6 @@
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "control_message_factory.h" #include "control_message_factory.h"
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <volk_gnsssdr/volk_gnsssdr.h> #include <volk_gnsssdr/volk_gnsssdr.h>
@ -648,7 +647,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::set_channel(uint32_t channel)
{ {
try try
{ {
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);