2012-01-16 22:01:29 +00:00
|
|
|
/*!
|
|
|
|
* \file gnss_satellite.h
|
|
|
|
* \brief Interface of the Gnss_Satellite class
|
|
|
|
* \author Carles Fernandez-Prades, 2012. cfernandez(at)cttc.es
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2018-05-13 20:49:11 +00:00
|
|
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
2012-01-16 22:01:29 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2014-09-14 17:08:32 +00:00
|
|
|
* (at your option) any later version.
|
2012-01-16 22:01:29 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-05-13 20:49:11 +00:00
|
|
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2012-01-16 22:01:29 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef GNSS_SDR_GNSS_SATELLITE_H_
|
|
|
|
#define GNSS_SDR_GNSS_SATELLITE_H_
|
|
|
|
|
2018-08-13 23:13:07 +00:00
|
|
|
#include <cstdint>
|
|
|
|
#include <map>
|
2019-03-05 07:59:04 +00:00
|
|
|
#include <ostream>
|
2012-01-16 22:01:29 +00:00
|
|
|
#include <set>
|
2018-12-09 21:00:09 +00:00
|
|
|
#include <string>
|
2012-01-31 00:03:08 +00:00
|
|
|
|
|
|
|
|
2013-01-28 23:50:09 +00:00
|
|
|
/*!
|
2012-01-16 22:01:29 +00:00
|
|
|
* \brief This class represents a GNSS satellite.
|
|
|
|
*
|
|
|
|
* It contains information about the space vehicles currently operational
|
|
|
|
* of GPS, Glonass, SBAS and Galileo constellations.
|
|
|
|
*/
|
|
|
|
class Gnss_Satellite
|
|
|
|
{
|
|
|
|
public:
|
2019-02-11 14:31:01 +00:00
|
|
|
Gnss_Satellite(); //!< Default Constructor.
|
|
|
|
Gnss_Satellite(const std::string& system_, uint32_t PRN_); //!< Concrete GNSS satellite Constructor.
|
|
|
|
~Gnss_Satellite(); //!< Default Destructor.
|
|
|
|
void update_PRN(uint32_t PRN); //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages
|
|
|
|
uint32_t get_PRN() const; //!< Gets satellite's PRN
|
|
|
|
int32_t get_rf_link() const; //!< Gets the satellite's rf link
|
|
|
|
std::string get_system() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"}
|
|
|
|
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"}
|
|
|
|
std::string what_block(const std::string& system_, uint32_t PRN_); //!< Gets the block of a given satellite
|
|
|
|
|
|
|
|
friend bool operator==(const Gnss_Satellite& /*sat1*/, const Gnss_Satellite& /*sat2*/); //!< operator== for comparison
|
|
|
|
friend std::ostream& operator<<(std::ostream& /*out*/, const Gnss_Satellite& /*sat*/); //!< operator<< for pretty printing
|
2019-07-05 11:08:00 +00:00
|
|
|
|
|
|
|
Gnss_Satellite(Gnss_Satellite&& other); //!< Copy constructor
|
|
|
|
Gnss_Satellite& operator=(const Gnss_Satellite&); //!< Copy assignment operator
|
|
|
|
Gnss_Satellite(const Gnss_Satellite& other); //!< Move constructor
|
|
|
|
Gnss_Satellite& operator=(Gnss_Satellite&& other); //!< Move assignment operator
|
|
|
|
|
2012-01-16 22:01:29 +00:00
|
|
|
private:
|
2018-08-13 23:13:07 +00:00
|
|
|
uint32_t PRN;
|
2012-01-16 22:01:29 +00:00
|
|
|
std::string system;
|
2018-03-03 01:03:39 +00:00
|
|
|
std::map<std::string, std::string> satelliteSystem;
|
2012-01-16 22:01:29 +00:00
|
|
|
std::string block;
|
2018-08-13 23:13:07 +00:00
|
|
|
int32_t rf_link;
|
2014-09-14 17:08:32 +00:00
|
|
|
void set_system(const std::string& system); // Sets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"}.
|
2018-08-13 23:13:07 +00:00
|
|
|
void set_PRN(uint32_t PRN); // Sets satellite's PRN
|
|
|
|
void set_block(const std::string& system_, uint32_t PRN_);
|
2018-03-03 01:03:39 +00:00
|
|
|
std::set<std::string> system_set; // = {"GPS", "GLONASS", "SBAS", "Galileo", "Compass"};
|
2012-01-16 22:01:29 +00:00
|
|
|
void reset();
|
2019-07-05 11:08:00 +00:00
|
|
|
void set_rf_link(int32_t rf_link_);
|
2012-01-16 22:01:29 +00:00
|
|
|
};
|
|
|
|
#endif
|