GNSS-SDR  0.0.14
An Open Source GNSS Software Defined Receiver
galileo_ephemeris.h
Go to the documentation of this file.
1 /*!
2  * \file galileo_ephemeris.h
3  * \brief Interface of a Galileo EPHEMERIS storage
4  * \author Javier Arribas, 2013. jarribas(at)cttc.es,
5  * \author Mara Branzanti 2013. mara.branzanti(at)gmail.com
6  *
7  * -----------------------------------------------------------------------------
8  *
9  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
10  * This file is part of GNSS-SDR.
11  *
12  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
13  * SPDX-License-Identifier: GPL-3.0-or-later
14  *
15  * -----------------------------------------------------------------------------
16  */
17 
18 
19 #ifndef GNSS_SDR_GALILEO_EPHEMERIS_H
20 #define GNSS_SDR_GALILEO_EPHEMERIS_H
21 
22 #include <boost/serialization/nvp.hpp>
23 #include <cstdint>
24 
25 /** \addtogroup Core
26  * \{ */
27 /** \addtogroup System_Parameters
28  * \{ */
29 
30 
31 /*!
32  * \brief This class is a storage and orbital model functions for the Galileo SV ephemeris data as described in Galileo ICD paragraph 5.1.1
33  * (See https://www.gsc-europa.eu/sites/default/files/sites/all/files/Galileo-OS-SIS-ICD.pdf )
34  *
35  */
37 {
38 public:
39  Galileo_Ephemeris() = default;
40 
41  void satellitePosition(double transmitTime); //!< Computes the ECEF SV coordinates and ECEF velocity
42  double Galileo_System_Time(double WN, double TOW); //!< Galileo System Time (GST), ICD paragraph 5.1.2
43  double sv_clock_drift(double transmitTime); //!< Satellite Time Correction Algorithm, ICD 5.1.4
44  double sv_clock_relativistic_term(double transmitTime); //!< Satellite Time Correction Algorithm, ICD 5.1.4
45 
46  /* Galileo ephemeris are 16 parameters and here are reported following the ICD order, paragraph 5.1.1.
47  The number in the name after underscore (_1, _2, _3 and so on) refers to the page were we can find that parameter */
48  int32_t IOD_ephemeris{};
49  int32_t IOD_nav_1{};
50  int32_t SV_ID_PRN_4{};
51  double M0_1{}; //!< Mean anomaly at reference time [semi-circles]
52  double delta_n_3{}; //!< Mean motion difference from computed value [semi-circles/sec]
53  double e_1{}; //!< Eccentricity
54  double A_1{}; //!< Square root of the semi-major axis [meters^1/2]
55  double OMEGA_0_2{}; //!< Longitude of ascending node of orbital plane at weekly epoch [semi-circles]
56  double i_0_2{}; //!< Inclination angle at reference time [semi-circles]
57  double omega_2{}; //!< Argument of perigee [semi-circles]
58  double OMEGA_dot_3{}; //!< Rate of right ascension [semi-circles/sec]
59  double iDot_2{}; //!< Rate of inclination angle [semi-circles/sec]
60  double C_uc_3{}; //!< Amplitude of the cosine harmonic correction term to the argument of latitude [radians]
61  double C_us_3{}; //!< Amplitude of the sine harmonic correction term to the argument of latitude [radians]
62  double C_rc_3{}; //!< Amplitude of the cosine harmonic correction term to the orbit radius [meters]
63  double C_rs_3{}; //!< Amplitude of the sine harmonic correction term to the orbit radius [meters]
64  double C_ic_4{}; //!< Amplitude of the cosine harmonic correction term to the angle of inclination [radians]
65  double C_is_4{}; //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians]
66  int32_t t0e_1{}; //!< Ephemeris reference time [s]
67 
68  /* Clock correction parameters */
69  int32_t t0c_4{}; //!< Clock correction data reference Time of Week [sec]
70  double af0_4{}; //!< SV clock bias correction coefficient [s]
71  double af1_4{}; //!< SV clock drift correction coefficient [s/s]
72  double af2_4{}; //!< SV clock drift rate correction coefficient [s/s^2]
73 
74  /* GST */
75  // Not belong to ephemeris set (page 1 to 4)
76  int32_t WN_5{}; //!< Week number
77  int32_t TOW_5{}; //!< Time of Week
78  double Galileo_satClkDrift{};
79  double Galileo_dtr{}; //!< relativistic clock correction term
80 
81  // SV status
82  int32_t SISA_3{};
83  int32_t E5a_HS{}; //!< E5a Signal Health Status
84  int32_t E5b_HS_5{}; //!< E5b Signal Health Status
85  int32_t E1B_HS_5{}; //!< E1B Signal Health Status
86  bool E5a_DVS{}; //!< E5a Data Validity Status
87  bool E5b_DVS_5{}; //!< E5b Data Validity Status
88  bool E1B_DVS_5{}; //!< E1B Data Validity Status
89  double BGD_E1E5a_5{}; //!< E1-E5a Broadcast Group Delay [s]
90  double BGD_E1E5b_5{}; //!< E1-E5b Broadcast Group Delay [s]
91 
92  // satellite positions
93  double d_satpos_X{}; //!< Earth-fixed coordinate x of the satellite [m]. Intersection of the IERS Reference Meridian (IRM) and the plane passing through the origin and normal to the Z-axis.
94  double d_satpos_Y{}; //!< Earth-fixed coordinate y of the satellite [m]. Completes a right-handed, Earth-Centered, Earth-Fixed orthogonal coordinate system.
95  double d_satpos_Z{}; //!< Earth-fixed coordinate z of the satellite [m]. The direction of the IERS (International Earth Rotation and Reference Systems Service) Reference Pole (IRP).
96 
97  // Satellite velocity
98  double d_satvel_X{}; //!< Earth-fixed velocity coordinate x of the satellite [m]
99  double d_satvel_Y{}; //!< Earth-fixed velocity coordinate y of the satellite [m]
100  double d_satvel_Z{}; //!< Earth-fixed velocity coordinate z of the satellite [m]
101 
102  uint32_t i_satellite_PRN{}; //!< SV PRN NUMBER
103 
104  bool flag_all_ephemeris{};
105 
106  template <class Archive>
107 
108  /*!
109  * \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.
110  */
111  inline void serialize(Archive& archive, const uint32_t version)
112  {
113  if (version)
114  {
115  };
116 
117  archive& BOOST_SERIALIZATION_NVP(i_satellite_PRN);
118 
119  archive& BOOST_SERIALIZATION_NVP(M0_1);
120  archive& BOOST_SERIALIZATION_NVP(delta_n_3);
121  archive& BOOST_SERIALIZATION_NVP(e_1);
122  archive& BOOST_SERIALIZATION_NVP(A_1);
123  archive& BOOST_SERIALIZATION_NVP(OMEGA_0_2);
124  archive& BOOST_SERIALIZATION_NVP(i_0_2);
125  archive& BOOST_SERIALIZATION_NVP(omega_2);
126  archive& BOOST_SERIALIZATION_NVP(OMEGA_dot_3);
127  archive& BOOST_SERIALIZATION_NVP(iDot_2);
128  archive& BOOST_SERIALIZATION_NVP(C_uc_3);
129  archive& BOOST_SERIALIZATION_NVP(C_us_3);
130  archive& BOOST_SERIALIZATION_NVP(C_rc_3);
131  archive& BOOST_SERIALIZATION_NVP(C_rs_3);
132  archive& BOOST_SERIALIZATION_NVP(C_ic_4);
133  archive& BOOST_SERIALIZATION_NVP(C_is_4);
134  archive& BOOST_SERIALIZATION_NVP(t0e_1);
135 
136  archive& BOOST_SERIALIZATION_NVP(t0c_4);
137  archive& BOOST_SERIALIZATION_NVP(af0_4);
138  archive& BOOST_SERIALIZATION_NVP(af1_4);
139  archive& BOOST_SERIALIZATION_NVP(af2_4);
140 
141  archive& BOOST_SERIALIZATION_NVP(WN_5);
142  archive& BOOST_SERIALIZATION_NVP(TOW_5);
143  archive& BOOST_SERIALIZATION_NVP(Galileo_satClkDrift);
144  archive& BOOST_SERIALIZATION_NVP(Galileo_dtr);
145 
146  archive& BOOST_SERIALIZATION_NVP(IOD_ephemeris);
147  archive& BOOST_SERIALIZATION_NVP(IOD_nav_1);
148 
149  archive& BOOST_SERIALIZATION_NVP(SISA_3);
150  archive& BOOST_SERIALIZATION_NVP(E5a_HS);
151  archive& BOOST_SERIALIZATION_NVP(E5b_HS_5);
152  archive& BOOST_SERIALIZATION_NVP(E1B_HS_5);
153  archive& BOOST_SERIALIZATION_NVP(E5a_DVS);
154  archive& BOOST_SERIALIZATION_NVP(E5b_DVS_5);
155  archive& BOOST_SERIALIZATION_NVP(E1B_DVS_5);
156 
157  archive& BOOST_SERIALIZATION_NVP(BGD_E1E5a_5);
158  archive& BOOST_SERIALIZATION_NVP(BGD_E1E5b_5);
159 
160  archive& BOOST_SERIALIZATION_NVP(flag_all_ephemeris);
161  }
162 
163 private:
164  /*
165  * Accounts for the beginning or end of week crossover
166  *
167  * \param[in] - time in seconds
168  * \param[out] - corrected time, in seconds
169  */
170  double check_t(double time);
171 };
172 
173 
174 /** \} */
175 /** \} */
176 #endif // GNSS_SDR_GALILEO_EPHEMERIS_H
int32_t E1B_HS_5
E1B Signal Health Status.
bool E5b_DVS_5
E5b Data Validity Status.
double C_is_4
Amplitude of the sine harmonic correction term to the angle of inclination [radians].
uint32_t i_satellite_PRN
SV PRN NUMBER.
int32_t E5a_HS
E5a Signal Health Status.
int32_t t0c_4
Clock correction data reference Time of Week [sec].
double d_satpos_Z
Earth-fixed coordinate z of the satellite [m]. The direction of the IERS (International Earth Rotatio...
double C_uc_3
Amplitude of the cosine harmonic correction term to the argument of latitude [radians].
double OMEGA_0_2
Longitude of ascending node of orbital plane at weekly epoch [semi-circles].
double Galileo_System_Time(double WN, double TOW)
Galileo System Time (GST), ICD paragraph 5.1.2.
double C_us_3
Amplitude of the sine harmonic correction term to the argument of latitude [radians].
bool E5a_DVS
E5a Data Validity Status.
double OMEGA_dot_3
Rate of right ascension [semi-circles/sec].
double sv_clock_relativistic_term(double transmitTime)
Satellite Time Correction Algorithm, ICD 5.1.4.
int32_t TOW_5
Time of Week.
double C_rc_3
Amplitude of the cosine harmonic correction term to the orbit radius [meters].
double omega_2
Argument of perigee [semi-circles].
double BGD_E1E5b_5
E1-E5b Broadcast Group Delay [s].
bool E1B_DVS_5
E1B Data Validity Status.
double BGD_E1E5a_5
E1-E5a Broadcast Group Delay [s].
double A_1
Square root of the semi-major axis [meters^1/2].
void satellitePosition(double transmitTime)
Computes the ECEF SV coordinates and ECEF velocity.
double delta_n_3
Mean motion difference from computed value [semi-circles/sec].
double C_rs_3
Amplitude of the sine harmonic correction term to the orbit radius [meters].
int32_t WN_5
Week number.
double d_satvel_Y
Earth-fixed velocity coordinate y of the satellite [m].
double af0_4
SV clock bias correction coefficient [s].
void serialize(Archive &archive, const uint32_t version)
Serialize is a boost standard method to be called by the boost XML serialization. Here is used to sav...
double d_satpos_Y
Earth-fixed coordinate y of the satellite [m]. Completes a right-handed, Earth-Centered, Earth-Fixed orthogonal coordinate system.
double d_satpos_X
Earth-fixed coordinate x of the satellite [m]. Intersection of the IERS Reference Meridian (IRM) and ...
double d_satvel_X
Earth-fixed velocity coordinate x of the satellite [m].
double sv_clock_drift(double transmitTime)
Satellite Time Correction Algorithm, ICD 5.1.4.
This class is a storage and orbital model functions for the Galileo SV ephemeris data as described in...
int32_t E5b_HS_5
E5b Signal Health Status.
double i_0_2
Inclination angle at reference time [semi-circles].
double iDot_2
Rate of inclination angle [semi-circles/sec].
double C_ic_4
Amplitude of the cosine harmonic correction term to the angle of inclination [radians].
double M0_1
Mean anomaly at reference time [semi-circles].
double Galileo_dtr
relativistic clock correction term
double af1_4
SV clock drift correction coefficient [s/s].
int32_t t0e_1
Ephemeris reference time [s].
double e_1
Eccentricity.
double af2_4
SV clock drift rate correction coefficient [s/s^2].
double d_satvel_Z
Earth-fixed velocity coordinate z of the satellite [m].