GNSS-SDR  0.0.13
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  * 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_UTC_MODEL_H
22 #define GNSS_SDR_GPS_UTC_MODEL_H
23 
24 #include <boost/serialization/nvp.hpp>
25 #include <cstdint>
26 
27 /*!
28  * \brief This class is a storage for the GPS UTC MODEL data as described in IS-GPS-200K
29  *
30  * See https://www.gps.gov/technical/icwg/IS-GPS-200K.pdf Appendix II
31  */
33 {
34 public:
35  /*!
36  * Default constructor
37  */
38  Gps_Utc_Model() = default;
39 
40  // UTC parameters
41  double d_A0{}; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200K) [s]
42  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]
43  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]
44  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]
45  int32_t i_WN_T{}; //!< UTC reference week number [weeks]
46  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.
47  int32_t i_WN_LSF{}; //!< Week number at the end of which the leap second becomes effective [weeks]
48  int32_t i_DN{}; //!< Day number (DN) at the end of which the leap second becomes effective [days]
49  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]
50 
51  bool valid{};
52 
53  template <class Archive>
54  /*
55  * \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.
56  */
57  inline void serialize(Archive& archive, const uint32_t version)
58  {
59  using boost::serialization::make_nvp;
60  if (version)
61  {
62  };
63  archive& make_nvp("d_A1", d_A1);
64  archive& make_nvp("d_A0", d_A0);
65  archive& make_nvp("d_t_OT", d_t_OT);
66  archive& make_nvp("i_WN_T", i_WN_T);
67  archive& make_nvp("d_DeltaT_LS", d_DeltaT_LS);
68  archive& make_nvp("i_WN_LSF", i_WN_LSF);
69  archive& make_nvp("i_DN", i_DN);
70  archive& make_nvp("d_DeltaT_LSF", d_DeltaT_LSF);
71  archive& make_nvp("valid", valid);
72  }
73 };
74 
75 #endif
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:49
int32_t i_WN_LSF
Week number at the end of which the leap second becomes effective [weeks].
Definition: gps_utc_model.h:47
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:43
int32_t i_WN_T
UTC reference week number [weeks].
Definition: gps_utc_model.h:45
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:41
This class is a storage for the GPS UTC MODEL data as described in IS-GPS-200K.
Definition: gps_utc_model.h:32
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:44
int32_t i_DN
Day number (DN) at the end of which the leap second becomes effective [days].
Definition: gps_utc_model.h:48
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:42
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:46