diff --git a/docs/xml-schemas/cnav_utc_model.xsd b/docs/xml-schemas/cnav_utc_model.xsd index 5be4037b1..696a58454 100644 --- a/docs/xml-schemas/cnav_utc_model.xsd +++ b/docs/xml-schemas/cnav_utc_model.xsd @@ -1,14 +1,15 @@ - + - + + diff --git a/docs/xml-schemas/utc_model.xsd b/docs/xml-schemas/utc_model.xsd index 5e143b52d..a04437821 100644 --- a/docs/xml-schemas/utc_model.xsd +++ b/docs/xml-schemas/utc_model.xsd @@ -7,8 +7,9 @@ - + + diff --git a/src/core/system_parameters/beidou_dnav_iono.h b/src/core/system_parameters/beidou_dnav_iono.h index b675a45ba..29d620458 100644 --- a/src/core/system_parameters/beidou_dnav_iono.h +++ b/src/core/system_parameters/beidou_dnav_iono.h @@ -18,7 +18,7 @@ #ifndef GNSS_SDR_BEIDOU_DNAV_IONO_H #define GNSS_SDR_BEIDOU_DNAV_IONO_H -#include +#include "gps_iono.h" /** \addtogroup Core * \{ */ @@ -27,45 +27,13 @@ /*! - * \brief This class is a storage for the BEIDOU IONOSPHERIC data as described in ICD v2.1 - * + * \brief This class is a storage for the BEIDOU IONOSPHERIC data as described + * in ICD v2.1 */ -class Beidou_Dnav_Iono +class Beidou_Dnav_Iono : public Gps_Iono { public: Beidou_Dnav_Iono() = default; //!< Default constructor - - // Ionospheric parameters - double alpha0{}; //!< Coefficient 0 of a cubic equation representing the amplitude of the vertical delay [s] - double alpha1{}; //!< Coefficient 1 of a cubic equation representing the amplitude of the vertical delay [s/semi-circle] - double alpha2{}; //!< Coefficient 2 of a cubic equation representing the amplitude of the vertical delay [s(semi-circle)^2] - double alpha3{}; //!< Coefficient 3 of a cubic equation representing the amplitude of the vertical delay [s(semi-circle)^3] - double beta0{}; //!< Coefficient 0 of a cubic equation representing the period of the model [s] - double beta1{}; //!< Coefficient 1 of a cubic equation representing the period of the model [s/semi-circle] - double beta2{}; //!< Coefficient 2 of a cubic equation representing the period of the model [s(semi-circle)^2] - double beta3{}; //!< Coefficient 3 of a cubic equation representing the period of the model [s(semi-circle)^3] - - bool valid{}; //!< Valid flag - - template - - /*! - * \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. - */ - void serialize(Archive& archive, const unsigned int version) - { - if (version) - { - }; - archive& BOOST_SERIALIZATION_NVP(alpha0); - archive& BOOST_SERIALIZATION_NVP(alpha1); - archive& BOOST_SERIALIZATION_NVP(alpha2); - archive& BOOST_SERIALIZATION_NVP(alpha3); - archive& BOOST_SERIALIZATION_NVP(beta0); - archive& BOOST_SERIALIZATION_NVP(beta1); - archive& BOOST_SERIALIZATION_NVP(beta2); - archive& BOOST_SERIALIZATION_NVP(beta3); - } }; diff --git a/src/core/system_parameters/gps_cnav_iono.h b/src/core/system_parameters/gps_cnav_iono.h index e7ce74233..be4752f2b 100644 --- a/src/core/system_parameters/gps_cnav_iono.h +++ b/src/core/system_parameters/gps_cnav_iono.h @@ -18,8 +18,7 @@ #ifndef GNSS_SDR_GPS_CNAV_IONO_H #define GNSS_SDR_GPS_CNAV_IONO_H - -#include +#include "gps_iono.h" /** \addtogroup Core * \{ */ @@ -32,42 +31,10 @@ * * See https://www.gps.gov/technical/icwg/IS-GPS-200L.pdf Appendix III */ -class Gps_CNAV_Iono +class Gps_CNAV_Iono : public Gps_Iono { public: Gps_CNAV_Iono() = default; //!< Default constructor - - // Ionospheric parameters - double alpha0{}; //!< Coefficient 0 of a cubic equation representing the amplitude of the vertical delay [s] - double alpha1{}; //!< Coefficient 1 of a cubic equation representing the amplitude of the vertical delay [s/semi-circle] - double alpha2{}; //!< Coefficient 2 of a cubic equation representing the amplitude of the vertical delay [s(semi-circle)^2] - double alpha3{}; //!< Coefficient 3 of a cubic equation representing the amplitude of the vertical delay [s(semi-circle)^3] - double beta0{}; //!< Coefficient 0 of a cubic equation representing the period of the model [s] - double beta1{}; //!< Coefficient 1 of a cubic equation representing the period of the model [s/semi-circle] - double beta2{}; //!< Coefficient 2 of a cubic equation representing the period of the model [s(semi-circle)^2] - double beta3{}; //!< Coefficient 3 of a cubic equation representing the period of the model [s(semi-circle)^3] - bool valid{}; //!< Valid flag - - template - - /*! - * \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. - */ - inline void serialize(Archive& archive, const unsigned int version) const - { - if (version) - { - }; - archive& BOOST_SERIALIZATION_NVP(alpha0); - archive& BOOST_SERIALIZATION_NVP(alpha1); - archive& BOOST_SERIALIZATION_NVP(alpha2); - archive& BOOST_SERIALIZATION_NVP(alpha3); - archive& BOOST_SERIALIZATION_NVP(beta0); - archive& BOOST_SERIALIZATION_NVP(beta1); - archive& BOOST_SERIALIZATION_NVP(beta2); - archive& BOOST_SERIALIZATION_NVP(beta3); - } }; diff --git a/src/core/system_parameters/gps_cnav_utc_model.h b/src/core/system_parameters/gps_cnav_utc_model.h index 8e6f136fd..f13f94f60 100644 --- a/src/core/system_parameters/gps_cnav_utc_model.h +++ b/src/core/system_parameters/gps_cnav_utc_model.h @@ -18,8 +18,7 @@ #ifndef GNSS_SDR_GPS_CNAV_UTC_MODEL_H #define GNSS_SDR_GPS_CNAV_UTC_MODEL_H -#include -#include +#include "gps_utc_model.h" /** \addtogroup Core * \{ */ @@ -32,46 +31,10 @@ * * See https://www.gps.gov/technical/icwg/IS-GPS-200L.pdf Appendix III */ -class Gps_CNAV_Utc_Model +class Gps_CNAV_Utc_Model : public Gps_Utc_Model { public: - /*! - * Default constructor - */ - Gps_CNAV_Utc_Model() = default; - - // UTC parameters - double A2{}; //!< 2nd order term of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200L) [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-200L) [s/s] - double A0{}; //!< Constant of a model that relates GPS and UTC time (ref. 20.3.3.5.2.4 IS-GPS-200L) [s] - int32_t tot{}; //!< Reference time for UTC data (reference 20.3.4.5 and 20.3.3.5.2.4 IS-GPS-200L) [s] - int32_t WN_T{}; //!< UTC reference week number [weeks] - 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. - int32_t WN_LSF{}; //!< Week number at the end of which the leap second becomes effective [weeks] - 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 seconds [s] - bool valid{}; - - template - /* - * \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. - */ - inline void serialize(Archive& archive, const uint32_t version) - { - if (version) - { - }; - archive& BOOST_SERIALIZATION_NVP(A1); - archive& BOOST_SERIALIZATION_NVP(A0); - archive& BOOST_SERIALIZATION_NVP(tot); - archive& BOOST_SERIALIZATION_NVP(WN_T); - archive& BOOST_SERIALIZATION_NVP(DeltaT_LS); - archive& BOOST_SERIALIZATION_NVP(WN_LSF); - archive& BOOST_SERIALIZATION_NVP(DN); - archive& BOOST_SERIALIZATION_NVP(DeltaT_LSF); - archive& BOOST_SERIALIZATION_NVP(valid); - } + Gps_CNAV_Utc_Model() = default; //!< Default constructor }; diff --git a/src/core/system_parameters/gps_utc_model.h b/src/core/system_parameters/gps_utc_model.h index df87aa2ee..8cc77066a 100644 --- a/src/core/system_parameters/gps_utc_model.h +++ b/src/core/system_parameters/gps_utc_model.h @@ -63,8 +63,9 @@ public: if (version) { }; - archive& BOOST_SERIALIZATION_NVP(A1); archive& BOOST_SERIALIZATION_NVP(A0); + archive& BOOST_SERIALIZATION_NVP(A1); + archive& BOOST_SERIALIZATION_NVP(A2); archive& BOOST_SERIALIZATION_NVP(tot); archive& BOOST_SERIALIZATION_NVP(WN_T); archive& BOOST_SERIALIZATION_NVP(DeltaT_LS);