1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-04-29 14:13:11 +00:00

Code cleaning

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@277 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Carles Fernandez 2012-11-01 17:40:26 +00:00
parent 3b489d0107
commit aff4aeefb5
6 changed files with 70 additions and 118 deletions

View File

@ -165,9 +165,11 @@ void FirFilter::init()
std::string filter_type = config_->property(role_ + ".filter_type", default_filter_type); std::string filter_type = config_->property(role_ + ".filter_type", default_filter_type);
int grid_density = config_->property(role_ + ".grid_density", default_grid_density); int grid_density = config_->property(role_ + ".grid_density", default_grid_density);
// gr_remez implements the Parks-McClellan FIR filter design.
std::vector<double> taps_d = gr_remez(number_of_taps - 1, bands, ampl, // It calculates the optimal (in the Chebyshev/minimax sense) FIR filter
error_w, filter_type, grid_density); // impulse response given a set of band edges, the desired response on
// those bands, and the weight given to the error in those bands.
std::vector<double> taps_d = gr_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
taps_.reserve(taps_d.size()); taps_.reserve(taps_d.size());
for (std::vector<double>::iterator it = taps_d.begin(); it != taps_d.end(); it++) for (std::vector<double>::iterator it = taps_d.begin(); it != taps_d.end(); it++)
{ {

View File

@ -6,7 +6,7 @@
* *
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
* *
* Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors) * Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
* *
* GNSS-SDR is a software defined Global Navigation * GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver * Satellite Systems receiver
@ -53,30 +53,24 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configu
out_streams_(out_streams), out_streams_(out_streams),
queue_(queue) queue_(queue)
{ {
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./navigation.dat"; std::string default_dump_filename = "./navigation.dat";
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
DLOG(INFO) << "vector length " << vector_length_; DLOG(INFO) << "vector length " << vector_length_;
vector_length_ = configuration->property(role + ".vector_length", 2048); vector_length_ = configuration->property(role + ".vector_length", 2048);
dump_ = configuration->property(role + ".dump", false); dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
int fs_in; int fs_in;
fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
// make telemetry decoder object
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, 0, (long)fs_in, vector_length_, queue_, dump_); // TODO fix me telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, 0, (long)fs_in, vector_length_, queue_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
// set the navigation msg queue; // set the navigation msg queue;
telemetry_decoder_->set_navigation_queue(&global_gps_nav_msg_queue); telemetry_decoder_->set_navigation_queue(&global_gps_nav_msg_queue);
DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")"; DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")";
} }
GpsL1CaTelemetryDecoder::~GpsL1CaTelemetryDecoder() GpsL1CaTelemetryDecoder::~GpsL1CaTelemetryDecoder()
{} {}
@ -95,6 +89,7 @@ void GpsL1CaTelemetryDecoder::connect(gr_top_block_sptr top_block)
DLOG(INFO) << "nothing to connect internally"; DLOG(INFO) << "nothing to connect internally";
} }
void GpsL1CaTelemetryDecoder::disconnect(gr_top_block_sptr top_block) void GpsL1CaTelemetryDecoder::disconnect(gr_top_block_sptr top_block)
{ {
// Nothing to disconnect // Nothing to disconnect
@ -106,6 +101,7 @@ gr_basic_block_sptr GpsL1CaTelemetryDecoder::get_left_block()
return telemetry_decoder_; return telemetry_decoder_;
} }
gr_basic_block_sptr GpsL1CaTelemetryDecoder::get_right_block() gr_basic_block_sptr GpsL1CaTelemetryDecoder::get_right_block()
{ {
return telemetry_decoder_; return telemetry_decoder_;

View File

@ -129,7 +129,6 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
d_GPS_frame_4bytes = 0; d_GPS_frame_4bytes = 0;
d_prev_GPS_frame_4bytes = 0; d_prev_GPS_frame_4bytes = 0;
d_flag_parity = false; d_flag_parity = false;
//set_history(d_samples_per_bit*8); // At least a history of 8 bits are needed to correlate with the preamble //set_history(d_samples_per_bit*8); // At least a history of 8 bits are needed to correlate with the preamble
} }
@ -145,12 +144,10 @@ gps_l1_ca_telemetry_decoder_cc::~gps_l1_ca_telemetry_decoder_cc()
bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(unsigned int gpsword) bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(unsigned int gpsword)
{ {
unsigned int d1, d2, d3, d4, d5, d6, d7, t, parity; unsigned int d1, d2, d3, d4, d5, d6, d7, t, parity;
/* XOR as many bits in parallel as possible. The magic constants pick /* XOR as many bits in parallel as possible. The magic constants pick
up bits which are to be XOR'ed together to implement the GPS parity up bits which are to be XOR'ed together to implement the GPS parity
check algorithm described in IS-GPS-200E. This avoids lengthy shift- check algorithm described in IS-GPS-200E. This avoids lengthy shift-
and-xor loops. */ and-xor loops. */
d1 = gpsword & 0xFBFFBF00; d1 = gpsword & 0xFBFFBF00;
d2 = _lrotl(gpsword,1) & 0x07FFBF01; d2 = _lrotl(gpsword,1) & 0x07FFBF01;
d3 = _lrotl(gpsword,2) & 0xFC0F8100; d3 = _lrotl(gpsword,2) & 0xFC0F8100;
@ -158,9 +155,7 @@ bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(unsigned int gpsword)
d5 = _lrotl(gpsword,4) & 0xFC00000E; d5 = _lrotl(gpsword,4) & 0xFC00000E;
d6 = _lrotl(gpsword,5) & 0x07F00001; d6 = _lrotl(gpsword,5) & 0x07F00001;
d7 = _lrotl(gpsword,6) & 0x00003000; d7 = _lrotl(gpsword,6) & 0x00003000;
t = d1 ^ d2 ^ d3 ^ d4 ^ d5 ^ d6 ^ d7; t = d1 ^ d2 ^ d3 ^ d4 ^ d5 ^ d6 ^ d7;
// Now XOR the 5 6-bit fields together to produce the 6-bit final result. // Now XOR the 5 6-bit fields together to produce the 6-bit final result.
parity = t ^ _lrotl(t,6) ^ _lrotl(t,12) ^ _lrotl(t,18) ^ _lrotl(t,24); parity = t ^ _lrotl(t,6) ^ _lrotl(t,12) ^ _lrotl(t,18) ^ _lrotl(t,24);
parity = parity & 0x3F; parity = parity & 0x3F;
@ -243,9 +238,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
} }
} }
} }
//******* SYMBOL TO BIT ******* //******* SYMBOL TO BIT *******
d_symbol_accumulator += in[0][d_samples_per_bit*8 - 1].Prompt_I; // accumulate the input value in d_symbol_accumulator d_symbol_accumulator += in[0][d_samples_per_bit*8 - 1].Prompt_I; // accumulate the input value in d_symbol_accumulator
d_symbol_accumulator_counter++; d_symbol_accumulator_counter++;
if (d_symbol_accumulator_counter == 20) if (d_symbol_accumulator_counter == 20)
@ -256,7 +249,6 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
} }
d_symbol_accumulator = 0; d_symbol_accumulator = 0;
d_symbol_accumulator_counter = 0; d_symbol_accumulator_counter = 0;
//******* bits to words ****** //******* bits to words ******
d_frame_bit_index++; d_frame_bit_index++;
if (d_frame_bit_index == 30) if (d_frame_bit_index == 30)
@ -301,12 +293,9 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
d_GPS_frame_4bytes<<=1; //shift 1 bit left the telemetry word d_GPS_frame_4bytes<<=1; //shift 1 bit left the telemetry word
} }
} }
// output the frame // output the frame
consume_each(1); //one by one consume_each(1); //one by one
Gnss_Synchro current_synchro_data; //structure to save the synchronization information and send the output object to the next block Gnss_Synchro current_synchro_data; //structure to save the synchronization information and send the output object to the next block
//1. Copy the current tracking output //1. Copy the current tracking output
current_synchro_data=in[0][0]; current_synchro_data=in[0][0];
//2. Add the telemetry decoder information //2. Add the telemetry decoder information
@ -315,7 +304,6 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
current_synchro_data.Preamble_timestamp_ms = d_preamble_time_seconds * 1000.0; current_synchro_data.Preamble_timestamp_ms = d_preamble_time_seconds * 1000.0;
current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0; current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0;
current_synchro_data.Preamble_symbol_counter = fmod((double)(d_sample_counter - d_preamble_index), 6000); //not corrected the preamble correlation lag! -> to be taken into account in TX Time current_synchro_data.Preamble_symbol_counter = fmod((double)(d_sample_counter - d_preamble_index), 6000); //not corrected the preamble correlation lag! -> to be taken into account in TX Time
if(d_dump == true) if(d_dump == true)
{ {
// MULTIPLEXED FILE RECORDING - Record results to file // MULTIPLEXED FILE RECORDING - Record results to file
@ -334,7 +322,6 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
std::cout << "Exception writing observables dump file " << e.what() << std::endl; std::cout << "Exception writing observables dump file " << e.what() << std::endl;
} }
} }
//3. Make the output (copy the object contents to the GNURadio reserved memory) //3. Make the output (copy the object contents to the GNURadio reserved memory)
*out[0] = current_synchro_data; *out[0] = current_synchro_data;
return 1; return 1;

