GNSS-SDR  0.0.14
An Open Source GNSS Software Defined Receiver
gps_utc_model.h
Go to the documentation of this file.
1 /*!
2  * \file gps_utc_model.h
3  * \brief Interface of a GPS UTC MODEL storage
4  * \author Javier Arribas, 2013. jarribas(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-2020 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 
18 #ifndef GNSS_SDR_GPS_UTC_MODEL_H
19 #define GNSS_SDR_GPS_UTC_MODEL_H
20 
21 #include <boost/serialization/nvp.hpp>
22 #include <cstdint>
23 
24 /** \addtogroup Core
25  * \{ */
26 /** \addtogroup System_Parameters
27  * \{ */
28 
29 
30 /*!
31  * \brief This class is a storage for the GPS UTC MODEL data as described in IS-GPS-200K
32  *
33  * See https://www.gps.gov/technical/icwg/IS-GPS-200K.pdf Appendix II
34  */
36 {
37 public:
38  /*!
39  * Default constructor
40  */
41  Gps_Utc_Model() = default;
42 
43  // UTC parameters
44  double d_A0{}; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200K) [s]
45  double d_A1{}; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200K) [s/s]
46  double d_A2{}; //!< 2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200K) [s/s]
47  int32_t d_t_OT{}; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200K) [s]
48  int32_t i_WN_T{}; //!< UTC reference week number [weeks]
49  int32_t d_DeltaT_LS{}; //!< delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS almanac.
50  int32_t i_WN_LSF{}; //!< Week number at the end of which the leap second becomes effective [weeks]
51  int32_t i_DN{}; //!< Day number (DN) at the end of which the leap second becomes effective [days]
52  int32_t d_DeltaT_LSF{}; //!< Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap seconds [s]
53 
54  bool valid{};
55 
56  template <class Archive>
57  /*
58  * \brief Serialize is a boost standard method to be called by the boost XML serialization. Here is used to save the ephemeris data on disk file.
59  */
60  inline void serialize(Archive& archive, const uint32_t version)
61  {
62  using boost::serialization::make_nvp;
63  if (version)
64  {
65  };
66  archive& make_nvp("d_A1", d_A1);
67  archive& make_nvp("d_A0", d_A0);
68  archive& make_nvp("d_t_OT", d_t_OT);
69  archive& make_nvp("i_WN_T", i_WN_T);
70  archive& make_nvp("d_DeltaT_LS", d_DeltaT_LS);
71  archive& make_nvp("i_WN_LSF", i_WN_LSF);
72  archive& make_nvp("i_DN", i_DN);
73  archive& make_nvp("d_DeltaT_LSF", d_DeltaT_LSF);
74  archive& make_nvp("valid", valid);
75  }
76 };
77 
78 
79 /** \} */
80 /** \} */
81 #endif // GNSS_SDR_GPS_UTC_MODEL_H
int32_t d_DeltaT_LSF
Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap ...
Definition: gps_utc_model.h:52
int32_t i_WN_LSF
Week number at the end of which the leap second becomes effective [weeks].
Definition: gps_utc_model.h:50
double d_A2
2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200K) [s/s] ...
Definition: gps_utc_model.h:46
int32_t i_WN_T
UTC reference week number [weeks].
Definition: gps_utc_model.h:48
Gps_Utc_Model()=default
double d_A0
Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200K) [s]...
Definition: gps_utc_model.h:44
This class is a storage for the GPS UTC MODEL data as described in IS-GPS-200K.
Definition: gps_utc_model.h:35
int32_t d_t_OT
Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200K) [s].
Definition: gps_utc_model.h:47
int32_t i_DN
Day number (DN) at the end of which the leap second becomes effective [days].
Definition: gps_utc_model.h:51
double d_A1
1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200K) [s/s] ...
Definition: gps_utc_model.h:45
int32_t d_DeltaT_LS
delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS...
Definition: gps_utc_model.h:49