GNSS-SDR  0.0.21
An Open Source GNSS Software Defined Receiver
gnss_signal.h
Go to the documentation of this file.
1 /*!
2  * \file gnss_signal.h
3  * \brief Implementation of the Gnss_Signal class
4  * \author
5  * Luis Esteve, 2012. luis(at)epsilon-formacion.com
6  * Javier Arribas, 2012. jarribas(at)cttc.es
7  *
8  * -----------------------------------------------------------------------------
9  *
10  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
11  * This file is part of GNSS-SDR.
12  *
13  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
14  * SPDX-License-Identifier: GPL-3.0-or-later
15  *
16  * -----------------------------------------------------------------------------
17  */
18 
19 #ifndef GNSS_SDR_GNSS_SIGNAL_H
20 #define GNSS_SDR_GNSS_SIGNAL_H
21 
22 #include "gnss_satellite.h"
23 #include <ostream>
24 #include <string>
25 
26 /** \addtogroup Core
27  * \{ */
28 /** \addtogroup System_Parameters
29  * \{ */
30 
31 
32 /*!
33  * \brief This class represents a GNSS signal.
34  *
35  * Encapsulates a specific GNSS signal (e.g., GPS L1 C/A, Galileo E1B) and its
36  * associated satellite.
37  */
39 {
40 public:
41  Gnss_Signal() = default;
42  explicit Gnss_Signal(const std::string& signal_);
43  Gnss_Signal(const Gnss_Satellite& satellite_, const std::string& signal_);
44  ~Gnss_Signal() = default;
45 
46  /*!
47  * \brief Return the signal identifier string.
48  *
49  * - GPS: "1C" (L1 C/A), "2S" (L2C), "L5"
50  * - GLONASS: "1G" (L1 C/A), "2G" (L2 C/A)
51  * - Galileo: "1B" (E1B), "5X" (E5a), "7X" (E5b), "6C" (E6C)
52  * - BeiDou: "B1" (B1I), "B3" (B3I)
53  */
54  std::string get_signal_str() const;
55 
56  Gnss_Satellite get_satellite() const; //!< Get the Gnss_Satellite associated to the signal
57 
58  friend bool operator==(const Gnss_Signal& /*sig1*/, const Gnss_Signal& /*sig2*/); //!< operator== for comparison
59  friend std::ostream& operator<<(std::ostream& /*out*/, const Gnss_Signal& /*sig*/); //!< operator<< for pretty printing
60 
61 private:
62  Gnss_Satellite satellite{};
63  std::string signal{};
64 };
65 
66 
67 /** \} */
68 /** \} */
69 #endif // GNSS_SDR_GNSS_SIGNAL_H
std::string get_signal_str() const
Return the signal identifier string.
Interface of the Gnss_Satellite class.
This class represents a GNSS satellite.
Gnss_Satellite get_satellite() const
Get the Gnss_Satellite associated to the signal.
friend std::ostream & operator<<(std::ostream &, const Gnss_Signal &)
operator<< for pretty printing
This class represents a GNSS signal.
Definition: gnss_signal.h:38
friend bool operator==(const Gnss_Signal &, const Gnss_Signal &)
operator== for comparison