1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-07-03 02:22:54 +00:00

Code cleaning and documentation

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@151 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Carles Fernandez 2012-01-31 00:03:08 +00:00
parent 9625070ea9
commit c186828669
9 changed files with 91 additions and 81 deletions

View File

@ -1,5 +1,5 @@
/*!
* \file correlator.h
* \file correlator.cc
* \brief Highly optimized vector correlator class
* \author Javier Arribas, 2011. jarribas(at)cttc.es
*

View File

@ -39,7 +39,11 @@
/*!
* \brief High optimized vector correlator class
* \brief Class that implements carrier wipe-off and correlators.
*
* Implemented versions:
* - Generic: Standard C++ implementation.
* - Volk: uses VOLK (Vector-Optimized Library of Kernels) and uses the processor's SIMD instruction sets. See http://gnuradio.org/redmine/projects/gnuradio/wiki/Volk
*
*/
class Correlator

View File

@ -63,13 +63,11 @@ Gnss_Satellite::~Gnss_Satellite()
void Gnss_Satellite::reset()
{
system_set = {"GPS", "GLONASS", "SBAS", "Galileo", "Compass"};
satelliteSystem["GPS"] = "G";
satelliteSystem["GLONASS"] = "R";
satelliteSystem["SBAS"] = "S";
satelliteSystem["Galileo"] = "E";
satelliteSystem["Compass"] = "C";
PRN = 0;
system = std::string("");
block = std::string("");
@ -188,6 +186,10 @@ void Gnss_Satellite::set_PRN(unsigned int PRN_)
{
PRN = 11;
}
else if (PRN_ == 12)
{
PRN = 12;
}
else
{
DLOG(INFO) << "This PRN is not defined";
@ -228,8 +230,7 @@ std::string Gnss_Satellite::get_system() const
std::string Gnss_Satellite::get_system_short() const
{
// Get the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Compass"}
// Get the satellite system {"G", "R", "S", "E", "C"}
return satelliteSystem.at(system);
}
@ -479,6 +480,7 @@ void Gnss_Satellite::set_block(std::string system_, unsigned int PRN_ )
break;
case 120 :
block = std::string("EGNOS"); // EGNOS AOR-E Broadcast satellite http://www.egnos-pro.esa.int/index.html
break;
case 124 :
block = std::string("EGNOS"); // EGNOS ESA ARTEMIS used for EGNOS Operations
break;
@ -498,6 +500,7 @@ void Gnss_Satellite::set_block(std::string system_, unsigned int PRN_ )
break;
case 12 :
block = std::string("IOV"); // Galileo In-Orbit Validation (IOV) satellite FM2 (Flight Model 2) also known as GSAT0102, launched the same day
break;
default:
block = std::string("Unknown");
}

View File

@ -36,6 +36,8 @@
#include <set>
#include <iostream>
#include <map>
/*
* \brief This class represents a GNSS satellite.
*
@ -50,10 +52,10 @@ public:
~Gnss_Satellite(); //!< Default Destructor.
unsigned int get_PRN() const; //!< Gets satellite's PRN
std::string get_system() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Compass"}
std::string get_system_short() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Compass"}
std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"}
std::string get_block() const; //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"}
friend bool operator== (const Gnss_Satellite &, const Gnss_Satellite &); // operator== for comparison
friend std::ostream& operator<<(std::ostream &, const Gnss_Satellite &); // operator<< for pretty printing
friend bool operator== (const Gnss_Satellite &, const Gnss_Satellite &); //!< operator== for comparison
friend std::ostream& operator<<(std::ostream &, const Gnss_Satellite &); //!< operator<< for pretty printing
//Gnss_Satellite& operator=(const Gnss_Satellite &);
private:
unsigned int PRN;

View File

@ -34,24 +34,31 @@ Gnss_Signal::Gnss_Signal()
{
this->signal = "";
}
Gnss_Signal::Gnss_Signal(Gnss_Satellite satellite_,std::string signal_)
{
this->satellite = satellite_;
this->signal = signal_;
}
Gnss_Signal::~Gnss_Signal()
{
}
{}
std::string Gnss_Signal::get_signal() const
{
return this->signal;
}
Gnss_Satellite Gnss_Signal::get_satellite() const
{
return this->satellite;
}
std::ostream& operator<<(std::ostream &out, const Gnss_Signal &sig) // output
{
//std::string psystem = sat::get_system()
@ -59,6 +66,7 @@ std::ostream& operator<<(std::ostream &out, const Gnss_Signal &sig) // output
return out;
}
bool operator== (const Gnss_Signal &sig1, const Gnss_Signal &sig2)
{
bool equal = false;

View File

@ -41,7 +41,6 @@
*/
class Gnss_Signal
{
private:
Gnss_Satellite satellite;
std::string signal;
@ -53,7 +52,6 @@ public:
Gnss_Satellite get_satellite() const;
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
};
#endif

View File

@ -33,9 +33,6 @@
Gnss_Synchro::Gnss_Synchro()
{
// Satellite and signal info
//System=" ";
//Signal=" ";
PRN = 0;
// Acquisition
Acq_delay_samples = 0.0;
@ -65,5 +62,5 @@ Gnss_Synchro::Gnss_Synchro()
}
Gnss_Synchro::~Gnss_Synchro()
{
}
{}

View File

@ -1,6 +1,6 @@
/*!
* \file gnss_synchro.h
* \brief Implementation of the Gnss_Synchro class
* \brief Interface of the Gnss_Synchro class
* \author
* Luis Esteve, 2012. luis(at)epsilon-formacion.com
* Javier Arribas, 2012. jarribas(at)cttc.es
@ -33,16 +33,14 @@
#include "gnss_signal.h"
#include <string>
class Gnss_Synchro{
private:
/*!
* \brief This is the class that contains the information that flows through the blocks.
*/
class Gnss_Synchro
{
public:
Gnss_Synchro();
~Gnss_Synchro();
//Gnss_Signal Signal;
// Satellite and signal info
char System;
char Signal[3];
@ -72,7 +70,7 @@ public:
double Pseudorange_m;
double Pseudorange_timestamp_ms;
bool Flag_valid_pseudorange;
};
#endif