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
|
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2012-01-16 22:01:29 +00:00
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2012-01-16 22:01:29 +00:00
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2012-01-16 22:01:29 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2012-01-16 22:01:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_GNSS_SATELLITE_H
|
|
|
|
#define GNSS_SDR_GNSS_SATELLITE_H
|
2012-01-16 22:01:29 +00:00
|
|
|
|
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
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
/** \addtogroup Core
|
|
|
|
* \{ */
|
|
|
|
/** \addtogroup System_Parameters
|
|
|
|
* \{ */
|
|
|
|
|
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:
|
2020-06-23 07:47:58 +00:00
|
|
|
Gnss_Satellite() = default; //!< Default Constructor.
|
|
|
|
Gnss_Satellite(const std::string& system_, uint32_t PRN_); //!< Concrete GNSS satellite Constructor.
|
|
|
|
~Gnss_Satellite() = default; //!< Default Destructor.
|
|
|
|
|
|
|
|
Gnss_Satellite(const Gnss_Satellite& other) noexcept; //!< Copy constructor
|
2023-03-25 17:11:29 +00:00
|
|
|
Gnss_Satellite& operator=(const Gnss_Satellite&) noexcept; //!< Copy assignment operator
|
2020-06-23 07:47:58 +00:00
|
|
|
Gnss_Satellite(Gnss_Satellite&& other) noexcept; //!< Move constructor
|
|
|
|
Gnss_Satellite& operator=(Gnss_Satellite&& other) noexcept; //!< Move assignment operator
|
|
|
|
|
|
|
|
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-02-11 14:31:01 +00:00
|
|
|
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
|
|
|
|
|
2012-01-16 22:01:29 +00:00
|
|
|
private:
|
2019-07-07 16:41:50 +00:00
|
|
|
const std::set<std::string> system_set = {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"};
|
|
|
|
const std::map<std::string, std::string> satelliteSystem = {{"GPS", "G"}, {"Glonass", "R"}, {"SBAS", "S"}, {"Galileo", "E"}, {"Beidou", "C"}};
|
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_);
|
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_);
|
2020-06-23 07:47:58 +00:00
|
|
|
std::string system{};
|
|
|
|
std::string block{};
|
|
|
|
uint32_t PRN{};
|
|
|
|
int32_t rf_link{};
|
2012-01-16 22:01:29 +00:00
|
|
|
};
|
2020-11-01 12:37:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
/** \} */
|
|
|
|
/** \} */
|
|
|
|
#endif // GNSS_SDR_GNSS_SATELLITE_H
|