From f0a0f9400723e9b3f5a3088a57609aaeae7ecd74 Mon Sep 17 00:00:00 2001 From: Luis Esteve Date: Wed, 12 Sep 2012 15:03:38 +0000 Subject: [PATCH] Added documentation to the code git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@245 64b25241-fba3-4117-9849-534c7e92360d --- .../galileo_e1_pcps_ambiguous_acquisition.cc | 177 ++++++++++-------- .../galileo_e1_pcps_ambiguous_acquisition.h | 45 ++++- .../adapters/gps_l1_ca_pcps_acquisition.cc | 13 +- .../adapters/gps_l1_ca_pcps_acquisition.h | 51 ++++- .../gnuradio_blocks/pcps_acquisition_cc.cc | 13 +- .../gnuradio_blocks/pcps_acquisition_cc.h | 68 +++++-- .../libs/galileo_e1_signal_processing.h | 1 - .../galileo_e1_dll_pll_veml_tracking.cc | 4 +- .../galileo_e1_dll_pll_veml_tracking.h | 10 +- .../galileo_e1_dll_pll_veml_tracking_cc.cc | 4 +- .../galileo_e1_dll_pll_veml_tracking_cc.h | 10 +- src/algorithms/tracking/libs/CN_estimators.cc | 12 +- src/algorithms/tracking/libs/CN_estimators.h | 42 ++++- src/algorithms/tracking/libs/correlator.cc | 7 +- src/algorithms/tracking/libs/correlator.h | 5 +- .../tracking/libs/tracking_discriminators.cc | 10 +- .../tracking/libs/tracking_discriminators.h | 13 +- src/tests/gnss_block/fir_filter_test.cc | 2 +- .../galileo_e1_dll_pll_veml_tracking_test.cc | 28 +-- ...e1_pcps_ambiguous_acquisition_gsoc_test.cc | 7 +- ...ileo_e1_pcps_ambiguous_acquisition_test.cc | 3 +- .../gnss_block/gnss_block_factory_test.cc | 10 +- .../gps_l1_ca_pcps_acquisition_test.cc | 3 +- 23 files changed, 365 insertions(+), 173 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index 1de5449da..4aada06a2 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -50,10 +50,11 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( ConfigurationInterface* configuration, std::string role, unsigned int in_streams, unsigned int out_streams, gr_msg_queue_sptr queue) : - role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) + role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_( + queue) { - configuration_ = configuration; + configuration_ = configuration; std::string default_item_type = "gr_complex"; std::string default_dump_filename = "../data/acquisition.dat"; @@ -70,159 +71,179 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); - //--- Find number of samples per spreading code (4 ms) ---------------------------- + //--- Find number of samples per spreading code (4 ms) ----------------- - vector_length_ = round(fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); - int samples_per_ms = vector_length_/4; + vector_length_ = round( + fs_in_ + / (Galileo_E1_CODE_CHIP_RATE_HZ + / Galileo_E1_B_CODE_LENGTH_CHIPS)); + int samples_per_ms = vector_length_ / 4; - code_= new gr_complex[vector_length_]; + code_ = new gr_complex[vector_length_]; if (item_type_.compare("gr_complex") == 0) - { - item_size_ = sizeof(gr_complex); - acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, - shift_resolution_, if_, fs_in_, samples_per_ms, queue_, - dump_, dump_filename_); - stream_to_vector_ = gr_make_stream_to_vector(item_size_, - vector_length_); - DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() - << ")"; - DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() - << ")"; - } + { + item_size_ = sizeof(gr_complex); + acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, + shift_resolution_, if_, fs_in_, samples_per_ms, queue_, + dump_, dump_filename_); + stream_to_vector_ = gr_make_stream_to_vector(item_size_, + vector_length_); + DLOG(INFO) << "stream_to_vector(" + << stream_to_vector_->unique_id() << ")"; + DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() + << ")"; + } else - { - LOG_AT_LEVEL(WARNING) << item_type_ - << " unknown acquisition item type"; - } + { + LOG_AT_LEVEL(WARNING) << item_type_ + << " unknown acquisition item type"; + } } GalileoE1PcpsAmbiguousAcquisition::~GalileoE1PcpsAmbiguousAcquisition() { - delete[] code_; + delete[] code_; } - -void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel) +void +GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel) { channel_ = channel; if (item_type_.compare("gr_complex") == 0) - { - acquisition_cc_->set_channel(channel_); - } + { + acquisition_cc_->set_channel(channel_); + } } -void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold) +void +GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold) { threshold_ = threshold; if (item_type_.compare("gr_complex") == 0) - { - acquisition_cc_->set_threshold(threshold_); - } + { + acquisition_cc_->set_threshold(threshold_); + } } -void GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max) +void +GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max) { doppler_max_ = doppler_max; if (item_type_.compare("gr_complex") == 0) - { - acquisition_cc_->set_doppler_max(doppler_max_); - } + { + acquisition_cc_->set_doppler_max(doppler_max_); + } } -void GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) +void +GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) { doppler_step_ = doppler_step; if (item_type_.compare("gr_complex") == 0) - { - acquisition_cc_->set_doppler_step(doppler_step_); - } + { + acquisition_cc_->set_doppler_step(doppler_step_); + } } -void GalileoE1PcpsAmbiguousAcquisition::set_channel_queue( +void +GalileoE1PcpsAmbiguousAcquisition::set_channel_queue( concurrent_queue *channel_internal_queue) { channel_internal_queue_ = channel_internal_queue; if (item_type_.compare("gr_complex") == 0) - { - acquisition_cc_->set_channel_queue(channel_internal_queue_); - } + { + acquisition_cc_->set_channel_queue(channel_internal_queue_); + } } -void GalileoE1PcpsAmbiguousAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) +void +GalileoE1PcpsAmbiguousAcquisition::set_gnss_synchro( + Gnss_Synchro* gnss_synchro) { - gnss_synchro_ = gnss_synchro; + gnss_synchro_ = gnss_synchro; if (item_type_.compare("gr_complex") == 0) - { - acquisition_cc_->set_gnss_synchro(gnss_synchro_); - } + { + acquisition_cc_->set_gnss_synchro(gnss_synchro_); + } } -signed int GalileoE1PcpsAmbiguousAcquisition::mag() +signed int +GalileoE1PcpsAmbiguousAcquisition::mag() { if (item_type_.compare("gr_complex") == 0) - { - return acquisition_cc_->mag(); - } + { + return acquisition_cc_->mag(); + } else - { - return 0; - } + { + return 0; + } } -void GalileoE1PcpsAmbiguousAcquisition::init(){ +void +GalileoE1PcpsAmbiguousAcquisition::init() +{ if (item_type_.compare("gr_complex") == 0) - { - bool cboc = configuration_->property("Acquisition" - + boost::lexical_cast(channel_) + ".cboc", false);; + { + bool cboc = configuration_->property( + "Acquisition" + boost::lexical_cast(channel_) + + ".cboc", false); + ; - galileo_e1_code_gen_complex_sampled(code_, gnss_synchro_->Signal, cboc, gnss_synchro_->PRN, fs_in_, 0); - acquisition_cc_->set_local_code(code_); - acquisition_cc_->init(); - } + galileo_e1_code_gen_complex_sampled(code_, gnss_synchro_->Signal, + cboc, gnss_synchro_->PRN, fs_in_, 0); + acquisition_cc_->set_local_code(code_); + acquisition_cc_->init(); + } } -void GalileoE1PcpsAmbiguousAcquisition::reset() +void +GalileoE1PcpsAmbiguousAcquisition::reset() { if (item_type_.compare("gr_complex") == 0) - { - acquisition_cc_->set_active(true); - } + { + acquisition_cc_->set_active(true); + } } -void GalileoE1PcpsAmbiguousAcquisition::connect(gr_top_block_sptr top_block) +void +GalileoE1PcpsAmbiguousAcquisition::connect(gr_top_block_sptr top_block) { if (item_type_.compare("gr_complex") == 0) - { - top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); - } + { + top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); + } } -void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr_top_block_sptr top_block) +void +GalileoE1PcpsAmbiguousAcquisition::disconnect(gr_top_block_sptr top_block) { if (item_type_.compare("gr_complex") == 0) - { - top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); - } + { + top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); + } } -gr_basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block() +gr_basic_block_sptr +GalileoE1PcpsAmbiguousAcquisition::get_left_block() { return stream_to_vector_; } -gr_basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_right_block() +gr_basic_block_sptr +GalileoE1PcpsAmbiguousAcquisition::get_right_block() { return acquisition_cc_; } diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h index f7ab7ca39..ac6fd451b 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h @@ -1,9 +1,9 @@ /*! * \file galileo_e1_pcps_ambiguous_acquisition.h - * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for Galileo E1 Signals + * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for + * Galileo E1 Signals * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * - * Detailed description of the file here if needed. * * ------------------------------------------------------------------------- * @@ -40,6 +40,11 @@ class ConfigurationInterface; +/*! + * \brief This class adapts a PCPS acquisition block to an AcquisitionInterface + * for Galileo E1 Signals + */ + class GalileoE1PcpsAmbiguousAcquisition: public AcquisitionInterface { @@ -69,15 +74,51 @@ public: gr_basic_block_sptr get_left_block(); gr_basic_block_sptr get_right_block(); + /*! + * \brief Set acquisition/tracking common Gnss_Synchro object pointer + * to efficiently exchange synchronization data between acquisition and + * tracking blocks + */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); + + /*! + * \brief Set acquisition channel unique ID + */ void set_channel(unsigned int channel); + + /*! + * \brief Set statistics threshold of PCPS algorithm + */ void set_threshold(float threshold); + + /*! + * \brief Set maximum Doppler off grid search + */ void set_doppler_max(unsigned int doppler_max); + + /*! + * \brief Set Doppler steps for the grid search + */ void set_doppler_step(unsigned int doppler_step); + + /*! + * \brief Set tracking channel internal queue + */ void set_channel_queue(concurrent_queue *channel_internal_queue); + /*! + * \brief Initializes acquisition algorithm. + */ void init(); + + /*! + * \brief Returns the maximum peak of grid search + */ signed int mag(); + + /*! + * \brief Restart acquisition algorithm + */ void reset(); private: diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index e447b8438..7fd97d211 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -2,12 +2,14 @@ * \file gps_l1_ca_pcps_acquisition.cc * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for * GPS L1 C/A Signals - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * Luis Esteve, 2011-2012. luis(at)epsilon-formacion.com + * \authors
    + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
