1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Rename pcps_acquisition_cc to pcps_acquisition

This commit is contained in:
Carles Fernandez 2018-02-07 08:43:44 +01:00
parent 14d9636c9a
commit 413ab8c8cf
13 changed files with 144 additions and 144 deletions

View File

@ -93,11 +93,11 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
item_size_ = sizeof(lv_16sc_t);
}
else { item_size_ = sizeof(gr_complex); }
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
acquisition_ = pcps_make_acquisition(sampled_ms_, max_dwells_,
doppler_max_, if_, fs_in_, samples_per_ms, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_,
dump_filename_, item_size_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
@ -124,7 +124,7 @@ GalileoE1PcpsAmbiguousAcquisition::~GalileoE1PcpsAmbiguousAcquisition()
void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel)
{
channel_ = channel;
acquisition_cc_->set_channel(channel_);
acquisition_->set_channel(channel_);
}
@ -145,7 +145,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_cc_->set_threshold(threshold_);
acquisition_->set_threshold(threshold_);
}
@ -153,7 +153,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max
{
doppler_max_ = doppler_max;
acquisition_cc_->set_doppler_max(doppler_max_);
acquisition_->set_doppler_max(doppler_max_);
}
@ -161,7 +161,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_st
{
doppler_step_ = doppler_step;
acquisition_cc_->set_doppler_step(doppler_step_);
acquisition_->set_doppler_step(doppler_step_);
}
@ -169,19 +169,19 @@ void GalileoE1PcpsAmbiguousAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_sync
{
gnss_synchro_ = gnss_synchro;
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
acquisition_->set_gnss_synchro(gnss_synchro_);
}
signed int GalileoE1PcpsAmbiguousAcquisition::mag()
{
return acquisition_cc_->mag();
return acquisition_->mag();
}
void GalileoE1PcpsAmbiguousAcquisition::init()
{
acquisition_cc_->init();
acquisition_->init();
//set_local_code();
}
@ -213,20 +213,20 @@ void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
memcpy(&(code_[i*code_length_]), code, sizeof(gr_complex)*code_length_);
}
acquisition_cc_->set_local_code(code_);
acquisition_->set_local_code(code_);
delete[] code;
}
void GalileoE1PcpsAmbiguousAcquisition::reset()
{
acquisition_cc_->set_active(true);
acquisition_->set_active(true);
}
void GalileoE1PcpsAmbiguousAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
acquisition_->set_state(state);
}
@ -255,18 +255,18 @@ 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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -279,11 +279,11 @@ 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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
@ -292,7 +292,7 @@ void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -325,6 +325,6 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block()
gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_right_block()
{
return acquisition_cc_;
return acquisition_;
}

View File

@ -37,7 +37,7 @@
#include <gnuradio/blocks/float_to_complex.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_acquisition_cc.h"
#include "pcps_acquisition.h"
#include "complex_byte_to_float_x2.h"
#include <volk_gnsssdr/volk_gnsssdr.h>
@ -134,7 +134,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_cc_sptr acquisition_cc_;
pcps_acquisition_sptr acquisition_;
gr::blocks::stream_to_vector::sptr stream_to_vector_;
gr::blocks::float_to_complex::sptr float_to_complex_;
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;

View File

