GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
glonass_gnav_utc_model.h
Go to the documentation of this file.
1 /*!
2  * \file glonass_gnav_utc_model.h
3  * \brief Interface of a GLONASS GNAV UTC MODEL storage
4  * \note Code added as part of GSoC 2017 program
5  * \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
6  * \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
7  *
8  * -----------------------------------------------------------------------------
9  *
10  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
11  *
12  * GNSS-SDR is a software defined Global Navigation
13  * Satellite Systems receiver
14  *
15  * This file is part of GNSS-SDR.
16  *
17  * SPDX-License-Identifier: GPL-3.0-or-later
18  *
19  * -----------------------------------------------------------------------------
20  */
21 
22 
23 #ifndef GNSS_SDR_GLONASS_GNAV_UTC_MODEL_H
24 #define GNSS_SDR_GLONASS_GNAV_UTC_MODEL_H
25 
26 #include <boost/serialization/nvp.hpp>
27 #include <cstdint>
28 
29 /*!
30  * \brief This class is a storage for the GLONASS GNAV UTC MODEL data as described in GLONASS ICD (Edition 5.1)
31  * \note Code added as part of GSoC 2017 program
32  * \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
33  */
35 {
36 public:
37  /*!
38  * Default constructor
39  */
40  Glonass_Gnav_Utc_Model() = default;
41 
42  bool valid{};
43  // Clock Parameters
44  double d_tau_c{}; //!< GLONASS time scale correction to UTC(SU) time. [s]
45  double d_tau_gps{}; //!< Correction to GPS time to GLONASS time [day]
46  double d_N_4{}; //!< Four year interval number starting from 1996 [4 year interval]
47  double d_N_A{}; //!< Calendar day number within the four-year period beginning since the leap year for Almanac data [days]
48  double d_B1{}; //!< Coefficient to determine DeltaUT1 [s]
49  double d_B2{}; //!< Coefficient to determine DeltaUT1 [s/msd]
50 
51  /*!
52  * \brief Computes the Coordinated Universal Time (UTC) and
53  * returns it in [s] (GLONASS ICD (Edition 5.1) Section 3.3.3 GLONASS Time)
54  */
55  double utc_time(double glonass_time_corrected);
56 
57  template <class Archive>
58  /*!
59  * \brief Serialize is a boost standard method to be called by the boost XML serialization. Here is used to save the almanac data on disk file.
60  */
61  void serialize(Archive& archive, const uint32_t version)
62  {
63  using boost::serialization::make_nvp;
64  if (version)
65  {
66  };
67  archive& make_nvp("valid", valid);
68  archive& make_nvp("d_tau_c", d_tau_c);
69  archive& make_nvp("d_tau_gps", d_tau_gps);
70  archive& make_nvp("d_N_4", d_N_4);
71  archive& make_nvp("d_N_A", d_N_A);
72  archive& make_nvp("d_B1", d_B1);
73  archive& make_nvp("d_B2", d_B2);
74  }
75 };
76 
77 #endif
double d_tau_c
GLONASS time scale correction to UTC(SU) time. [s].
double d_B1
Coefficient to determine DeltaUT1 [s].
double d_N_4
Four year interval number starting from 1996 [4 year interval].
void serialize(Archive &archive, const uint32_t version)
Serialize is a boost standard method to be called by the boost XML serialization. Here is used to sav...
double d_tau_gps
Correction to GPS time to GLONASS time [day].
double d_N_A
Calendar day number within the four-year period beginning since the leap year for Almanac data [days]...
This class is a storage for the GLONASS GNAV UTC MODEL data as described in GLONASS ICD (Edition 5...
double d_B2
Coefficient to determine DeltaUT1 [s/msd].
Glonass_Gnav_Utc_Model()=default
double utc_time(double glonass_time_corrected)
Computes the Coordinated Universal Time (UTC) and returns it in s