* * ------------------------------------------------------------------------- * - * 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 * Satellite Systems receiver @@ -69,8 +71,9 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); - //--- Find number of samples per spreading code ---------------------------- - vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); + //--- Find number of samples per spreading code ------------------------- + vector_length_ = round(fs_in_ + / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); code_= new gr_complex[vector_length_]; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h index 4c08190a8..b70e9145a 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h @@ -2,14 +2,14 @@ * \file gps_l1_ca_pcps_acquisition.h * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for * GPS L1 C/A signals - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * Luis Esteve, 2011-2012. luis(at)epsilon-formacion.com - * - * Detailed description of the file here if needed. + * \authors
    + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
* * * ------------------------------------------------------------------------- * - * 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 * Satellite Systems receiver @@ -42,6 +42,11 @@ class ConfigurationInterface; +/*! + * \brief This class adapts a PCPS acquisition block to an AcquisitionInterface + * for GPS L1 C/A signals + */ + class GpsL1CaPcpsAcquisition: public AcquisitionInterface { @@ -71,15 +76,51 @@ public: gr_basic_block_sptr get_left_block(); gr_basic_block_sptr get_right_block(); + /*! + * \brief Set acquisition/tracking common Gnss_Synchro object pointer + * to efficiently exchange synchronization data between acquisition and + * tracking blocks + */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); + + /*! + * \brief Set acquisition channel unique ID + */ void set_channel(unsigned int channel); + + /*! + * \brief Set statistics threshold of PCPS algorithm + */ void set_threshold(float threshold); + + /*! + * \brief Set maximum Doppler off grid search + */ void set_doppler_max(unsigned int doppler_max); + + /*! + * \brief Set Doppler steps for the grid search + */ void set_doppler_step(unsigned int doppler_step); + + /*! + * \brief Set tracking channel internal queue + */ void set_channel_queue(concurrent_queue *channel_internal_queue); + /*! + * \brief Initializes acquisition algorithm. + */ void init(); + + /*! + * \brief Returns the maximum peak of grid search + */ signed int mag(); + + /*! + * \brief Restart acquisition algorithm + */ void reset(); private: diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc index 9b671d58b..15b897e4d 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.cc @@ -1,8 +1,10 @@ /*! * \file pcps_acquisition_cc.cc - * \brief This class implements a Parallell Code Phase Search Acquisition - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * Luis Esteve, 2012. luis(at)epsilon-formacion.com + * \brief This class implements a Parallel Code Phase Search Acquisition + * \authors
    + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
* * Detailed description of the file here if needed. * @@ -125,7 +127,6 @@ void pcps_acquisition_cc::init() for (unsigned int i = 0; i < d_fft_size; i++) { d_fft_codes[i] = std::complex(conj(d_fft_if->get_outbuf()[i])); - //d_fft_codes[i] = d_fft_codes[i] / (float)d_fft_size; //to correct the scale factor introduced by FFTW } } @@ -243,8 +244,6 @@ int pcps_acquisition_cc::general_work(int noutput_items, std::streamsize n = 2 * sizeof(float) * (d_fft_size); // complex file write filename.str(""); filename << "../data/test_statistics_"<System<<"_"<Signal<<"_sat_" << d_gnss_synchro->PRN << "_doppler_"<< doppler << ".dat"; - //std::cout << filename.str().c_str(); - //std::cout << ".\n"; d_dump_file.open(filename.str().c_str(), std::ios::out | std::ios::binary); d_dump_file.write((char*)d_ifft->get_outbuf(), n); //write directly |abs(x)|^2 in this Doppler bin? @@ -257,8 +256,6 @@ int pcps_acquisition_cc::general_work(int noutput_items, d_mag = magt; d_gnss_synchro->Acq_delay_samples= (double)indext; d_gnss_synchro->Acq_doppler_hz= (double)doppler; - //d_code_phase = indext; - //d_doppler_freq = doppler; } } diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.h index ca9d37785..01cc91e3d 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_cc.h @@ -1,21 +1,29 @@ /*! * \file pcps_acquisition_cc.h - * \brief This class implements a Parallell Code Phase Search Acquisition + * \brief This class implements a Parallel Code Phase Search Acquisition * - * Acquisition strategy (Kay Borre book + CFAR threshold): - * 1. Compute the input signal power estimation - * 2. Doppler serial search loop - * 3. Perform the FFT-based circular convolution (parallel time search) - * 4. Record the maximum peak and the associated synchronization parameters - * 5. Compute the test statistics and compare to the threshold - * 6. Declare positive or negative acquisition using a message queue + * Acquisition strategy (Kay Borre book + CFAR threshold). + *
    + *
  1. Compute the input signal power estimation + *
  2. Doppler serial search loop + *
  3. Perform the FFT-based circular convolution (parallel time search) + *
  4. Record the maximum peak and the associated synchronization parameters + *
  5. Compute the test statistics and compare to the threshold + *
  6. Declare positive or negative acquisition using a message queue + *
* - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * Luis Esteve, 2012. luis(at)epsilon-formacion.com + * Kay Borre book: K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, + * "A Software-Defined GPS and Galileo Receiver. A Single-Frequency + * Approach", Birkha user, 2007. pp 81-84 + * + * \authors
    + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
* * ------------------------------------------------------------------------- * - * 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 * Satellite Systems receiver @@ -60,6 +68,10 @@ pcps_make_acquisition_cc(unsigned int sampled_ms, unsigned int doppler_max, long freq, long fs_in, int samples_per_ms, gr_msg_queue_sptr queue, bool dump, std::string dump_filename); +/*! + * \brief This class implements a Parallel Code Phase Search Acquisition + */ + class pcps_acquisition_cc: public gr_block { private: @@ -117,45 +129,79 @@ public: ~pcps_acquisition_cc(); + /*! + * \brief Set acquisition/tracking common Gnss_Synchro object pointer + * to efficiently exchange synchronization data between acquisition and + * tracking blocks + */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) { d_gnss_synchro = p_gnss_synchro; } + /*! + * \brief Returns the maximum peak of grid search + */ unsigned int mag() { return d_mag; } + /*! + * \brief Initializes acquisition algorithm. + */ void init(); + /*! + * \brief Sets local code for PCPS acquisition algorithm. + */ void set_local_code(std::complex * code); + /*! + * \brief Starts acquisition algorithm, turning from standby mode to + * active mode + */ void set_active(bool active) { d_active = active; } + /*! + * \brief Set acquisition channel unique ID + */ void set_channel(unsigned int channel) { d_channel = channel; } + /*! + * \brief Set statistics threshold of PCPS algorithm + */ void set_threshold(float threshold) { d_threshold = threshold; } + /*! + * \brief Set maximum Doppler off grid search + */ void set_doppler_max(unsigned int doppler_max) { d_doppler_max = doppler_max; } + /*! + * \brief Set Doppler steps for the grid search + */ void set_doppler_step(unsigned int doppler_step) { d_doppler_step = doppler_step; } + + /*! + * \brief Set tracking channel internal queue + */ void set_channel_queue(concurrent_queue *channel_internal_queue) { d_channel_internal_queue = channel_internal_queue; diff --git a/src/algorithms/libs/galileo_e1_signal_processing.h b/src/algorithms/libs/galileo_e1_signal_processing.h index 23f6a3ca6..c588f6e94 100644 --- a/src/algorithms/libs/galileo_e1_signal_processing.h +++ b/src/algorithms/libs/galileo_e1_signal_processing.h @@ -3,7 +3,6 @@ * \brief This library implements various functions for Galileo E1 signals * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * - * Detailed description of the file here if needed. * * ------------------------------------------------------------------------- * diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc index 40ba48bfa..203a9a074 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc @@ -1,7 +1,7 @@ /*! * \file galileo_e1_dll_pll_veml_tracking.cc - * \brief Interface of an adapter of a DLL+PLL VEML (Very Early Minus Late) - * tracking loop block for Galileo E1 to a TrackingInterface + * \brief Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block + * to a TrackingInterface for Galileo E1 signals * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * Code DLL + carrier PLL according to the algorithms described in: diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h index 04c8b64bf..9fb12f3ee 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h @@ -1,7 +1,7 @@ /*! * \file galileo_e1_dll_pll_veml_tracking.h - * \brief Interface of an adapter of a DLL+PLL VEML (Very Early Minus Late) - * tracking loop block for Galileo E1 to a TrackingInterface + * \brief Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block + * to a TrackingInterface for Galileo E1 signals * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * Code DLL + carrier PLL according to the algorithms described in: @@ -44,7 +44,8 @@ class ConfigurationInterface; /*! - * \brief This class implements a code DLL + carrier PLL tracking loop + * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking + * loop block to a TrackingInterface for Galileo E1 signals */ class GalileoE1DllPllVemlTracking : public TrackingInterface { @@ -85,7 +86,8 @@ public: /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer - * to efficiently exchange synchronization data between acquisition and tracking blocks + * to efficiently exchange synchronization data between acquisition and + * tracking blocks */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro); diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc index 92b8196c7..c33df16b7 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc @@ -1,7 +1,7 @@ /*! * \file galileo_e1_dll_pll_veml_tracking_cc.cc - * \brief Implementation of a code DLL + carrier PLL bump-jump tracking - * block + * \brief Implementation of a code DLL + carrier PLL VEML (Very Early + * Minus Late) tracking block for Galileo E1 signals * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * Code DLL + carrier PLL according to the algorithms described in: diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h index eb8602f26..937a7334a 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h @@ -1,7 +1,7 @@ /*! - * \file galileo_e1_dll_pll_veml_trakcing_cc.h - * \brief Implementation of a code DLL + carrier PLL bump-jump tracking - * block + * \file galileo_e1_dll_pll_veml_tracking_cc.h + * \brief Implementation of a code DLL + carrier PLL VEML (Very Early + * Minus Late) tracking block for Galileo E1 signals * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * Code DLL + carrier PLL according to the algorithms described in: @@ -68,8 +68,10 @@ galileo_e1_dll_pll_veml_make_tracking_cc(long if_freq, float very_early_late_space_chips); /*! - * \brief This class implements a DLL + PLL bump-jump tracking loop block + * \brief This class implements a code DLL + carrier PLL VEML (Very Early + * Minus Late) tracking block for Galileo E1 signals */ + class galileo_e1_dll_pll_veml_tracking_cc: public gr_block { public: diff --git a/src/algorithms/tracking/libs/CN_estimators.cc b/src/algorithms/tracking/libs/CN_estimators.cc index d9c885ea5..c69963c56 100644 --- a/src/algorithms/tracking/libs/CN_estimators.cc +++ b/src/algorithms/tracking/libs/CN_estimators.cc @@ -1,20 +1,26 @@ /*! * \file CN_estimators.cc * \brief Implementation of a library with a set of Carrier to Noise - * estimators and lock detectors. SNV_CN0 is a Carrier-to-Noise (CN0) estimator + * estimators and lock detectors. + * + * SNV_CN0 is a Carrier-to-Noise (CN0) estimator * based on the Signal-to-Noise Variance (SNV) estimator [1]. * Carrier lock detector using normalised estimate of the cosine * of twice the carrier phase error [2]. + * * [1] Marco Pini, Emanuela Falletti and Maurizio Fantino, "Performance * Evaluation of C/N0 Estimators using a Real Time GNSS Software Receiver," * IEEE 10th International Symposium on Spread Spectrum Techniques and * Applications, pp.28-30, August 2008. + * * [2] Van Dierendonck, A.J. (1996), Global Positioning System: Theory and * Applications, * Volume I, Chapter 8: GPS Receivers, AJ Systems, Los Altos, CA 94024. * Inc.: 329-407. - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * + * \authors
    + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
* * ------------------------------------------------------------------------- * diff --git a/src/algorithms/tracking/libs/CN_estimators.h b/src/algorithms/tracking/libs/CN_estimators.h index dfa44d412..0addf8201 100644 --- a/src/algorithms/tracking/libs/CN_estimators.h +++ b/src/algorithms/tracking/libs/CN_estimators.h @@ -2,8 +2,25 @@ * \file CN_estimators.h * \brief Interface of a library with a set of Carrier to Noise * estimators and lock detectors. - * \author Javier Arribas, 2011. jarribas(at)cttc.es * + * SNV_CN0 is a Carrier-to-Noise (CN0) estimator + * based on the Signal-to-Noise Variance (SNV) estimator [1]. + * Carrier lock detector using normalised estimate of the cosine + * of twice the carrier phase error [2]. + * + * [1] Marco Pini, Emanuela Falletti and Maurizio Fantino, "Performance + * Evaluation of C/N0 Estimators using a Real Time GNSS Software Receiver," + * IEEE 10th International Symposium on Spread Spectrum Techniques and + * Applications, pp.28-30, August 2008. + * + * [2] Van Dierendonck, A.J. (1996), Global Positioning System: Theory and + * Applications, + * Volume I, Chapter 8: GPS Receivers, AJ Systems, Los Altos, CA 94024. + * Inc.: 329-407. + * \authors
    + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
* ------------------------------------------------------------------------- * * Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors) @@ -34,7 +51,7 @@ #include -/*! brief SNV_CN0 is a Carrier-to-Noise (CN0) estimator +/*! \brief CN0_SNV is a Carrier-to-Noise (CN0) estimator * based on the Signal-to-Noise Variance (SNV) estimator * * Signal-to-Noise (SNR) (\f$\rho\f$) estimator using the Signal-to-Noise Variance (SNV) estimator: @@ -56,6 +73,27 @@ * Applications, pp.28-30, August 2008. */ float gps_l1_ca_CN0_SNV(gr_complex* Prompt_buffer, int length, long fs_in); +/*! \brief CN0_SNV is a Carrier-to-Noise (CN0) estimator + * based on the Signal-to-Noise Variance (SNV) estimator + * + * Signal-to-Noise (SNR) (\f$\rho\f$) estimator using the Signal-to-Noise Variance (SNV) estimator: + * \f{equation} + * \hat{\rho}=\frac{\hat{P}_s}{\hat{P}_n}=\frac{\hat{P}_s}{\hat{P}_{tot}-\hat{P}_s}, + * \f} + * where \f$\hat{P}_s=\left(\frac{1}{N}\sum^{N-1}_{i=0}|Re(Pc(i))|\right)^2\f$ is the estimation of the signal power, + * \f$\hat{P}_{tot}=\frac{1}{N}\sum^{N-1}_{i=0}|Pc(i)|^2\f$ is the estimator of the total power, \f$|\cdot|\f$ is the absolute value, + * \f$Re(\cdot)\f$ stands for the real part of the value, and \f$Pc(i)\f$ is the prompt correlator output for the sample index i. + * + * The SNR value is converted to CN0 [dB-Hz], taking to account the receiver bandwidth and the PRN code gain, using the following formula: + * \f{equation} + * CN0_{dB}=10*log(\hat{\rho})+10*log(\frac{f_s}{2})-10*log(L_{PRN}), + * \f} + * where \f$f_s\f$ is the sampling frequency and \f$L_{PRN}\f$ is the PRN sequence length. + * Ref: Marco Pini, Emanuela Falletti and Maurizio Fantino, "Performance + * Evaluation of C/N0 Estimators using a Real Time GNSS Software Receiver," + * IEEE 10th International Symposium on Spread Spectrum Techniques and + * Applications, pp.28-30, August 2008. + */ float galileo_e1_CN0_SNV(gr_complex* Prompt_buffer, int length, long fs_in); /*! \brief A carrier lock detector diff --git a/src/algorithms/tracking/libs/correlator.cc b/src/algorithms/tracking/libs/correlator.cc index 2150021bf..ffcc9a7db 100644 --- a/src/algorithms/tracking/libs/correlator.cc +++ b/src/algorithms/tracking/libs/correlator.cc @@ -1,7 +1,10 @@ /*! * \file correlator.cc * \brief Highly optimized vector correlator class - * \author Javier Arribas, 2011. jarribas(at)cttc.es + * \authors
    + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
* * Class that implements a high optimized vector correlator class. * @@ -53,8 +56,6 @@ void Correlator::Carrier_wipeoff_and_EPL_generic(int signal_length_samples,const { gr_complex bb_signal_sample(0,0); - //std::cout<<"length="< + *
  • Javier Arribas, 2011. jarribas(at)cttc.es + *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com + * * * Class that implements a high optimized vector correlator class * using the volk library diff --git a/src/algorithms/tracking/libs/tracking_discriminators.cc b/src/algorithms/tracking/libs/tracking_discriminators.cc index 3f15d2573..e55eb31cb 100644 --- a/src/algorithms/tracking/libs/tracking_discriminators.cc +++ b/src/algorithms/tracking/libs/tracking_discriminators.cc @@ -2,9 +2,10 @@ * \file tracking_discriminators.cc * \brief Implementation of a library with a set of code tracking * and carrier tracking discriminators that is used by the tracking algorithms. - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * Luis Esteve, 2012. luis(at)epsilon-formacion.com - * + * \authors
      + *
    • Javier Arribas, 2011. jarribas(at)cttc.es + *
    • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
    * * ------------------------------------------------------------------------- * @@ -104,7 +105,8 @@ float dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1) } /* - * DLL Noncoherent Very Early Minus Late Power (VEMLP) normalized discriminator: + * DLL Noncoherent Very Early Minus Late Power (VEMLP) normalized discriminator, using the outputs + * of four correlators, Very Early (VE), Early (E), Late (L) and Very Late (VL): * \f{equation} * error=\frac{E-L}{E+L}, * \f} diff --git a/src/algorithms/tracking/libs/tracking_discriminators.h b/src/algorithms/tracking/libs/tracking_discriminators.h index 0ded53f9b..ee6f0b5bf 100644 --- a/src/algorithms/tracking/libs/tracking_discriminators.h +++ b/src/algorithms/tracking/libs/tracking_discriminators.h @@ -2,8 +2,10 @@ * \file tracking_discriminators.h * \brief Interface of a library with a set of code tracking and carrier * tracking discriminators. - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * Luis Esteve, 2012. luis(at)epsilon-formacion.com + * \authors
      + *
    • Javier Arribas, 2011. jarribas(at)cttc.es + *
    • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
    * * Library with a set of code tracking and carrier tracking discriminators * that is used by the tracking algorithms. @@ -79,15 +81,16 @@ float pll_cloop_two_quadrant_atan(gr_complex prompt_s1); * \f{equation} * error=\frac{E-L}{E+L}, * \f} - * where \f$E=\sqrt{I_{ES}^2,Q_{ES}^2}\f$ is the Early correlator output absolute value and - * \f$L=\sqrt{I_{LS}^2,Q_{LS}^2}\f$ is the Late correlator output absolute value. The output is in [chips]. + * where \f$E=\sqrt{I_{ES}^2+Q_{ES}^2}\f$ is the Early correlator output absolute value and + * \f$L=\sqrt{I_{LS}^2+Q_{LS}^2}\f$ is the Late correlator output absolute value. The output is in [chips]. */ float dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1); /*! \brief DLL Noncoherent Very Early Minus Late Power (VEMLP) normalized discriminator * - * DLL Noncoherent Very Early Minus Late Power (VEMLP) normalized discriminator: + * DLL Noncoherent Very Early Minus Late Power (VEMLP) normalized discriminator, using the outputs + * of four correlators, Very Early (VE), Early (E), Late (L) and Very Late (VL): * \f{equation} * error=\frac{E-L}{E+L}, * \f} diff --git a/src/tests/gnss_block/fir_filter_test.cc b/src/tests/gnss_block/fir_filter_test.cc index 647b4d76d..6b6bf31fb 100644 --- a/src/tests/gnss_block/fir_filter_test.cc +++ b/src/tests/gnss_block/fir_filter_test.cc @@ -1,6 +1,6 @@ /*! * \file fir_filter_test.cc - * \brief Implements Unit Test for the fir filter. + * \brief Implements Unit Test for the FirFilter class. * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * ------------------------------------------------------------------------- diff --git a/src/tests/gnss_block/galileo_e1_dll_pll_veml_tracking_test.cc b/src/tests/gnss_block/galileo_e1_dll_pll_veml_tracking_test.cc index 94b47617c..856c80ed3 100644 --- a/src/tests/gnss_block/galileo_e1_dll_pll_veml_tracking_test.cc +++ b/src/tests/gnss_block/galileo_e1_dll_pll_veml_tracking_test.cc @@ -1,6 +1,7 @@ /*! - * \file galileo_e1_dll_pll_veml_tracking_internal_test.cc - * \brief This class implements a tracking test based on some input parameters. + * \file galileo_e1_dll_pll_veml_tracking_test.cc + * \brief This class implements a tracking test for GalileoE1DllPllVemlTracking + * class based on some input parameters. * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * @@ -67,9 +68,6 @@ protected: } void init(); - void start_queue(); - void wait_message(); - void stop_queue(); gr_msg_queue_sptr queue; gr_top_block_sptr top_block; @@ -102,26 +100,6 @@ void GalileoE1DllPllVemlTrackingInternalTest::init(){ config->set_property("Tracking.dll_bw_hz", "2.0"); } -void GalileoE1DllPllVemlTrackingInternalTest::start_queue() -{ - ch_thread = boost::thread(&GalileoE1DllPllVemlTrackingInternalTest::wait_message, this); -} - - -void GalileoE1DllPllVemlTrackingInternalTest::wait_message() -{ - while (!stop) - { - channel_internal_queue.wait_and_pop(message); - stop_queue(); - } -} - -void GalileoE1DllPllVemlTrackingInternalTest::stop_queue() -{ - stop = true; - } - TEST_F(GalileoE1DllPllVemlTrackingInternalTest, Instantiate) diff --git a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc index 5ace590dd..4f74a5f09 100644 --- a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc +++ b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc @@ -1,7 +1,7 @@ /*! * \file galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc - * \brief This class implements an acquisition test based on GSoC 2012 - * experiments. + * \brief This class implements an acquisition test for + * GalileoE1PcpsAmbiguousAcquisition class based on GSoC 2012 experiments. * * This test is a part of an experiment performed by Luis Esteve in the * framework of the Google Summer of Code (GSoC) 2012, with the collaboration @@ -9,6 +9,9 @@ * to Galileo. The objective is perform a positive acquisition of in-orbit * Galileo signals in the E1 band. * + * Report: + * https://docs.google.com/document/d/1SZ3m1K7Qf9GsZQGEF7VSOEewBDCjbylCClw9rSXwG7Y/edit?pli=1 + * * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * diff --git a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc index ce8439c66..44faf6010 100644 --- a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc +++ b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc @@ -1,6 +1,7 @@ /*! * \file galileo_e1_pcps_ambiguous_acquisition_test.cc - * \brief This class implements an acquisition test based on some input parameters. + * \brief This class implements an acquisition test for + * GalileoE1PcpsAmbiguousAcquisition class based on some input parameters. * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * * diff --git a/src/tests/gnss_block/gnss_block_factory_test.cc b/src/tests/gnss_block/gnss_block_factory_test.cc index 28d5e98e8..7e78e4830 100644 --- a/src/tests/gnss_block/gnss_block_factory_test.cc +++ b/src/tests/gnss_block/gnss_block_factory_test.cc @@ -1,8 +1,12 @@ /*! * \file gnss_block_factory_test.cc - * \brief This class implements a Unit Test for the class GNSSBlockFactory.. - * \authors Carlos Avilés, 2010. carlos.avilesr(at)googlemail.com - * Luis Esteve, 2012. luis(at)epsilon-formacion.com + * \brief This class implements a Unit Test for the GNSSBlockFactory class. + * \authors
      + *
    • Carlos Avilés, 2010. carlos.avilesr(at)googlemail.com + *
    • Luis Esteve, 2012. luis(at)epsilon-formacion.com + *
    + * + * This class test the instantiation of all blocks in gnss_block_factory * * ------------------------------------------------------------------------- * diff --git a/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_test.cc index 1e2a8e380..1e36bb331 100644 --- a/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_test.cc @@ -1,6 +1,7 @@ /*! * \file gps_l1_ca_pcps_acquisition_test.cc - * \brief This class implements an acquisition test based on some input parameters. + * \brief This class implements an acquisition test for + * GpsL1CaPcpsAcquisition class based on some input parameters. * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com * *