@ -89,10 +89,10 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
{
item_size_ = sizeof(gr_complex);
}
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
acquisition_ = pcps_make_acquisition(sampled_ms_, max_dwells_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_, dump_filename_, item_size_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
@ -119,7 +119,7 @@ GlonassL1CaPcpsAcquisition::~GlonassL1CaPcpsAcquisition()
void GlonassL1CaPcpsAcquisition::set_channel(unsigned int channel)
{
channel_ = channel;
acquisition_cc_->set_channel(channel_);
acquisition_->set_channel(channel_);
}
@ -138,7 +138,7 @@ void GlonassL1CaPcpsAcquisition::set_threshold(float threshold)
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_cc_->set_threshold(threshold_);
acquisition_->set_threshold(threshold_);
}
@ -146,7 +146,7 @@ void GlonassL1CaPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
{
doppler_max_ = doppler_max;
acquisition_cc_->set_doppler_max(doppler_max_);
acquisition_->set_doppler_max(doppler_max_);
}
@ -154,7 +154,7 @@ void GlonassL1CaPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
{
doppler_step_ = doppler_step;
acquisition_cc_->set_doppler_step(doppler_step_);
acquisition_->set_doppler_step(doppler_step_);
}
@ -162,19 +162,19 @@ void GlonassL1CaPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
{
gnss_synchro_ = gnss_synchro;
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
acquisition_->set_gnss_synchro(gnss_synchro_);
}
signed int GlonassL1CaPcpsAcquisition::mag()
{
return acquisition_cc_->mag();
return acquisition_->mag();
}
void GlonassL1CaPcpsAcquisition::init()
{
acquisition_cc_->init();
acquisition_->init();
set_local_code();
}
@ -192,20 +192,20 @@ void GlonassL1CaPcpsAcquisition::set_local_code()
sizeof(gr_complex)*code_length_);
}
acquisition_cc_->set_local_code(code_);
acquisition_->set_local_code(code_);
delete[] code;
}
void GlonassL1CaPcpsAcquisition::reset()
{
acquisition_cc_->set_active(true);
acquisition_->set_active(true);
}
void GlonassL1CaPcpsAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
acquisition_->set_state(state);
}
@ -238,18 +238,18 @@ void GlonassL1CaPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -262,11 +262,11 @@ void GlonassL1CaPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
@ -275,7 +275,7 @@ void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -308,5 +308,5 @@ gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block()
gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_right_block()
{
return acquisition_cc_;
return acquisition_;
}

View File

@ -39,7 +39,7 @@
#include <gnuradio/blocks/float_to_complex.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_acquisition_cc.h"
#include "pcps_acquisition.h"
#include "complex_byte_to_float_x2.h"
@ -135,7 +135,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_cc_sptr acquisition_cc_;
pcps_acquisition_sptr acquisition_;
gr::blocks::stream_to_vector::sptr stream_to_vector_;
gr::blocks::float_to_complex::sptr float_to_complex_;
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;

View File

@ -90,14 +90,14 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
{
item_size_ = sizeof(gr_complex);
}
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_, dump_filename_, item_size_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
acquisition_ = pcps_make_acquisition(sampled_ms_, max_dwells_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_, dump_filename_, item_size_);
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
if (item_type_.compare("cbyte") == 0)
{
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
@ -120,7 +120,7 @@ GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition()
void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel)
{
channel_ = channel;
acquisition_cc_->set_channel(channel_);
acquisition_->set_channel(channel_);
}
@ -139,7 +139,7 @@ void GpsL1CaPcpsAcquisition::set_threshold(float threshold)
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
acquisition_cc_->set_threshold(threshold_);
acquisition_->set_threshold(threshold_);
}
@ -147,7 +147,7 @@ void GpsL1CaPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
{
doppler_max_ = doppler_max;
acquisition_cc_->set_doppler_max(doppler_max_);
acquisition_->set_doppler_max(doppler_max_);
}
@ -155,7 +155,7 @@ void GpsL1CaPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
{
doppler_step_ = doppler_step;
acquisition_cc_->set_doppler_step(doppler_step_);
acquisition_->set_doppler_step(doppler_step_);
}
@ -163,19 +163,19 @@ void GpsL1CaPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
{
gnss_synchro_ = gnss_synchro;
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
acquisition_->set_gnss_synchro(gnss_synchro_);
}
signed int GpsL1CaPcpsAcquisition::mag()
{
return acquisition_cc_->mag();
return acquisition_->mag();
}
void GpsL1CaPcpsAcquisition::init()
{
acquisition_cc_->init();
acquisition_->init();
//set_local_code();
}
@ -192,20 +192,20 @@ void GpsL1CaPcpsAcquisition::set_local_code()
sizeof(gr_complex)*code_length_);
}
acquisition_cc_->set_local_code(code_);
acquisition_->set_local_code(code_);
delete[] code;
}
void GpsL1CaPcpsAcquisition::reset()
{
acquisition_cc_->set_active(true);
acquisition_->set_active(true);
}
void GpsL1CaPcpsAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
acquisition_->set_state(state);
}
@ -234,18 +234,18 @@ void GpsL1CaPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -258,11 +258,11 @@ void GpsL1CaPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
@ -271,7 +271,7 @@ void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -304,6 +304,6 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block()
gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_right_block()
{
return acquisition_cc_;
return acquisition_;
}

