GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
galileo_cnav_message.h
Go to the documentation of this file.
1 /*!
2  * \file galileo_cnav_message.h
3  * \brief Implementation of a Galileo CNAV Data message as described in
4  * Galileo High Accuracy Service Signal-In-Space Interface Control Document
5  * (HAS SIS ICD) Issue 1.0, May 2022
6  * \author Carles Fernandez-Prades, 2020-2022 cfernandez(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-2022 (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_GALILEO_CNAV_MESSAGE_H
20 #define GNSS_SDR_GALILEO_CNAV_MESSAGE_H
21 
22 #include "Galileo_CNAV.h"
23 #include "galileo_has_page.h"
24 #include <bitset>
25 #include <cstdint>
26 #include <string>
27 #include <utility>
28 
29 /** \addtogroup Core
30  * \{ */
31 /** \addtogroup System_Parameters
32  * \{ */
33 
34 
35 /*!
36  * \brief This class handles the Galileo CNAV Data message, as described in the
37  * Galileo High Accuracy Service Signal-In-Space Interface Control Document
38  * (HAS SIS ICD) Issue 1.0, May 2022
39  */
41 {
42 public:
43  Galileo_Cnav_Message() = default;
44 
45  void read_HAS_page(const std::string& page_string);
46 
47  inline bool is_HAS_in_test_mode() const
48  {
49  return d_test_mode;
50  }
51 
52  inline bool is_HAS_page_dummy() const
53  {
54  return d_page_dummy;
55  }
56 
57  inline bool have_new_HAS_page() const
58  {
59  return d_new_HAS_page;
60  }
61 
62  inline Galileo_HAS_page get_HAS_encoded_page() const
63  {
64  return has_page;
65  }
66 
67  inline bool get_flag_CRC_test() const
68  {
69  return d_flag_CRC_test;
70  }
71 
72  inline void set_time_stamp(uint64_t time_stamp)
73  {
74  has_page.time_stamp = time_stamp;
75  }
76 
77  inline void set_tow(uint32_t tow)
78  {
79  has_page.tow = tow;
80  }
81 
82 private:
83  uint8_t read_has_page_header_parameter(const std::bitset<GALILEO_CNAV_PAGE_HEADER_BITS>& bits, const std::pair<int32_t, int32_t>& parameter) const;
84  bool CRC_test(const std::bitset<GALILEO_CNAV_BITS_FOR_CRC>& bits, uint32_t checksum) const;
85  void read_HAS_page_header(const std::string& page_string);
86 
87  Galileo_HAS_page has_page{};
88 
89  uint8_t d_has_page_status{};
90  uint8_t d_has_reserved{};
91  uint8_t d_received_message_page_id{};
92  uint8_t d_received_message_type{};
93  uint8_t d_received_message_id{};
94  uint8_t d_received_message_size{};
95 
96  bool d_test_mode{};
97  bool d_flag_CRC_test{};
98  bool d_page_dummy{};
99  bool d_new_HAS_page{};
100 };
101 
102 
103 /** \} */
104 /** \} */
105 #endif // GNSS_SDR_GALILEO_CNAV_MESSAGE_H
uint32_t tow
HAS page time of week, in [s].
uint64_t time_stamp
HAS page time stamp, in [s].
This class handles the Galileo CNAV Data message, as described in the Galileo High Accuracy Service S...
Galileo CNAV mesage constants. Data from: Galileo High Accuracy Service Signal-In-Space Interface Con...
Class for Galileo HAS message page storage.
This class is a storage for Galileo HAS message page, as defined in Galileo High Accuracy Service Sig...