Added documentation to the code

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@245 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Luis Esteve 2012-09-12 15:03:38 +00:00
parent 2ef8d7de8a
commit f0a0f94007
23 changed files with 365 additions and 173 deletions

View File

@ -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<int> *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<std::string>(channel_) + ".cboc", false);;
{
bool cboc = configuration_->property(
"Acquisition" + boost::lexical_cast<std::string>(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_;
}

View File

@ -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<int> *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:

View File

@ -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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* -------------------------------------------------------------------------
*
* 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_];

View File

@ -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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul> *
*
* -------------------------------------------------------------------------
*
* 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<int> *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:

View File

@ -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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* 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<float>(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_"<<d_gnss_synchro->System<<"_"<<d_gnss_synchro->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;
}
}

View File

@ -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).
* <ol>
* <li> Compute the input signal power estimation
* <li> Doppler serial search loop
* <li> Perform the FFT-based circular convolution (parallel time search)
* <li> Record the maximum peak and the associated synchronization parameters
* <li> Compute the test statistics and compare to the threshold
* <li> Declare positive or negative acquisition using a message queue
* </ol>
*
* \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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* -------------------------------------------------------------------------
*
* 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<float> * 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<int> *channel_internal_queue)
{
d_channel_internal_queue = channel_internal_queue;

View File

@ -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.
*
* -------------------------------------------------------------------------
*

View File

@ -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:

View File

@ -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);

View File

@ -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:

View File

@ -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:

View File

@ -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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* -------------------------------------------------------------------------
*

View File

@ -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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
@ -34,7 +51,7 @@
#include <gnuradio/gr_complex.h>
/*! 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

View File

@ -1,7 +1,10 @@
/*!
* \file correlator.cc
* \brief Highly optimized vector correlator class
* \author Javier Arribas, 2011. jarribas(at)cttc.es
* \authors <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* 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="<<signal_length_samples<<std::endl;
*E_out = 0;
*P_out = 0;
*L_out = 0;

View File

@ -1,7 +1,10 @@
/*!
* \file correlator.h
* \brief High optimized vector correlator class
* \author Javier Arribas, 2012. jarribas(at)cttc.es
* \authors <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* Class that implements a high optimized vector correlator class
* using the volk library

View File

@ -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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* -------------------------------------------------------------------------
*
@ -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}

View File

@ -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 <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* 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}

View File

@ -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
*
* -------------------------------------------------------------------------

View File

@ -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)

View File

@ -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
*
*

View File

@ -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
*
*

View File

@ -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 <ul>
* <li> Carlos Avilés, 2010. carlos.avilesr(at)googlemail.com
* <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
* </ul>
*
* This class test the instantiation of all blocks in gnss_block_factory
*
* -------------------------------------------------------------------------
*

View File

@ -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
*
*