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