GNSS-SDR  0.0.21
An Open Source GNSS Software Defined Receiver
osnma_helper.h
Go to the documentation of this file.
1 /*!
2  * \file osnma_helper.h
3  * \brief Class for auxiliary osnma functions
4  * \author Carles Fernandez-Prades, 2024 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-2023 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 #ifndef GNSS_SDR_OSNMA_HELPER_H
18 #define GNSS_SDR_OSNMA_HELPER_H
19 
20 
21 #include <cstdint>
22 #include <ctime>
23 #include <string>
24 #include <vector>
25 
26 /** \addtogroup Core
27  * \{ */
28 /** \addtogroup Core_Receiver_Library
29  * \{ */
30 
32 {
33 public:
34  Osnma_Helper();
35  ~Osnma_Helper() = default;
36  uint32_t compute_gst(uint32_t WN, uint32_t TOW) const;
37  uint32_t compute_gst(std::tm& input);
38  uint32_t compute_gst_now();
39  uint32_t get_WN(uint32_t GST) const;
40  uint32_t get_TOW(uint32_t GST) const;
41  std::vector<uint8_t> gst_to_uint8(uint32_t GST) const;
42  std::vector<uint8_t> bytes(const std::string& binaryString) const;
43  std::string verification_status_str(int status) const;
44  std::string convert_to_hex_string(const std::vector<uint8_t>& vector) const;
45  std::vector<uint8_t> convert_from_hex_string(const std::string& hex_string) const; // TODO remove similar function in gnss_crypto
46  std::tm GST_START_EPOCH{};
47 };
48 
49 /** \} */
50 /** \} */
51 #endif // GNSS_SDR_OSNMA_HELPER_H