2017-06-06 14:27:48 +00:00
|
|
|
/*!
|
|
|
|
* \file glonass_gnav_utc_model.h
|
|
|
|
* \brief Interface of a GLONASS GNAV UTC MODEL storage
|
2017-08-23 22:16:07 +00:00
|
|
|
* \note Code added as part of GSoC 2017 program
|
2017-06-06 14:27:48 +00:00
|
|
|
* \author Damian Miralles, 2017. dmiralles2009(at)gmail.com
|
2017-08-23 22:16:07 +00:00
|
|
|
* \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
|
2017-06-06 14:27:48 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2019-07-26 10:38:20 +00:00
|
|
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
2017-06-06 14:27:48 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2017-06-06 14:27:48 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_GLONASS_GNAV_UTC_MODEL_H
|
|
|
|
#define GNSS_SDR_GLONASS_GNAV_UTC_MODEL_H
|
2017-06-06 14:27:48 +00:00
|
|
|
|
|
|
|
#include <boost/serialization/nvp.hpp>
|
2018-08-13 23:13:07 +00:00
|
|
|
#include <cstdint>
|
2017-06-06 14:27:48 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief This class is a storage for the GLONASS GNAV UTC MODEL data as described in GLONASS ICD (Edition 5.1)
|
2017-08-17 04:40:05 +00:00
|
|
|
* \note Code added as part of GSoC 2017 program
|
|
|
|
* \see <a href="http://russianspacesystems.ru/wp-content/uploads/2016/08/ICD_GLONASS_eng_v5.1.pdf">GLONASS ICD</a>
|
2017-06-06 14:27:48 +00:00
|
|
|
*/
|
|
|
|
class Glonass_Gnav_Utc_Model
|
|
|
|
{
|
|
|
|
public:
|
2019-07-01 21:44:42 +00:00
|
|
|
/*!
|
|
|
|
* Default constructor
|
|
|
|
*/
|
|
|
|
Glonass_Gnav_Utc_Model();
|
|
|
|
|
2017-06-06 14:27:48 +00:00
|
|
|
bool valid;
|
2017-08-17 04:40:05 +00:00
|
|
|
// Clock Parameters
|
2018-03-03 01:03:39 +00:00
|
|
|
double d_tau_c; //!< GLONASS time scale correction to UTC(SU) time. [s]
|
|
|
|
double d_tau_gps; //!< Correction to GPS time to GLONASS time [day]
|
|
|
|
double d_N_4; //!< Four year interval number starting from 1996 [4 year interval]
|
|
|
|
double d_N_A; //!< Calendar day number within the four-year period beginning since the leap year for Almanac data [days]
|
|
|
|
double d_B1; //!< Coefficient to determine DeltaUT1 [s]
|
|
|
|
double d_B2; //!< Coefficient to determine DeltaUT1 [s/msd]
|
2017-06-21 04:44:44 +00:00
|
|
|
|
2019-07-01 21:44:42 +00:00
|
|
|
/*!
|
|
|
|
* \brief Computes the Coordinated Universal Time (UTC) and
|
|
|
|
* returns it in [s] (GLONASS ICD (Edition 5.1) Section 3.3.3 GLONASS Time)
|
|
|
|
*/
|
|
|
|
double utc_time(double glonass_time_corrected);
|
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
template <class Archive>
|
2017-06-21 04:44:44 +00:00
|
|
|
/*!
|
|
|
|
* \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.
|
|
|
|
*/
|
2018-08-13 23:13:07 +00:00
|
|
|
void serialize(Archive& archive, const uint32_t version)
|
2017-06-21 04:44:44 +00:00
|
|
|
{
|
|
|
|
using boost::serialization::make_nvp;
|
2018-03-03 01:03:39 +00:00
|
|
|
if (version)
|
|
|
|
{
|
|
|
|
};
|
|
|
|
archive& make_nvp("valid", valid);
|
|
|
|
archive& make_nvp("d_tau_c", d_tau_c);
|
|
|
|
archive& make_nvp("d_tau_gps", d_tau_gps);
|
|
|
|
archive& make_nvp("d_N_4", d_N_4);
|
|
|
|
archive& make_nvp("d_N_A", d_N_A);
|
|
|
|
archive& make_nvp("d_B1", d_B1);
|
|
|
|
archive& make_nvp("d_B2", d_B2);
|
2017-06-21 04:44:44 +00:00
|
|
|
}
|
2017-06-06 14:27:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|