From 05f8b78751f6b6cf0680240c2f33f0e521f35f95 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 3 Nov 2016 19:33:04 +0100 Subject: [PATCH] Change blocks name from L2_M to L2C --- conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf | 6 +-- conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf | 6 +-- ...l_GPS_L1_L2_Flexiband_realtime_III_1b.conf | 6 +-- ...Galileo_E1B_Flexiband_bin_file_III_1b.conf | 2 +- ...el_GPS_L2_M_Flexiband_bin_file_III_1b.conf | 6 +-- .../telemetry_decoder/adapters/CMakeLists.txt | 2 +- ...ecoder.cc => gps_l2c_telemetry_decoder.cc} | 20 ++++---- ..._decoder.h => gps_l2c_telemetry_decoder.h} | 22 ++++----- .../gnuradio_blocks/CMakeLists.txt | 2 +- ..._cc.cc => gps_l2c_telemetry_decoder_cc.cc} | 46 +++++++++---------- ...er_cc.h => gps_l2c_telemetry_decoder_cc.h} | 26 +++++------ src/core/receiver/gnss_block_factory.cc | 12 +++-- 12 files changed, 81 insertions(+), 75 deletions(-) rename src/algorithms/telemetry_decoder/adapters/{gps_l2_m_telemetry_decoder.cc => gps_l2c_telemetry_decoder.cc} (82%) rename src/algorithms/telemetry_decoder/adapters/{gps_l2_m_telemetry_decoder.h => gps_l2c_telemetry_decoder.h} (79%) rename src/algorithms/telemetry_decoder/gnuradio_blocks/{gps_l2_m_telemetry_decoder_cc.cc => gps_l2c_telemetry_decoder_cc.cc} (91%) rename src/algorithms/telemetry_decoder/gnuradio_blocks/{gps_l2_m_telemetry_decoder_cc.h => gps_l2c_telemetry_decoder_cc.h} (86%) diff --git a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf index f38f8c7ef..3b2629bdd 100644 --- a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf +++ b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf @@ -178,18 +178,18 @@ Tracking_2S.order=3; Tracking_2S.early_late_space_chips=0.5; ;######### TELEMETRY DECODER GPS CONFIG ############ -TelemetryDecoder_2S.implementation=GPS_L2_M_Telemetry_Decoder +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder TelemetryDecoder_2S.dump=false TelemetryDecoder_2S.decimation_factor=1; ;######### OBSERVABLES CONFIG ############. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=10 PVT.flag_averaging=true PVT.output_rate_ms=100 diff --git a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf index 6a23d3dc0..838b7d505 100644 --- a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf @@ -134,18 +134,18 @@ Tracking_2S.order=2; Tracking_2S.early_late_space_chips=0.5; ;######### TELEMETRY DECODER GPS CONFIG ############ -TelemetryDecoder_2S.implementation=GPS_L2_M_Telemetry_Decoder +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder TelemetryDecoder_2S.dump=true TelemetryDecoder_2S.decimation_factor=1; ;######### OBSERVABLES CONFIG ############. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables Observables.dump=false Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT PVT.averaging_depth=10 PVT.flag_averaging=true PVT.output_rate_ms=100 diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf index f1ef9485d..3f54ad14d 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf @@ -438,14 +438,14 @@ TelemetryDecoder_1C.decimation_factor=20; ;######### TELEMETRY DECODER GPS L2 CONFIG ############ ;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L2 M -TelemetryDecoder_2S.implementation=GPS_L2_M_Telemetry_Decoder +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder TelemetryDecoder_2S.dump=false TelemetryDecoder_2S.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A.Mixed_Observables -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -456,7 +456,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf index 76ae483e8..6932bd009 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf @@ -440,7 +440,7 @@ TelemetryDecoder_1C.decimation_factor=20; ;######### TELEMETRY DECODER GPS L2 CONFIG ############ ;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L2 M -TelemetryDecoder_2S.implementation=GPS_L2_M_Telemetry_Decoder +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder TelemetryDecoder_2S.dump=false TelemetryDecoder_2S.decimation_factor=1; diff --git a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf index f0de982ba..bfc6b40c9 100644 --- a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf @@ -378,14 +378,14 @@ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false TelemetryDecoder_1C.decimation_factor=20; -TelemetryDecoder_2S.implementation=GPS_L2_M_Telemetry_Decoder +TelemetryDecoder_2S.implementation=GPS_L2C_Telemetry_Decoder TelemetryDecoder_2S.dump=false TelemetryDecoder_2S.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A. -Observables.implementation=GPS_L1_CA_Observables +Observables.implementation=Hybrid_Observables ;#dump: Enable or disable the Observables internal binary data file logging [true] or [false] Observables.dump=false @@ -396,7 +396,7 @@ Observables.dump_filename=./observables.dat ;######### PVT CONFIG ############ ;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version. -PVT.implementation=GPS_L1_CA_PVT +PVT.implementation=Hybrid_PVT ;#averaging_depth: Number of PVT observations in the moving average algorithm PVT.averaging_depth=10 diff --git a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt index ade35812f..20095b8fe 100644 --- a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt +++ b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt @@ -18,7 +18,7 @@ set(TELEMETRY_DECODER_ADAPTER_SOURCES gps_l1_ca_telemetry_decoder.cc - gps_l2_m_telemetry_decoder.cc + gps_l2c_telemetry_decoder.cc galileo_e1b_telemetry_decoder.cc sbas_l1_telemetry_decoder.cc galileo_e5a_telemetry_decoder.cc diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2_m_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc similarity index 82% rename from src/algorithms/telemetry_decoder/adapters/gps_l2_m_telemetry_decoder.cc rename to src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc index d641d37eb..2d352b24e 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2_m_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc @@ -1,5 +1,5 @@ /*! - * \file gps_l2_m_telemetry_decoder.cc + * \file gps_l2c_telemetry_decoder.cc * \brief Implementation of an adapter of a GPS L2C M NAV data decoder block * to a TelemetryDecoderInterface * \author Javier Arribas, 2015. jarribas(at)cttc.es @@ -30,7 +30,7 @@ */ -#include "gps_l2_m_telemetry_decoder.h" +#include "gps_l2c_telemetry_decoder.h" #include #include #include "concurrent_queue.h" @@ -43,7 +43,7 @@ using google::LogMessage; -GpsL2MTelemetryDecoder::GpsL2MTelemetryDecoder(ConfigurationInterface* configuration, +GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder(ConfigurationInterface* configuration, std::string role, unsigned int in_streams, unsigned int out_streams) : @@ -56,7 +56,7 @@ GpsL2MTelemetryDecoder::GpsL2MTelemetryDecoder(ConfigurationInterface* configura dump_ = configuration->property(role + ".dump", false); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); // make telemetry decoder object - telemetry_decoder_ = gps_l2_m_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me + telemetry_decoder_ = gps_l2c_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")"; //decimation factor @@ -67,11 +67,11 @@ GpsL2MTelemetryDecoder::GpsL2MTelemetryDecoder(ConfigurationInterface* configura } -GpsL2MTelemetryDecoder::~GpsL2MTelemetryDecoder() +GpsL2CTelemetryDecoder::~GpsL2CTelemetryDecoder() {} -void GpsL2MTelemetryDecoder::set_satellite(Gnss_Satellite satellite) +void GpsL2CTelemetryDecoder::set_satellite(Gnss_Satellite satellite) { satellite_ = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); telemetry_decoder_->set_satellite(satellite_); @@ -79,7 +79,7 @@ void GpsL2MTelemetryDecoder::set_satellite(Gnss_Satellite satellite) } -void GpsL2MTelemetryDecoder::connect(gr::top_block_sptr top_block) +void GpsL2CTelemetryDecoder::connect(gr::top_block_sptr top_block) { if(top_block) { /* top_block is not null */}; // Nothing to connect internally @@ -87,20 +87,20 @@ void GpsL2MTelemetryDecoder::connect(gr::top_block_sptr top_block) } -void GpsL2MTelemetryDecoder::disconnect(gr::top_block_sptr top_block) +void GpsL2CTelemetryDecoder::disconnect(gr::top_block_sptr top_block) { if(top_block) { /* top_block is not null */}; // Nothing to disconnect } -gr::basic_block_sptr GpsL2MTelemetryDecoder::get_left_block() +gr::basic_block_sptr GpsL2CTelemetryDecoder::get_left_block() { return telemetry_decoder_; } -gr::basic_block_sptr GpsL2MTelemetryDecoder::get_right_block() +gr::basic_block_sptr GpsL2CTelemetryDecoder::get_right_block() { return telemetry_decoder_; } diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2_m_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h similarity index 79% rename from src/algorithms/telemetry_decoder/adapters/gps_l2_m_telemetry_decoder.h rename to src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h index b5616c246..08ccc12f0 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2_m_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h @@ -1,6 +1,6 @@ /*! - * \file gps_l2_m_telemetry_decoder.h - * \brief Interface of an adapter of a GPS L1 C/A NAV data decoder block + * \file gps_l2c_telemetry_decoder.h + * \brief Interface of an adapter of a GPS L2C (CNAV) data decoder block * to a TelemetryDecoderInterface * \author Javier Arribas, 2015. jarribas(at)cttc.es * @@ -30,12 +30,12 @@ */ -#ifndef GNSS_SDR_GPS_L2_M_TELEMETRY_DECODER_H_ -#define GNSS_SDR_GPS_L2_M_TELEMETRY_DECODER_H_ +#ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_ +#define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_H_ #include #include "telemetry_decoder_interface.h" -#include "gps_l2_m_telemetry_decoder_cc.h" +#include "gps_l2c_telemetry_decoder_cc.h" class ConfigurationInterface; @@ -43,24 +43,24 @@ class ConfigurationInterface; /*! * \brief This class implements a NAV data decoder for GPS L2 M */ -class GpsL2MTelemetryDecoder : public TelemetryDecoderInterface +class GpsL2CTelemetryDecoder : public TelemetryDecoderInterface { public: - GpsL2MTelemetryDecoder(ConfigurationInterface* configuration, + GpsL2CTelemetryDecoder(ConfigurationInterface* configuration, std::string role, unsigned int in_streams, unsigned int out_streams); - virtual ~GpsL2MTelemetryDecoder(); + virtual ~GpsL2CTelemetryDecoder(); std::string role() { return role_; } - //! Returns "GPS_L2_M_Telemetry_Decoder" + //! Returns "GPS_L2C_Telemetry_Decoder" std::string implementation() { - return "GPS_L2_M_Telemetry_Decoder"; + return "GPS_L2C_Telemetry_Decoder"; } void connect(gr::top_block_sptr top_block); void disconnect(gr::top_block_sptr top_block); @@ -78,7 +78,7 @@ public: } private: - gps_l2_m_telemetry_decoder_cc_sptr telemetry_decoder_; + gps_l2c_telemetry_decoder_cc_sptr telemetry_decoder_; Gnss_Satellite satellite_; int channel_; bool dump_; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt index 07969195a..29aafa1b8 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt @@ -18,7 +18,7 @@ set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES gps_l1_ca_telemetry_decoder_cc.cc - gps_l2_m_telemetry_decoder_cc.cc + gps_l2c_telemetry_decoder_cc.cc galileo_e1b_telemetry_decoder_cc.cc sbas_l1_telemetry_decoder_cc.cc galileo_e5a_telemetry_decoder_cc.cc diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc similarity index 91% rename from src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc rename to src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc index 4a8fcaae3..e7fc300af 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc @@ -1,5 +1,5 @@ /*! - * \file gps_l2_m_telemetry_decoder_cc.cc + * \file gps_l2c_telemetry_decoder_cc.cc * \brief Implementation of a NAV message demodulator block based on * Kay Borre book MATLAB-based GPS receiver * \author Javier Arribas, 2015. jarribas(at)cttc.es @@ -35,7 +35,7 @@ #include #include #include "gnss_synchro.h" -#include "gps_l2_m_telemetry_decoder_cc.h" +#include "gps_l2c_telemetry_decoder_cc.h" using google::LogMessage; @@ -47,18 +47,18 @@ using google::LogMessage; -gps_l2_m_telemetry_decoder_cc_sptr -gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump) +gps_l2c_telemetry_decoder_cc_sptr +gps_l2c_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump) { - return gps_l2_m_telemetry_decoder_cc_sptr(new gps_l2_m_telemetry_decoder_cc(satellite, dump)); + return gps_l2c_telemetry_decoder_cc_sptr(new gps_l2c_telemetry_decoder_cc(satellite, dump)); } -gps_l2_m_telemetry_decoder_cc::gps_l2_m_telemetry_decoder_cc( +gps_l2c_telemetry_decoder_cc::gps_l2c_telemetry_decoder_cc( Gnss_Satellite satellite, bool dump) : - gr::block("gps_l2_m_telemetry_decoder_cc", + gr::block("gps_l2c_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)), gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) { @@ -85,13 +85,13 @@ gps_l2_m_telemetry_decoder_cc::gps_l2_m_telemetry_decoder_cc( -gps_l2_m_telemetry_decoder_cc::~gps_l2_m_telemetry_decoder_cc() +gps_l2c_telemetry_decoder_cc::~gps_l2c_telemetry_decoder_cc() { d_dump_file.close(); } -void gps_l2_m_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required) +void gps_l2c_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int &ninput_items_required) { if (noutput_items != 0) { @@ -103,13 +103,13 @@ void gps_l2_m_telemetry_decoder_cc::forecast (int noutput_items, gr_vector_int & } -void gps_l2_m_telemetry_decoder_cc::set_decimation(int decimation) +void gps_l2c_telemetry_decoder_cc::set_decimation(int decimation) { d_decimation_output_factor = decimation; } -int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), +int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { // get pointers on in- and output gnss-synchro objects @@ -276,7 +276,7 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__ -void gps_l2_m_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite) +void gps_l2c_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite) { d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); LOG(INFO) << "GPS L2C CNAV telemetry decoder in channel " << this->d_channel << " set to satellite " << d_satellite; @@ -284,7 +284,7 @@ void gps_l2_m_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite) -void gps_l2_m_telemetry_decoder_cc::set_channel(int channel) +void gps_l2c_telemetry_decoder_cc::set_channel(int channel) { d_channel = channel; LOG(INFO) << "GPS L2C CNAV channel set to " << channel; @@ -292,7 +292,7 @@ void gps_l2_m_telemetry_decoder_cc::set_channel(int channel) // ### helper class for symbol alignment and viterbi decoding ### -gps_l2_m_telemetry_decoder_cc::symbol_aligner_and_decoder::symbol_aligner_and_decoder() +gps_l2c_telemetry_decoder_cc::symbol_aligner_and_decoder::symbol_aligner_and_decoder() { // convolutional code properties d_KK = 7; @@ -307,14 +307,14 @@ gps_l2_m_telemetry_decoder_cc::symbol_aligner_and_decoder::symbol_aligner_and_de } -gps_l2_m_telemetry_decoder_cc::symbol_aligner_and_decoder::~symbol_aligner_and_decoder() +gps_l2c_telemetry_decoder_cc::symbol_aligner_and_decoder::~symbol_aligner_and_decoder() { delete d_vd1; delete d_vd2; } -void gps_l2_m_telemetry_decoder_cc::symbol_aligner_and_decoder::reset() +void gps_l2c_telemetry_decoder_cc::symbol_aligner_and_decoder::reset() { d_past_symbol = 0; d_vd1->reset(); @@ -322,7 +322,7 @@ void gps_l2_m_telemetry_decoder_cc::symbol_aligner_and_decoder::reset() } -bool gps_l2_m_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const std::vector & symbols, std::vector & bits) +bool gps_l2c_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const std::vector & symbols, std::vector & bits) { const int traceback_depth = 5 * d_KK; int nbits_requested = symbols.size() / GPS_L2_SYMBOLS_PER_BIT; @@ -362,13 +362,13 @@ bool gps_l2_m_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const s // ### helper class for detecting the preamble and collect the corresponding message candidates ### -void gps_l2_m_telemetry_decoder_cc::frame_detector::reset() +void gps_l2c_telemetry_decoder_cc::frame_detector::reset() { d_buffer.clear(); } -void gps_l2_m_telemetry_decoder_cc::frame_detector::get_frame_candidates(const std::vector & bits, std::vector>> & msg_candidates) +void gps_l2c_telemetry_decoder_cc::frame_detector::get_frame_candidates(const std::vector & bits, std::vector>> & msg_candidates) { //std::stringstream ss; unsigned int cnav_msg_length = 300; @@ -426,12 +426,12 @@ void gps_l2_m_telemetry_decoder_cc::frame_detector::get_frame_candidates(const s // ### helper class for checking the CRC of the message candidates ### -void gps_l2_m_telemetry_decoder_cc::crc_verifier::reset() +void gps_l2c_telemetry_decoder_cc::crc_verifier::reset() { } -void gps_l2_m_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vector & msg_candidates, std::vector & valid_msgs) +void gps_l2c_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vector & msg_candidates, std::vector & valid_msgs) { std::vector tmp_msg; LOG(INFO) << "get_valid_frames(): " << "msg_candidates.size()=" << msg_candidates.size(); @@ -457,7 +457,7 @@ void gps_l2_m_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::ve } -void gps_l2_m_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_bytes(const std::vector & msg_candidate, std::vector & bytes) +void gps_l2c_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_bytes(const std::vector & msg_candidate, std::vector & bytes) { //std::stringstream ss; const size_t bits_per_byte = 8; @@ -482,7 +482,7 @@ void gps_l2_m_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_b // << std::setfill(' ') << std::resetiosflags(std::ios::hex); } -void gps_l2_m_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_bytes(const std::vector & msg_candidate, std::vector & bytes) +void gps_l2c_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_bytes(const std::vector & msg_candidate, std::vector & bytes) { //std::stringstream ss; const size_t bits_per_byte = 8; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h similarity index 86% rename from src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.h rename to src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h index 1396dd7d2..2b0ce1b5b 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2_m_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.h @@ -1,6 +1,6 @@ /*! - * \file gps_l2_m_telemetry_decoder_cc.h - * \brief Interface of a NAV message demodulator block based on + * \file gps_l2c_telemetry_decoder_cc.h + * \brief Interface of a CNAV message demodulator block based on * Kay Borre book MATLAB-based GPS receiver * \author Javier Arribas, 2015. jarribas(at)cttc.es * ------------------------------------------------------------------------- @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L2_M_TELEMETRY_DECODER_CC_H -#define GNSS_SDR_GPS_L2_M_TELEMETRY_DECODER_CC_H +#ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_CC_H +#define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_CC_H #include // for copy #include @@ -47,21 +47,21 @@ #include "concurrent_queue.h" #include "GPS_L2C.h" -class gps_l2_m_telemetry_decoder_cc; +class gps_l2c_telemetry_decoder_cc; -typedef boost::shared_ptr gps_l2_m_telemetry_decoder_cc_sptr; +typedef boost::shared_ptr gps_l2c_telemetry_decoder_cc_sptr; -gps_l2_m_telemetry_decoder_cc_sptr -gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump); +gps_l2c_telemetry_decoder_cc_sptr +gps_l2c_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump); /*! * \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229 * */ -class gps_l2_m_telemetry_decoder_cc : public gr::block +class gps_l2c_telemetry_decoder_cc : public gr::block { public: - ~gps_l2_m_telemetry_decoder_cc(); + ~gps_l2c_telemetry_decoder_cc(); void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN void set_channel(int channel); //!< Set receiver's channel void set_decimation(int decimation); @@ -79,9 +79,9 @@ public: void forecast (int noutput_items, gr_vector_int &ninput_items_required); private: - friend gps_l2_m_telemetry_decoder_cc_sptr - gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump); - gps_l2_m_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump); + friend gps_l2c_telemetry_decoder_cc_sptr + gps_l2c_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump); + gps_l2c_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump); void viterbi_decoder(double *page_part_symbols, int *page_part_bits); void align_samples(); diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc index b52d614f7..8df7faf88 100644 --- a/src/core/receiver/gnss_block_factory.cc +++ b/src/core/receiver/gnss_block_factory.cc @@ -85,7 +85,7 @@ #include "galileo_e5a_dll_pll_tracking.h" #include "gps_l2_m_dll_pll_tracking.h" #include "gps_l1_ca_telemetry_decoder.h" -#include "gps_l2_m_telemetry_decoder.h" +#include "gps_l2c_telemetry_decoder.h" #include "galileo_e1b_telemetry_decoder.h" #include "galileo_e5a_telemetry_decoder.h" #include "sbas_l1_telemetry_decoder.h" @@ -1031,6 +1031,12 @@ std::unique_ptr GNSSBlockFactory::GetBlock( out_streams)); block = std::move(block_); } + else if (implementation.compare("GPS_L2C_Telemetry_Decoder") == 0) + { + std::unique_ptr block_(new GpsL2CTelemetryDecoder(configuration.get(), role, in_streams, + out_streams)); + block = std::move(block_); + } else if (implementation.compare("Galileo_E1B_Telemetry_Decoder") == 0) { std::unique_ptr block_(new GalileoE1BTelemetryDecoder(configuration.get(), role, in_streams, @@ -1324,9 +1330,9 @@ std::unique_ptr GNSSBlockFactory::GetTlmBlock( out_streams)); block = std::move(block_); } - else if (implementation.compare("GPS_L2_M_Telemetry_Decoder") == 0) + else if (implementation.compare("GPS_L2C_Telemetry_Decoder") == 0) { - std::unique_ptr block_(new GpsL2MTelemetryDecoder(configuration.get(), role, in_streams, + std::unique_ptr block_(new GpsL2CTelemetryDecoder(configuration.get(), role, in_streams, out_streams)); block = std::move(block_); }