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