GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
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-200M
32 *
33 * See https://www.gps.gov/sites/default/files/2025-07/IS-GPS-200M.pdf Appendix II
34 */
36{
37public:
38 /*!
39 * Default constructor
40 */
41 Gps_Utc_Model() = default;
42
43 // UTC parameters
44 double A0{}; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200M) [s]
45 double A1{}; //!< 1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200M) [s/s]
46 double A2{}; //!< 2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200M) [s/s]
47 int32_t tot{}; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200M) [s]
48 int32_t WN_T{}; //!< UTC reference week number [weeks]
49 int32_t 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 WN_LSF{}; //!< Week number at the end of which the leap second becomes effective [weeks]
51 int32_t DN{}; //!< Day number (DN) at the end of which the leap second becomes effective [days]
52 int32_t 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
59 * serialization. Here is used to save the ephemeris data on disk file.
60 */
61 inline void serialize(Archive& archive, const uint32_t version)
62 {
63 if (version)
64 {
65 };
66 archive& BOOST_SERIALIZATION_NVP(A0);
67 archive& BOOST_SERIALIZATION_NVP(A1);
68 archive& BOOST_SERIALIZATION_NVP(A2);
69 archive& BOOST_SERIALIZATION_NVP(tot);
70 archive& BOOST_SERIALIZATION_NVP(WN_T);
71 archive& BOOST_SERIALIZATION_NVP(DeltaT_LS);
72 archive& BOOST_SERIALIZATION_NVP(WN_LSF);
73 archive& BOOST_SERIALIZATION_NVP(DN);
74 archive& BOOST_SERIALIZATION_NVP(DeltaT_LSF);
75 archive& BOOST_SERIALIZATION_NVP(valid);
76 }
77};
78
79
80/** \} */
81/** \} */
82#endif // GNSS_SDR_GPS_UTC_MODEL_H
int32_t WN_LSF
Week number at the end of which the leap second becomes effective [weeks].
double A0
Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200M) [s].
Gps_Utc_Model()=default
int32_t DN
Day number (DN) at the end of which the leap second becomes effective [days].
int32_t DeltaT_LSF
Scheduled future or recent past (relative to NAV message upload) value of the delta time due to leap ...
int32_t DeltaT_LS
Delta time due to leap seconds [s]. Number of leap seconds since 6-Jan-1980 as transmitted by the GPS...
int32_t WN_T
UTC reference week number [weeks].
double A2
2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200M) [s/s]
double A1
1st order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200M) [s/s]
int32_t tot
Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200M) [s].