View File

@ -52,7 +52,6 @@ template<typename Data>class concurrent_queue;
*/ */
class AcquisitionInterface: public GNSSBlockInterface class AcquisitionInterface: public GNSSBlockInterface
{ {
public: public:
//virtual void set_active(bool active) = 0; //virtual void set_active(bool active) = 0;
virtual void set_gnss_synchro(Gnss_Synchro* gnss_synchro) = 0; virtual void set_gnss_synchro(Gnss_Synchro* gnss_synchro) = 0;

View File

@ -68,7 +68,6 @@ public:
{ {
return false; return false;
} }
popped_value = the_queue.front(); popped_value = the_queue.front();
the_queue.pop(); the_queue.pop();
return true; return true;
@ -81,10 +80,8 @@ public:
{ {
the_condition_variable.wait(lock); the_condition_variable.wait(lock);
} }
popped_value = the_queue.front(); popped_value = the_queue.front();
the_queue.pop(); the_queue.pop();
} }
}; };
#endif #endif

View File

@ -77,33 +77,30 @@ using google::LogMessage;
GNSSBlockFactory::GNSSBlockFactory() GNSSBlockFactory::GNSSBlockFactory()
{ {}
}
GNSSBlockFactory::~GNSSBlockFactory() GNSSBlockFactory::~GNSSBlockFactory()
{ {}
}
GNSSBlockInterface* GNSSBlockFactory::GetSignalSource( GNSSBlockInterface* GNSSBlockFactory::GetSignalSource(
ConfigurationInterface *configuration, gr_msg_queue_sptr queue) ConfigurationInterface *configuration, gr_msg_queue_sptr queue)
{ {
std::string default_implementation = "File_Signal_Source"; std::string default_implementation = "File_Signal_Source";
std::string implementation = configuration->property( std::string implementation = configuration->property(
"SignalSource.implementation", default_implementation); "SignalSource.implementation", default_implementation);
DLOG(INFO) << "Getting SignalSource with implementation " DLOG(INFO) << "Getting SignalSource with implementation "
<< implementation; << implementation;
return GetBlock(configuration, "SignalSource", implementation, 0, 1, return GetBlock(configuration, "SignalSource", implementation, 0, 1,
queue); queue);
} }
GNSSBlockInterface* GNSSBlockFactory::GetSignalConditioner( GNSSBlockInterface* GNSSBlockFactory::GetSignalConditioner(
ConfigurationInterface *configuration, gr_msg_queue_sptr queue) ConfigurationInterface *configuration, gr_msg_queue_sptr queue)
{ {
std::string default_implementation = "Pass_Through"; std::string default_implementation = "Pass_Through";
std::string signal_conditioner = configuration->property( std::string signal_conditioner = configuration->property(
"SignalConditioner.implementation", default_implementation); "SignalConditioner.implementation", default_implementation);
@ -126,7 +123,6 @@ GNSSBlockInterface* GNSSBlockFactory::GetSignalConditioner(
"Resampler.implementation", default_implementation); "Resampler.implementation", default_implementation);
} }
DLOG(INFO) << "Getting SignalConditioner with DataTypeAdapter implementation: " DLOG(INFO) << "Getting SignalConditioner with DataTypeAdapter implementation: "
<< data_type_adapter << ", InputFilter implementation: " << data_type_adapter << ", InputFilter implementation: "
<< input_filter << ", and Resampler implementation: " << input_filter << ", and Resampler implementation: "
@ -137,71 +133,61 @@ GNSSBlockInterface* GNSSBlockFactory::GetSignalConditioner(
configuration,"InputFilter", input_filter, 1, 1, queue), configuration,"InputFilter", input_filter, 1, 1, queue),
GetBlock(configuration,"Resampler", resampler, 1, 1, queue), GetBlock(configuration,"Resampler", resampler, 1, 1, queue),
"SignalConditioner", "Signal_Conditioner", queue); "SignalConditioner", "Signal_Conditioner", queue);
} }
GNSSBlockInterface* GNSSBlockFactory::GetObservables( GNSSBlockInterface* GNSSBlockFactory::GetObservables(
ConfigurationInterface *configuration, gr_msg_queue_sptr queue) ConfigurationInterface *configuration, gr_msg_queue_sptr queue)
{ {
std::string default_implementation = "GPS_L1_CA_Observables"; std::string default_implementation = "GPS_L1_CA_Observables";
std::string implementation = configuration->property( std::string implementation = configuration->property(
"Observables.implementation", default_implementation); "Observables.implementation", default_implementation);
DLOG(INFO) << "Getting Observables with implementation " DLOG(INFO) << "Getting Observables with implementation "
<< implementation; << implementation;
unsigned int channel_count = unsigned int channel_count =
configuration->property("Channels.count", 12); configuration->property("Channels.count", 12);
return GetBlock(configuration, "Observables", implementation, return GetBlock(configuration, "Observables", implementation,
channel_count, channel_count, queue); channel_count, channel_count, queue);
} }
GNSSBlockInterface* GNSSBlockFactory::GetPVT( GNSSBlockInterface* GNSSBlockFactory::GetPVT(
ConfigurationInterface *configuration, gr_msg_queue_sptr queue) ConfigurationInterface *configuration, gr_msg_queue_sptr queue)
{ {
std::string default_implementation = "Pass_Through"; std::string default_implementation = "Pass_Through";
std::string implementation = configuration->property( std::string implementation = configuration->property(
"PVT.implementation", default_implementation); "PVT.implementation", default_implementation);
DLOG(INFO) << "Getting PVT with implementation " << implementation; DLOG(INFO) << "Getting PVT with implementation " << implementation;
unsigned int channel_count = configuration->property("Channels.count", 12);
unsigned int channel_count =
configuration->property("Channels.count", 12);
return GetBlock(configuration, "PVT", implementation, channel_count, 1, return GetBlock(configuration, "PVT", implementation, channel_count, 1,
queue); queue);
} }
GNSSBlockInterface* GNSSBlockFactory::GetOutputFilter( GNSSBlockInterface* GNSSBlockFactory::GetOutputFilter(
ConfigurationInterface *configuration, gr_msg_queue_sptr queue) ConfigurationInterface *configuration, gr_msg_queue_sptr queue)
{ {
std::string default_implementation = "Null_Sink_Output_Filter"; std::string default_implementation = "Null_Sink_Output_Filter";
std::string implementation = configuration->property( std::string implementation = configuration->property(
"OutputFilter.implementation", default_implementation); "OutputFilter.implementation", default_implementation);
DLOG(INFO) << "Getting OutputFilter with implementation " << implementation;
DLOG(INFO) << "Getting OutputFilter with implementation "
<< implementation;
return GetBlock(configuration, "OutputFilter", implementation, 1, 0, return GetBlock(configuration, "OutputFilter", implementation, 1, 0,
queue); queue);
} }
GNSSBlockInterface* GNSSBlockFactory::GetChannel( GNSSBlockInterface* GNSSBlockFactory::GetChannel(
ConfigurationInterface *configuration, std::string acq, ConfigurationInterface *configuration, std::string acq,
std::string trk, std::string tlm, int channel, std::string trk, std::string tlm, int channel,
gr_msg_queue_sptr queue) gr_msg_queue_sptr queue)
{ {
std::stringstream stream; std::stringstream stream;
stream << channel; stream << channel;
std::string id = stream.str(); std::string id = stream.str();
DLOG(INFO) << "Instantiating channel " << id; DLOG(INFO) << "Instantiating channel " << id;
return new Channel(configuration, channel, GetBlock(configuration, return new Channel(configuration, channel, GetBlock(configuration,
"Channel", "Pass_Through", 1, 1, queue), "Channel", "Pass_Through", 1, 1, queue),
(AcquisitionInterface*)GetBlock(configuration, "Acquisition", (AcquisitionInterface*)GetBlock(configuration, "Acquisition",
@ -212,23 +198,22 @@ GNSSBlockInterface* GNSSBlockFactory::GetChannel(
"Channel", queue); "Channel", queue);
} }
std::vector<GNSSBlockInterface*>* GNSSBlockFactory::GetChannels( std::vector<GNSSBlockInterface*>* GNSSBlockFactory::GetChannels(
ConfigurationInterface *configuration, gr_msg_queue_sptr queue) ConfigurationInterface *configuration, gr_msg_queue_sptr queue)
{ {
std::string default_implementation = "Pass_Through"; std::string default_implementation = "Pass_Through";
unsigned int channel_count = unsigned int channel_count =
configuration->property("Channels.count", 12); configuration->property("Channels.count", 12);
std::vector<GNSSBlockInterface*>* channels = new std::vector< std::vector<GNSSBlockInterface*>* channels = new std::vector<
GNSSBlockInterface*>(); GNSSBlockInterface*>();
std::string tracking = configuration->property("Tracking.implementation", std::string tracking = configuration->property("Tracking.implementation",
default_implementation); default_implementation);
std::string telemetry_decoder = configuration->property( std::string telemetry_decoder = configuration->property(
"TelemetryDecoder.implementation", default_implementation); "TelemetryDecoder.implementation", default_implementation);
for (unsigned int i = 0; i < channel_count; i++) for (unsigned int i = 0; i < channel_count; i++)
{ {
std::string acquisition_implementation_name = "Acquisition" std::string acquisition_implementation_name = "Acquisition"
+ boost::lexical_cast<std::string>(i) + ".implementation"; + boost::lexical_cast<std::string>(i) + ".implementation";
std::string acquisition_implementation = configuration->property( std::string acquisition_implementation = configuration->property(
@ -241,10 +226,8 @@ std::vector<GNSSBlockInterface*>* GNSSBlockFactory::GetChannels(
// << acquisition_implementation << std::endl; // << acquisition_implementation << std::endl;
} }
DLOG(INFO) << "Getting " << channel_count << " channels"; DLOG(INFO) << "Getting " << channel_count << " channels";
return channels; return channels;
} }
@ -253,7 +236,6 @@ std::vector<GNSSBlockInterface*>* GNSSBlockFactory::GetChannels(
* *
* PLEASE ADD YOUR NEW BLOCK HERE!! * PLEASE ADD YOUR NEW BLOCK HERE!!
*/ */
GNSSBlockInterface* GNSSBlockFactory::GetBlock( GNSSBlockInterface* GNSSBlockFactory::GetBlock(
ConfigurationInterface *configuration, std::string role, ConfigurationInterface *configuration, std::string role,
std::string implementation, unsigned int in_streams, std::string implementation, unsigned int in_streams,
@ -262,11 +244,9 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
GNSSBlockInterface* block = NULL; //Change to nullptr when available in compilers (C++11) GNSSBlockInterface* block = NULL; //Change to nullptr when available in compilers (C++11)
//PASS THROUGH ---------------------------------------------------------------- //PASS THROUGH ----------------------------------------------------------------
if (implementation.compare("Pass_Through") == 0) if (implementation.compare("Pass_Through") == 0)
{ {
block = new Pass_Through(configuration, role, in_streams, out_streams); block = new Pass_Through(configuration, role, in_streams, out_streams);
} }
// SIGNAL SOURCES ------------------------------------------------------------- // SIGNAL SOURCES -------------------------------------------------------------
@ -285,7 +265,6 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
exit(1); exit(1);
} }
} }
else if (implementation.compare("UHD_Signal_Source") == 0) else if (implementation.compare("UHD_Signal_Source") == 0)
{ {
block = new UhdSignalSource(configuration, role, in_streams, block = new UhdSignalSource(configuration, role, in_streams,
@ -313,6 +292,7 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
block = new IshortToComplex(configuration, role, in_streams, block = new IshortToComplex(configuration, role, in_streams,
out_streams, queue); out_streams, queue);
} }
// INPUT FILTER ---------------------------------------------------------------- // INPUT FILTER ----------------------------------------------------------------
else if (implementation.compare("Fir_Filter") == 0) else if (implementation.compare("Fir_Filter") == 0)
{ {
@ -326,8 +306,6 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
} }
// RESAMPLER ------------------------------------------------------------------- // RESAMPLER -------------------------------------------------------------------
else if (implementation.compare("Direct_Resampler") == 0) else if (implementation.compare("Direct_Resampler") == 0)
{ {
block = new DirectResamplerConditioner(configuration, role, block = new DirectResamplerConditioner(configuration, role,
@ -335,7 +313,6 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
} }
// ACQUISITION BLOCKS --------------------------------------------------------- // ACQUISITION BLOCKS ---------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0) else if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0)
{ {
block = new GpsL1CaPcpsAcquisition(configuration, role, in_streams, block = new GpsL1CaPcpsAcquisition(configuration, role, in_streams,
@ -348,7 +325,6 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
} }
// TRACKING BLOCKS ------------------------------------------------------------- // TRACKING BLOCKS -------------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0) else if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0)
{ {
block = new GpsL1CaDllPllTracking(configuration, role, in_streams, block = new GpsL1CaDllPllTracking(configuration, role, in_streams,
@ -381,13 +357,11 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
} }
// TELEMETRY DECODERS ---------------------------------------------------------- // TELEMETRY DECODERS ----------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0) else if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0)
{ {
block = new GpsL1CaTelemetryDecoder(configuration, role, in_streams, block = new GpsL1CaTelemetryDecoder(configuration, role, in_streams,
out_streams, queue); out_streams, queue);
} }
// OBSERVABLES ----------------------------------------------------------------- // OBSERVABLES -----------------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_Observables") == 0) else if (implementation.compare("GPS_L1_CA_Observables") == 0)
{ {
@ -396,7 +370,6 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
} }
// PVT ------------------------------------------------------------------------- // PVT -------------------------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_PVT") == 0) else if (implementation.compare("GPS_L1_CA_PVT") == 0)
{ {
block = new GpsL1CaPvt(configuration, role, in_streams, block = new GpsL1CaPvt(configuration, role, in_streams,
@ -414,13 +387,11 @@ GNSSBlockInterface* GNSSBlockFactory::GetBlock(
block = new FileOutputFilter(configuration, role, in_streams, block = new FileOutputFilter(configuration, role, in_streams,
out_streams); out_streams);
} }
else else
{ {
// Log fatal. This causes execution to stop. // Log fatal. This causes execution to stop.
LOG_AT_LEVEL(ERROR) << implementation LOG_AT_LEVEL(ERROR) << implementation
<< ": Undefined implementation for block"; << ": Undefined implementation for block";
} }
return block; return block;
} }