GNSS-SDR  0.0.17
An Open Source GNSS Software Defined Receiver
galileo_has_data.h
Go to the documentation of this file.
1 /*!
2  * \file galileo_has_data.h
3  * \brief Class for Galileo HAS message type 1 data storage
4  * \author Carles Fernandez-Prades, 2020-2021 cfernandez(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9  * This file is part of GNSS-SDR.
10  *
11  * Copyright (C) 2010-2021 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 
18 #ifndef GNSS_SDR_GALILEO_HAS_DATA_H
19 #define GNSS_SDR_GALILEO_HAS_DATA_H
20 
21 #include <cstdint>
22 #include <string>
23 #include <vector>
24 
25 /** \addtogroup Core
26  * \{ */
27 /** \addtogroup System_Parameters
28  * \{ */
29 
30 struct mt1_header
31 {
32  uint16_t toh;
33  uint8_t mask_id;
34  uint8_t iod_id;
35  bool mask_flag;
36  bool orbit_correction_flag;
37  bool clock_fullset_flag;
38  bool clock_subset_flag;
39  bool code_bias_flag;
40  bool phase_bias_flag;
41  bool ura_flag;
42 };
43 
44 /*!
45  * \brief This class is a storage for Galileo HAS message type 1, as defined in
46  * Galileo High Accuracy Service E6-B Signal-In-Space Message Specification v1.2
47  * (April 2020).
48  */
50 {
51 public:
52  Galileo_HAS_data() = default;
53 
54  std::vector<std::string> get_signals_in_mask(uint8_t nsys) const; //!< Get a vector of Nsys std::string with signals in mask for system nsys, with 0 <= nsys < Nsys
55  std::vector<std::string> get_systems_string() const; //!< Get Nsys system name strings
56  std::vector<std::vector<float>> get_code_bias_m() const; //!< Get Nsat x Ncodes code biases in [m]
57  std::vector<std::vector<float>> get_phase_bias_cycle() const; //!< Get Nsat x Nphases phase biases in [cycles]
58  std::vector<float> get_delta_radial_m() const; //!< Get Nsat delta radial corrections in [m]
59  std::vector<float> get_delta_radial_m(uint8_t nsys) const; //!< Get delta radial corrections in [m] for system nsys, with 0 <= nsys < Nsys
60  std::vector<float> get_delta_along_track_m() const; //!< Get Nsat delta along_track corrections in [m]
61  std::vector<float> get_delta_along_track_m(uint8_t nsys) const; //!< Get alog-track corrections in [m] for system nsys, with 0 <= nsys < Nsys
62  std::vector<float> get_delta_cross_track_m() const; //!< Get Nsat delta cross_track corrections in [m]
63  std::vector<float> get_delta_cross_track_m(uint8_t nsys) const; //!< Get delta cross_track corrections in [m] for system nsys, with 0 <= nsys < Nsys
64  std::vector<float> get_delta_clock_c0_m() const; //!< Get Nsat delta clock C0 corrections in [m]
65  std::vector<float> get_delta_clock_c0_m(uint8_t nsys) const; //!< Get delta clock C0 corrections in [m] for system nsys, with 0 <= nsys < Nsys
66  std::vector<int> get_PRNs_in_mask(uint8_t nsys) const; //!< Get PRNs in mask for system nsys, with 0 <= nsys < Nsys
67  std::vector<int> get_PRNs_in_submask(uint8_t nsys) const; //!< Get PRNs in submask for system nsys, with 0 <= nsys < Nsys
68  std::vector<uint16_t> get_gnss_iod(uint8_t nsys) const; //!< Get GNSS IODs for for system nsys, with 0 <= nsys < Nsys
69  std::vector<uint8_t> get_num_satellites() const; //!< Get Nsys number of satellites
70  uint16_t get_nsat() const; //!< Get total number of satellites with corrections
71  uint16_t get_nsatprime() const; //!< Get number of satellites in clock subset corrections
72  uint16_t get_validity_interval_s(uint8_t validity_interval_index) const; //!< Get validity interbal in [s] from the validity_interval_index
73  uint8_t get_gnss_id(int nsat) const; //!< Get GNSS ID from the nsat satellite
74 
75  // Mask
76  std::vector<uint8_t> gnss_id_mask;
77  std::vector<uint64_t> satellite_mask;
78  std::vector<uint16_t> signal_mask;
79  std::vector<bool> cell_mask_availability_flag;
80  std::vector<std::vector<std::vector<bool>>> cell_mask;
81  std::vector<uint8_t> nav_message;
82 
83  // Orbit corrections
84  std::vector<uint16_t> gnss_iod;
85  std::vector<int16_t> delta_radial;
86  std::vector<int16_t> delta_along_track;
87  std::vector<int16_t> delta_cross_track;
88 
89  // Clock full-set corrections
90  std::vector<uint8_t> delta_clock_c0_multiplier;
91  std::vector<bool> iod_change_flag;
92  std::vector<int16_t> delta_clock_c0;
93 
94  // Clock subset corrections
95  std::vector<uint8_t> gnss_id_clock_subset;
96  std::vector<uint8_t> delta_clock_c0_multiplier_clock_subset;
97  std::vector<uint64_t> satellite_submask;
98  std::vector<std::vector<bool>> iod_change_flag_clock_subset;
99  std::vector<std::vector<int16_t>> delta_clock_c0_clock_subset;
100 
101  // Code bias
102  std::vector<std::vector<int16_t>> code_bias;
103 
104  // Phase bias
105  std::vector<std::vector<int16_t>> phase_bias;
106  std::vector<std::vector<uint8_t>> phase_discontinuity_indicator;
107 
108  // URA
109  std::vector<uint8_t> ura;
110 
111  mt1_header header;
112  uint8_t has_status;
113  uint8_t message_id;
114 
115  uint8_t Nsys; //!< Number of GNSS for which corrections are provided
116  uint8_t validity_interval_index_orbit_corrections; // in Orbit corrections
117  uint8_t validity_interval_index_clock_fullset_corrections; // in Clock full-set corrections
118  uint8_t validity_interval_index_clock_subset_corrections; // in Clock subset corrections
119  uint8_t Nsysprime; // in Clock subset corrections
120  uint8_t validity_interval_index_code_bias_corrections; // in Code bias
121  uint8_t validity_interval_index_phase_bias_corrections; // in Phase bias
122  uint8_t validity_interval_index_ura_corrections; // in URA
123 };
124 
125 
126 /** \} */
127 /** \} */
128 #endif // GNSS_SDR_GALILEO_HAS_DATA_H
std::vector< std::string > get_systems_string() const
Get Nsys system name strings.
uint16_t get_nsatprime() const
Get number of satellites in clock subset corrections.
std::vector< uint8_t > get_num_satellites() const
Get Nsys number of satellites.
std::vector< std::vector< float > > get_phase_bias_cycle() const
Get Nsat x Nphases phase biases in [cycles].
This class is a storage for Galileo HAS message type 1, as defined in Galileo High Accuracy Service E...
uint8_t Nsys
Number of GNSS for which corrections are provided.
std::vector< std::string > get_signals_in_mask(uint8_t nsys) const
Get a vector of Nsys std::string with signals in mask for system nsys, with 0 <= nsys < Nsys...
std::vector< uint16_t > get_gnss_iod(uint8_t nsys) const
Get GNSS IODs for for system nsys, with 0 <= nsys < Nsys.
std::vector< float > get_delta_along_track_m() const
Get Nsat delta along_track corrections in [m].
uint16_t get_validity_interval_s(uint8_t validity_interval_index) const
Get validity interbal in [s] from the validity_interval_index.
std::vector< int > get_PRNs_in_mask(uint8_t nsys) const
Get PRNs in mask for system nsys, with 0 <= nsys < Nsys.
uint8_t get_gnss_id(int nsat) const
Get GNSS ID from the nsat satellite.
std::vector< std::vector< float > > get_code_bias_m() const
Get Nsat x Ncodes code biases in [m].
std::vector< int > get_PRNs_in_submask(uint8_t nsys) const
Get PRNs in submask for system nsys, with 0 <= nsys < Nsys.
std::vector< float > get_delta_cross_track_m() const
Get Nsat delta cross_track corrections in [m].
uint16_t get_nsat() const
Get total number of satellites with corrections.
std::vector< float > get_delta_radial_m() const
Get Nsat delta radial corrections in [m].
std::vector< float > get_delta_clock_c0_m() const
Get Nsat delta clock C0 corrections in [m].