View File

@ -41,7 +41,7 @@
#include <gnuradio/blocks/float_to_complex.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_acquisition_cc.h"
#include "pcps_acquisition.h"
#include "complex_byte_to_float_x2.h"
#include <volk_gnsssdr/volk_gnsssdr.h>
@ -139,7 +139,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_cc_sptr acquisition_cc_;
pcps_acquisition_sptr acquisition_;
gr::blocks::stream_to_vector::sptr stream_to_vector_;
gr::blocks::float_to_complex::sptr float_to_complex_;
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;

View File

@ -90,11 +90,11 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
{
item_size_ = sizeof(gr_complex);
}
acquisition_cc_ = pcps_make_acquisition_cc(1, max_dwells_,
acquisition_ = pcps_make_acquisition(1, max_dwells_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_,
dump_filename_, item_size_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
@ -121,7 +121,7 @@ GpsL2MPcpsAcquisition::~GpsL2MPcpsAcquisition()
void GpsL2MPcpsAcquisition::set_channel(unsigned int channel)
{
channel_ = channel;
acquisition_cc_->set_channel(channel_);
acquisition_->set_channel(channel_);
}
@ -144,7 +144,7 @@ void GpsL2MPcpsAcquisition::set_threshold(float threshold)
DLOG(INFO) << "Channel " << channel_ <<" Threshold = " << threshold_;
acquisition_cc_->set_threshold(threshold_);
acquisition_->set_threshold(threshold_);
}
@ -152,7 +152,7 @@ void GpsL2MPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
{
doppler_max_ = doppler_max;
acquisition_cc_->set_doppler_max(doppler_max_);
acquisition_->set_doppler_max(doppler_max_);
}
@ -162,7 +162,7 @@ void GpsL2MPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
{
doppler_step_ = doppler_step;
acquisition_cc_->set_doppler_step(doppler_step_);
acquisition_->set_doppler_step(doppler_step_);
}
@ -170,19 +170,19 @@ void GpsL2MPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
{
gnss_synchro_ = gnss_synchro;
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
acquisition_->set_gnss_synchro(gnss_synchro_);
}
signed int GpsL2MPcpsAcquisition::mag()
{
return acquisition_cc_->mag();
return acquisition_->mag();
}
void GpsL2MPcpsAcquisition::init()
{
acquisition_cc_->init();
acquisition_->init();
//set_local_code();
}
@ -192,18 +192,18 @@ void GpsL2MPcpsAcquisition::set_local_code()
gps_l2c_m_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_);
acquisition_cc_->set_local_code(code_);
acquisition_->set_local_code(code_);
}
void GpsL2MPcpsAcquisition::reset()
{
acquisition_cc_->set_active(true);
acquisition_->set_active(true);
}
void GpsL2MPcpsAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
acquisition_->set_state(state);
}
@ -232,18 +232,18 @@ void GpsL2MPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -256,11 +256,11 @@ void GpsL2MPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
@ -269,7 +269,7 @@ void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -302,6 +302,6 @@ gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block()
gr::basic_block_sptr GpsL2MPcpsAcquisition::get_right_block()
{
return acquisition_cc_;
return acquisition_;
}

View File

@ -39,7 +39,7 @@
#include <gnuradio/blocks/float_to_complex.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_acquisition_cc.h"
#include "pcps_acquisition.h"
#include "complex_byte_to_float_x2.h"
#include <volk_gnsssdr/volk_gnsssdr.h>
@ -137,7 +137,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_cc_sptr acquisition_cc_;
pcps_acquisition_sptr acquisition_;
gr::blocks::stream_to_vector::sptr stream_to_vector_;
gr::blocks::float_to_complex::sptr float_to_complex_;
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;

