1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 19:50:34 +00:00

Change of member name to avoid get_signal().get_signal()

This commit is contained in:
Carles Fernandez 2015-05-10 21:37:54 +02:00
parent 8bd795e414
commit c99924fe5a
4 changed files with 9 additions and 10 deletions

View File

@ -175,7 +175,7 @@ gr::basic_block_sptr Channel::get_right_block()
void Channel::set_signal(Gnss_Signal gnss_signal)
{
gnss_signal_ = gnss_signal;
const char * str = gnss_signal_.get_signal().c_str(); // get a C style null terminated string
const char * str = gnss_signal_.get_signal_str().c_str(); // get a C style null terminated string
std::memcpy((void*)gnss_synchro_.Signal, str, 3); // copy string into synchro char array: 2 char + null
gnss_synchro_.Signal[2] = 0; // make sure that string length is only two characters
gnss_synchro_.PRN = gnss_signal_.get_satellite().get_PRN();

View File

@ -306,7 +306,7 @@ void GNSSFlowgraph::connect()
std::string default_signal = configuration_->property("Channel.signal", std::string("1C"));
std::string gnss_signal = (configuration_->property("Channel" + boost::lexical_cast<std::string>(i) + ".signal", default_signal));
while (gnss_signal.compare(available_GNSS_signals_.front().get_signal()) != 0 )
while (gnss_signal.compare(available_GNSS_signals_.front().get_signal_str()) != 0 )
{
available_GNSS_signals_.push_back(available_GNSS_signals_.front());
available_GNSS_signals_.pop_front();
@ -392,11 +392,11 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
switch (what)
{
case 0:
LOG(INFO) << "Channel " << who << " ACQ FAILED satellite " << channels_.at(who)->get_signal().get_satellite() << ", Signal " << channels_.at(who)->get_signal().get_signal();
LOG(INFO) << "Channel " << who << " ACQ FAILED satellite " << channels_.at(who)->get_signal().get_satellite() << ", Signal " << channels_.at(who)->get_signal().get_signal_str();
available_GNSS_signals_.push_back(channels_.at(who)->get_signal());
//TODO: Optimize the channel and signal matching!
while ( channels_.at(who)->get_signal().get_signal().compare(available_GNSS_signals_.front().get_signal()) != 0 )
while ( channels_.at(who)->get_signal().get_signal_str().compare(available_GNSS_signals_.front().get_signal_str()) != 0 )
{
available_GNSS_signals_.push_back(available_GNSS_signals_.front());
available_GNSS_signals_.pop_front();
@ -685,7 +685,7 @@ void GNSSFlowgraph::set_signals_list()
unsigned int sat = configuration_->property("Channel" + boost::lexical_cast<std::string>(i) + ".satellite", 0);
if (((sat == 0) || (sat == gnss_it->get_satellite().get_PRN())) and ( gnss_it->get_signal().compare(gnss_signal) == 0 ) ) // 0 = not PRN in configuration file
if (((sat == 0) || (sat == gnss_it->get_satellite().get_PRN())) and ( gnss_it->get_signal_str().compare(gnss_signal) == 0 ) ) // 0 = not PRN in configuration file
{
gnss_it++;
}

View File

@ -48,7 +48,7 @@ Gnss_Signal::~Gnss_Signal()
{}
std::string Gnss_Signal::get_signal() const
std::string Gnss_Signal::get_signal_str() const
{
return this->signal;
}
@ -62,8 +62,7 @@ Gnss_Satellite Gnss_Signal::get_satellite() const
std::ostream& operator<<(std::ostream &out, const Gnss_Signal &sig) // output
{
//std::string psystem = sat::get_system()
out << sig.get_satellite() << " Signal " << sig.get_signal() ;
out << sig.get_satellite() << " Signal " << sig.get_signal_str();
return out;
}
@ -74,7 +73,7 @@ bool operator==(const Gnss_Signal &sig1, const Gnss_Signal &sig2)
if (sig1.get_satellite() == sig2.get_satellite())
{
if (sig1.get_signal() == (sig2.get_signal()))
if (sig1.get_signal_str().compare(sig1.get_signal_str()))
{
equal = true;
}

View File

@ -49,7 +49,7 @@ public:
Gnss_Signal();
Gnss_Signal(const Gnss_Satellite& satellite_, const std::string& signal_);
~Gnss_Signal();
std::string get_signal() const; //!< Get the satellite signal {"1C" for GPS L1 C/A, "2S" for GPS L2C (M), "1B" for Galileo E1B, "5X" for Galileo E5a}
std::string get_signal_str() const; //!< Get the satellite signal {"1C" for GPS L1 C/A, "2S" for GPS L2C (M), "1B" for Galileo E1B, "5X" for Galileo E5a}
Gnss_Satellite get_satellite() const; //!< Get the Gnss_Satellite associated to the signal
friend bool operator== (const Gnss_Signal &, const Gnss_Signal &); //!< operator== for comparison
friend std::ostream& operator<<(std::ostream &, const Gnss_Signal &); //!< operator<< for pretty printing