mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-21 06:27:01 +00:00
Code cleaning
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@264 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
9b62455366
commit
6b33aadd0b
@ -53,7 +53,6 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(
|
||||
queue)
|
||||
{
|
||||
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
@ -101,33 +100,35 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GalileoE1PcpsAmbiguousAcquisition::~GalileoE1PcpsAmbiguousAcquisition()
|
||||
{
|
||||
delete[] code_;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
acquisition_cc_->set_threshold(threshold_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max)
|
||||
{
|
||||
@ -140,11 +141,11 @@ GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max)
|
||||
|
||||
}
|
||||
|
||||
|
||||
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_);
|
||||
@ -152,30 +153,31 @@ GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
|
||||
}
|
||||
|
||||
|
||||
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_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GalileoE1PcpsAmbiguousAcquisition::set_gnss_synchro(
|
||||
Gnss_Synchro* gnss_synchro)
|
||||
{
|
||||
gnss_synchro_ = gnss_synchro;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
signed int
|
||||
GalileoE1PcpsAmbiguousAcquisition::mag()
|
||||
{
|
||||
@ -189,6 +191,7 @@ GalileoE1PcpsAmbiguousAcquisition::mag()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GalileoE1PcpsAmbiguousAcquisition::init()
|
||||
{
|
||||
@ -197,28 +200,28 @@ GalileoE1PcpsAmbiguousAcquisition::init()
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GalileoE1PcpsAmbiguousAcquisition::reset()
|
||||
{
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
acquisition_cc_->set_active(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
@ -226,22 +229,26 @@ GalileoE1PcpsAmbiguousAcquisition::connect(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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
gr_basic_block_sptr
|
||||
GalileoE1PcpsAmbiguousAcquisition::get_left_block()
|
||||
{
|
||||
return stream_to_vector_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gr_basic_block_sptr
|
||||
GalileoE1PcpsAmbiguousAcquisition::get_right_block()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -30,8 +30,8 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_
|
||||
#ifndef GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_
|
||||
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_
|
||||
|
||||
#include "gnss_synchro.h"
|
||||
#include "acquisition_interface.h"
|
||||
@ -44,12 +44,9 @@ class ConfigurationInterface;
|
||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
||||
* for Galileo E1 Signals
|
||||
*/
|
||||
|
||||
class GalileoE1PcpsAmbiguousAcquisition: public AcquisitionInterface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
GalileoE1PcpsAmbiguousAcquisition(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams,
|
||||
unsigned int out_streams, gr_msg_queue_sptr queue);
|
||||
@ -122,7 +119,6 @@ public:
|
||||
void reset();
|
||||
|
||||
private:
|
||||
|
||||
ConfigurationInterface* configuration_;
|
||||
pcps_acquisition_cc_sptr acquisition_cc_;
|
||||
gr_block_sptr stream_to_vector_;
|
||||
@ -131,7 +127,6 @@ private:
|
||||
size_t item_size_;
|
||||
std::string item_type_;
|
||||
unsigned int vector_length_;
|
||||
|
||||
//unsigned int satellite_;
|
||||
unsigned int channel_;
|
||||
float threshold_;
|
||||
@ -144,15 +139,12 @@ private:
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float> * code_;
|
||||
Gnss_Synchro * gnss_synchro_;
|
||||
|
||||
|
||||
Gnss_Synchro * gnss_synchro_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
gr_msg_queue_sptr queue_;
|
||||
concurrent_queue<int> *channel_internal_queue_;
|
||||
|
||||
};
|
||||
|
||||
#endif /* GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_ */
|
||||
#endif /* GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_ */
|
||||
|
@ -95,10 +95,9 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
LOG_AT_LEVEL(WARNING) << item_type_
|
||||
<< " unknown acquisition item type";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition()
|
||||
{
|
||||
delete[] code_;
|
||||
@ -108,38 +107,36 @@ GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition()
|
||||
void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
acquisition_cc_->set_channel(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
acquisition_cc_->set_threshold(threshold_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::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_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::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_);
|
||||
@ -147,26 +144,28 @@ void GpsL1CaPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::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 GpsL1CaPcpsAcquisition::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 GpsL1CaPcpsAcquisition::mag()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
@ -179,6 +178,7 @@ signed int GpsL1CaPcpsAcquisition::mag()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::init(){
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
@ -187,15 +187,17 @@ void GpsL1CaPcpsAcquisition::init(){
|
||||
acquisition_cc_->init();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::reset()
|
||||
{
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
acquisition_cc_->set_active(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisition::connect(gr_top_block_sptr top_block)
|
||||
{
|
||||
|
||||
@ -206,20 +208,22 @@ void GpsL1CaPcpsAcquisition::connect(gr_top_block_sptr top_block)
|
||||
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gr_basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return stream_to_vector_;
|
||||
}
|
||||
|
||||
|
||||
gr_basic_block_sptr GpsL1CaPcpsAcquisition::get_right_block()
|
||||
{
|
||||
return acquisition_cc_;
|
||||
|
@ -46,12 +46,9 @@ class ConfigurationInterface;
|
||||
* \brief This class adapts a PCPS acquisition block to an AcquisitionInterface
|
||||
* for GPS L1 C/A signals
|
||||
*/
|
||||
|
||||
class GpsL1CaPcpsAcquisition: public AcquisitionInterface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
GpsL1CaPcpsAcquisition(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams,
|
||||
unsigned int out_streams, gr_msg_queue_sptr queue);
|
||||
@ -124,7 +121,6 @@ public:
|
||||
void reset();
|
||||
|
||||
private:
|
||||
|
||||
pcps_acquisition_cc_sptr acquisition_cc_;
|
||||
gr_block_sptr stream_to_vector_;
|
||||
gr_block_sptr complex_to_short_;
|
||||
@ -132,7 +128,6 @@ private:
|
||||
size_t item_size_;
|
||||
std::string item_type_;
|
||||
unsigned int vector_length_;
|
||||
|
||||
//unsigned int satellite_;
|
||||
unsigned int channel_;
|
||||
float threshold_;
|
||||
@ -145,15 +140,12 @@ private:
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float> * code_;
|
||||
Gnss_Synchro * gnss_synchro_;
|
||||
|
||||
|
||||
Gnss_Synchro * gnss_synchro_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
gr_msg_queue_sptr queue_;
|
||||
concurrent_queue<int> *channel_internal_queue_;
|
||||
|
||||
};
|
||||
|
||||
#endif /* GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user