View File

@ -89,11 +89,11 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
{
item_size_ = sizeof(gr_complex);
}
acquisition_cc_ = pcps_make_acquisition_cc(1, max_dwells_,
acquisition_ = pcps_make_acquisition(1, max_dwells_,
doppler_max_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_,
dump_filename_, item_size_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
@ -120,7 +120,7 @@ GpsL5iPcpsAcquisition::~GpsL5iPcpsAcquisition()
void GpsL5iPcpsAcquisition::set_channel(unsigned int channel)
{
channel_ = channel;
acquisition_cc_->set_channel(channel_);
acquisition_->set_channel(channel_);
}
@ -143,7 +143,7 @@ void GpsL5iPcpsAcquisition::set_threshold(float threshold)
DLOG(INFO) << "Channel " << channel_ <<" Threshold = " << threshold_;
acquisition_cc_->set_threshold(threshold_);
acquisition_->set_threshold(threshold_);
}
@ -151,7 +151,7 @@ void GpsL5iPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
{
doppler_max_ = doppler_max;
acquisition_cc_->set_doppler_max(doppler_max_);
acquisition_->set_doppler_max(doppler_max_);
}
@ -161,7 +161,7 @@ void GpsL5iPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
{
doppler_step_ = doppler_step;
acquisition_cc_->set_doppler_step(doppler_step_);
acquisition_->set_doppler_step(doppler_step_);
}
@ -169,19 +169,19 @@ void GpsL5iPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
{
gnss_synchro_ = gnss_synchro;
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
acquisition_->set_gnss_synchro(gnss_synchro_);
}
signed int GpsL5iPcpsAcquisition::mag()
{
return acquisition_cc_->mag();
return acquisition_->mag();
}
void GpsL5iPcpsAcquisition::init()
{
acquisition_cc_->init();
acquisition_->init();
}
void GpsL5iPcpsAcquisition::set_local_code()
@ -189,18 +189,18 @@ void GpsL5iPcpsAcquisition::set_local_code()
gps_l5i_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_);
acquisition_cc_->set_local_code(code_);
acquisition_->set_local_code(code_);
}
void GpsL5iPcpsAcquisition::reset()
{
acquisition_cc_->set_active(true);
acquisition_->set_active(true);
}
void GpsL5iPcpsAcquisition::set_state(int state)
{
acquisition_cc_->set_state(state);
acquisition_->set_state(state);
}
@ -229,18 +229,18 @@ void GpsL5iPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->connect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -253,11 +253,11 @@ void GpsL5iPcpsAcquisition::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_, 0);
}
else if (item_type_.compare("cshort") == 0)
{
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else if (item_type_.compare("cbyte") == 0)
{
@ -266,7 +266,7 @@ void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
top_block->disconnect(stream_to_vector_, 0, acquisition_, 0);
}
else
{
@ -299,6 +299,6 @@ gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block()
gr::basic_block_sptr GpsL5iPcpsAcquisition::get_right_block()
{
return acquisition_cc_;
return acquisition_;
}

View File

@ -39,7 +39,7 @@
#include <gnuradio/blocks/float_to_complex.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
#include "pcps_acquisition_cc.h"
#include "pcps_acquisition.h"
#include "complex_byte_to_float_x2.h"
#include <volk_gnsssdr/volk_gnsssdr.h>
@ -137,7 +137,7 @@ public:
private:
ConfigurationInterface* configuration_;
pcps_acquisition_cc_sptr acquisition_cc_;
pcps_acquisition_sptr acquisition_;
gr::blocks::stream_to_vector::sptr stream_to_vector_;
gr::blocks::float_to_complex::sptr float_to_complex_;
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;

View File

@ -18,7 +18,7 @@
set(ACQ_GR_BLOCKS_SOURCES
pcps_acquisition_cc.cc
pcps_acquisition.cc
pcps_assisted_acquisition_cc.cc
pcps_acquisition_fine_doppler_cc.cc
pcps_tong_acquisition_cc.cc

View File

@ -1,5 +1,5 @@
/*!
* \file pcps_acquisition_cc.cc
* \file pcps_acquisition.cc
* \brief This class implements a Parallel Code Phase Search Acquisition
* \authors <ul>
* <li> Javier Arribas, 2011. jarribas(at)cttc.es
@ -33,7 +33,7 @@
* -------------------------------------------------------------------------
*/
#include "pcps_acquisition_cc.h"
#include "pcps_acquisition.h"
#include <cstring>
#include <glog/logging.h>
#include <gnuradio/io_signature.h>
@ -46,7 +46,7 @@
using google::LogMessage;
pcps_acquisition_cc_sptr pcps_make_acquisition_cc(
pcps_acquisition_sptr pcps_make_acquisition(
unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
@ -54,20 +54,20 @@ pcps_acquisition_cc_sptr pcps_make_acquisition_cc(
bool dump, bool blocking,
std::string dump_filename, size_t it_size)
{
return pcps_acquisition_cc_sptr(
new pcps_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
return pcps_acquisition_sptr(
new pcps_acquisition(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
samples_per_code, bit_transition_flag, use_CFAR_algorithm_flag, dump, blocking, dump_filename, it_size));
}
pcps_acquisition_cc::pcps_acquisition_cc(
pcps_acquisition::pcps_acquisition(
unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
bool dump, bool blocking,
std::string dump_filename, size_t it_size) :
gr::block("pcps_acquisition_cc",
gr::block("pcps_acquisition",
gr::io_signature::make(1, 1, it_size * sampled_ms * samples_per_ms * ( bit_transition_flag ? 2 : 1 )),
gr::io_signature::make(0, 0, it_size * sampled_ms * samples_per_ms * ( bit_transition_flag ? 2 : 1 )) )
{
@ -133,14 +133,14 @@ pcps_acquisition_cc::pcps_acquisition_cc(
d_worker_active = false;
d_data_buffer = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
if(d_cshort)
{
d_data_buffer_sc = static_cast<lv_16sc_t*>(volk_gnsssdr_malloc(d_fft_size * sizeof(lv_16sc_t), volk_gnsssdr_get_alignment()));
}
{
d_data_buffer_sc = static_cast<lv_16sc_t*>(volk_gnsssdr_malloc(d_fft_size * sizeof(lv_16sc_t), volk_gnsssdr_get_alignment()));
}
grid_ = arma::fmat();
}
pcps_acquisition_cc::~pcps_acquisition_cc()
pcps_acquisition::~pcps_acquisition()
{
if (d_num_doppler_bins > 0)
{
@ -159,7 +159,7 @@ pcps_acquisition_cc::~pcps_acquisition_cc()
}
void pcps_acquisition_cc::set_local_code(std::complex<float> * code)
void pcps_acquisition::set_local_code(std::complex<float> * code)
{
// reset the intermediate frequency
d_freq = d_old_freq;
@ -189,7 +189,7 @@ void pcps_acquisition_cc::set_local_code(std::complex<float> * code)
}
bool pcps_acquisition_cc::is_fdma()
bool pcps_acquisition::is_fdma()
{
// Dealing with FDMA system
if( strcmp(d_gnss_synchro->Signal,"1G") == 0 )
@ -205,7 +205,7 @@ bool pcps_acquisition_cc::is_fdma()
}
void pcps_acquisition_cc::update_local_carrier(gr_complex* carrier_vector, int correlator_length_samples, float freq)
void pcps_acquisition::update_local_carrier(gr_complex* carrier_vector, int correlator_length_samples, float freq)
{
float phase_step_rad = GPS_TWO_PI * freq / static_cast<float>(d_fs_in);
float _phase[1];
@ -214,7 +214,7 @@ void pcps_acquisition_cc::update_local_carrier(gr_complex* carrier_vector, int c
}
void pcps_acquisition_cc::init()
void pcps_acquisition::init()
{
d_gnss_synchro->Flag_valid_acquisition = false;
d_gnss_synchro->Flag_valid_symbol_output = false;
@ -248,7 +248,7 @@ void pcps_acquisition_cc::init()
}
void pcps_acquisition_cc::update_grid_doppler_wipeoffs()
void pcps_acquisition::update_grid_doppler_wipeoffs()
{
// Create the carrier Doppler wipeoff signals
d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
@ -262,7 +262,7 @@ void pcps_acquisition_cc::update_grid_doppler_wipeoffs()
}
void pcps_acquisition_cc::set_state(int state)
void pcps_acquisition::set_state(int state)
{
gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler
d_state = state;
@ -286,7 +286,7 @@ void pcps_acquisition_cc::set_state(int state)
}
void pcps_acquisition_cc::send_positive_acquisition()
void pcps_acquisition::send_positive_acquisition()
{
// 6.1- Declare positive acquisition using a message port
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
@ -304,7 +304,7 @@ void pcps_acquisition_cc::send_positive_acquisition()
}
void pcps_acquisition_cc::send_negative_acquisition()
void pcps_acquisition::send_negative_acquisition()
{
// 6.2- Declare negative acquisition using a message port
//0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
@ -322,7 +322,7 @@ void pcps_acquisition_cc::send_negative_acquisition()
}
int pcps_acquisition_cc::general_work(int noutput_items __attribute__((unused)),
int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused)))
{
@ -375,7 +375,7 @@ int pcps_acquisition_cc::general_work(int noutput_items __attribute__((unused)),
}
else
{
gr::thread::thread d_worker(&pcps_acquisition_cc::acquisition_core, this, d_sample_counter);
gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter);
d_worker_active = true;
}
d_sample_counter += d_fft_size;
@ -387,7 +387,7 @@ int pcps_acquisition_cc::general_work(int noutput_items __attribute__((unused)),
}
void pcps_acquisition_cc::acquisition_core( unsigned long int samp_count )
void pcps_acquisition::acquisition_core( unsigned long int samp_count )
{
gr::thread::scoped_lock lk(d_setlock);

View File

@ -1,5 +1,5 @@
/*!
* \file pcps_acquisition_cc.h
* \file pcps_acquisition.h
* \brief This class implements a Parallel Code Phase Search Acquisition
*
* Acquisition strategy (Kay Borre book + CFAR threshold).
@ -49,8 +49,8 @@
* -------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_PCPS_ACQUISITION_CC_H_
#define GNSS_SDR_PCPS_ACQUISITION_CC_H_
#ifndef GNSS_SDR_PCPS_ACQUISITION_H_
#define GNSS_SDR_PCPS_ACQUISITION_H_
#include <string>
@ -61,12 +61,12 @@
#include "gnss_synchro.h"
class pcps_acquisition_cc;
class pcps_acquisition;
typedef boost::shared_ptr<pcps_acquisition_cc> pcps_acquisition_cc_sptr;
typedef boost::shared_ptr<pcps_acquisition> pcps_acquisition_sptr;
pcps_acquisition_cc_sptr
pcps_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
pcps_acquisition_sptr
pcps_make_acquisition(unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
@ -79,18 +79,18 @@ pcps_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
* Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver",
* Algorithm 1, for a pseudocode description of this implementation.
*/
class pcps_acquisition_cc: public gr::block
class pcps_acquisition: public gr::block
{
private:
friend pcps_acquisition_cc_sptr
pcps_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
friend pcps_acquisition_sptr
pcps_make_acquisition(unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
bool dump, bool blocking,
std::string dump_filename, size_t it_size);
pcps_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
pcps_acquisition(unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
@ -146,7 +146,7 @@ private:
arma::fmat grid_;
public:
~pcps_acquisition_cc();
~pcps_acquisition();
/*!
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
@ -246,4 +246,4 @@ public:
};
#endif /* GNSS_SDR_PCPS_ACQUISITION_CC_H_*/
#endif /* GNSS_SDR_PCPS_ACQUISITION_H_*/