GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
gps_cnav_navigation_message.h
Go to the documentation of this file.
1 /*!
2  * \file gps_cnav_navigation_message.h
3  * \brief Interface of a GPS CNAV Data message decoder
4  * \author Javier Arribas, 2015. jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 
21 #ifndef GNSS_SDR_GPS_CNAV_NAVIGATION_MESSAGE_H
22 #define GNSS_SDR_GPS_CNAV_NAVIGATION_MESSAGE_H
23 
24 
25 #include "GPS_CNAV.h"
26 #include "gps_cnav_ephemeris.h"
27 #include "gps_cnav_iono.h"
28 #include "gps_cnav_utc_model.h"
29 #include <bitset>
30 #include <cstdint>
31 #include <map>
32 #include <string>
33 #include <utility>
34 #include <vector>
35 
36 
37 /*!
38  * \brief This class decodes a GPS CNAV Data message as described in IS-GPS-200K
39  *
40  * See https://www.gps.gov/technical/icwg/IS-GPS-200K.pdf Appendix III
41  */
43 {
44 public:
45  /*!
46  * Default constructor
47  */
49 
50  void decode_page(std::bitset<GPS_CNAV_DATA_PAGE_BITS> data_bits);
51 
52  /*!
53  * \brief Obtain a GPS SV Ephemeris class filled with current SV data
54  */
56 
57  /*!
58  * \brief Check if we have a new iono record stored in the GPS ephemeris class
59  */
60  bool have_new_iono();
61 
62  /*!
63  * \brief Obtain a GPS ionospheric correction parameters class filled with current SV data
64  */
65  Gps_CNAV_Iono get_iono() const;
66 
67  /*!
68  * \brief Obtain a GPS UTC model parameters class filled with current SV data
69  */
71 
72  /*!
73  * \briefCheck if we have a new GPS UTC model record stored in the GPS ephemeris class
74  */
75  bool have_new_utc_model();
76 
77  /*!
78  * \brief Check if we have a new ephemeris stored in the GPS ephemeris class
79  */
80  bool have_new_ephemeris();
81 
82 private:
83  uint64_t read_navigation_unsigned(std::bitset<GPS_CNAV_DATA_PAGE_BITS> bits, const std::vector<std::pair<int32_t, int32_t>>& parameter) const;
84  int64_t read_navigation_signed(std::bitset<GPS_CNAV_DATA_PAGE_BITS> bits, const std::vector<std::pair<int32_t, int32_t>>& parameter) const;
85  bool read_navigation_bool(std::bitset<GPS_CNAV_DATA_PAGE_BITS> bits, const std::vector<std::pair<int32_t, int32_t>>& parameter) const;
86 
87  Gps_CNAV_Ephemeris ephemeris_record{};
88  Gps_CNAV_Iono iono_record{};
89  Gps_CNAV_Utc_Model utc_model_record{};
90 
91  std::map<int32_t, std::string> satelliteBlock; //!< Map that stores to which block the PRN belongs https://www.navcen.uscg.gov/?Do=constellationStatus
92 
93  int32_t d_TOW{};
94 
95  bool b_flag_ephemeris_1{};
96  bool b_flag_ephemeris_2{};
97  bool b_flag_iono_valid{}; //!< If set, it indicates that the ionospheric parameters are filled and are not yet read by the get_iono
98  bool b_flag_utc_valid{}; //!< If set, it indicates that the utc parameters are filled and are not yet read by the get_utc_model
99 };
100 
101 #endif
bool have_new_ephemeris()
Check if we have a new ephemeris stored in the GPS ephemeris class.
This class is a storage and orbital model functions for the GPS SV ephemeris data as described in IS-...
Interface of a GPS CNAV UTC MODEL storage.
Defines parameters for GPS CNAV.
Gps_CNAV_Iono get_iono() const
Obtain a GPS ionospheric correction parameters class filled with current SV data. ...
bool have_new_iono()
Check if we have a new iono record stored in the GPS ephemeris class.
This class is a storage for the GPS UTC MODEL data as described in in IS-GPS-200K.
Gps_CNAV_Utc_Model get_utc_model()
Obtain a GPS UTC model parameters class filled with current SV data.
This class decodes a GPS CNAV Data message as described in IS-GPS-200K.
Interface of a GPS CNAV IONOSPHERIC MODEL storage.
Interface of a GPS CNAV EPHEMERIS storage.
This class is a storage for the GPS IONOSPHERIC data as described in IS-GPS-200K. ...
Definition: gps_cnav_iono.h:33
Gps_CNAV_Ephemeris get_ephemeris() const
Obtain a GPS SV Ephemeris class filled with current SV data.