2013-07-15 17:07:10 +00:00
/*!
2013-11-24 23:55:32 +00:00
* \ file galileo_ephemeris . h
2013-11-23 13:05:38 +00:00
* \ brief Interface of a Galileo EPHEMERIS storage
2013-11-24 23:55:32 +00:00
* \ author Javier Arribas , 2013. jarribas ( at ) cttc . es ,
2013-08-16 12:45:30 +00:00
* \ author Mara Branzanti 2013. mara . branzanti ( at ) gmail . com
2013-11-24 23:55:32 +00:00
*
2013-07-15 17:07:10 +00:00
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*
2019-07-26 10:38:20 +00:00
* Copyright ( C ) 2010 - 2019 ( see AUTHORS file for a list of contributors )
2013-07-15 17:07:10 +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
2013-07-15 17:07:10 +00:00
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
2020-02-08 09:10:46 +00:00
# ifndef GNSS_SDR_GALILEO_EPHEMERIS_H
# define GNSS_SDR_GALILEO_EPHEMERIS_H
2013-07-15 17:07:10 +00:00
# include <boost/serialization/nvp.hpp>
2018-08-13 23:13:07 +00:00
# include <cstdint>
2016-01-10 13:30:04 +00:00
2013-07-15 17:07:10 +00:00
/*!
2013-08-16 12:45:30 +00:00
* \ 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
2020-01-25 12:07:03 +00:00
* ( See https : //www.gsc-europa.eu/sites/default/files/sites/all/files/Galileo-OS-SIS-ICD.pdf )
2013-07-15 17:07:10 +00:00
*
*/
class Galileo_Ephemeris
{
public :
2020-06-10 08:15:59 +00:00
Galileo_Ephemeris ( ) = default ;
2020-06-23 07:47:58 +00:00
void satellitePosition ( double transmitTime ) ; //!< Computes the ECEF SV coordinates and ECEF velocity
double Galileo_System_Time ( double WN , double TOW ) ; //!< Galileo System Time (GST), ICD paragraph 5.1.2
double sv_clock_drift ( double transmitTime ) ; //!< Satellite Time Correction Algorithm, ICD 5.1.4
double sv_clock_relativistic_term ( double transmitTime ) ; //!< Satellite Time Correction Algorithm, ICD 5.1.4
2013-11-23 13:05:38 +00:00
/* Galileo ephemeris are 16 parameters and here are reported following the ICD order, paragraph 5.1.1.
The number in the name after underscore ( _1 , _2 , _3 and so on ) refers to the page were we can find that parameter */
2020-06-10 08:15:59 +00:00
int32_t IOD_ephemeris { } ;
int32_t IOD_nav_1 { } ;
int32_t SV_ID_PRN_4 { } ;
double M0_1 { } ; //!< Mean anomaly at reference time [semi-circles]
double delta_n_3 { } ; //!< Mean motion difference from computed value [semi-circles/sec]
double e_1 { } ; //!< Eccentricity
double A_1 { } ; //!< Square root of the semi-major axis [meters^1/2]
double OMEGA_0_2 { } ; //!< Longitude of ascending node of orbital plane at weekly epoch [semi-circles]
double i_0_2 { } ; //!< Inclination angle at reference time [semi-circles]
double omega_2 { } ; //!< Argument of perigee [semi-circles]
double OMEGA_dot_3 { } ; //!< Rate of right ascension [semi-circles/sec]
double iDot_2 { } ; //!< Rate of inclination angle [semi-circles/sec]
double C_uc_3 { } ; //!< Amplitude of the cosine harmonic correction term to the argument of latitude [radians]
double C_us_3 { } ; //!< Amplitude of the sine harmonic correction term to the argument of latitude [radians]
double C_rc_3 { } ; //!< Amplitude of the cosine harmonic correction term to the orbit radius [meters]
double C_rs_3 { } ; //!< Amplitude of the sine harmonic correction term to the orbit radius [meters]
double C_ic_4 { } ; //!< Amplitude of the cosine harmonic correction term to the angle of inclination [radians]
double C_is_4 { } ; //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians]
int32_t t0e_1 { } ; //!< Ephemeris reference time [s]
2013-11-23 13:05:38 +00:00
2020-06-10 08:15:59 +00:00
/* Clock correction parameters */
int32_t t0c_4 { } ; //!< Clock correction data reference Time of Week [sec]
double af0_4 { } ; //!< SV clock bias correction coefficient [s]
double af1_4 { } ; //!< SV clock drift correction coefficient [s/s]
double af2_4 { } ; //!< SV clock drift rate correction coefficient [s/s^2]
2013-11-23 13:05:38 +00:00
2020-06-10 08:15:59 +00:00
/* GST */
2018-12-13 23:42:05 +00:00
// Not belong to ephemeris set (page 1 to 4)
2020-06-10 08:15:59 +00:00
int32_t WN_5 { } ; //!< Week number
int32_t TOW_5 { } ; //!< Time of Week
double Galileo_satClkDrift { } ;
double Galileo_dtr { } ; //!< relativistic clock correction term
2013-11-23 13:05:38 +00:00
2014-09-03 16:57:37 +00:00
// SV status
2020-06-10 08:15:59 +00:00
int32_t SISA_3 { } ;
2020-06-23 07:47:58 +00:00
int32_t E5a_HS { } ; //!< E5a Signal Health Status
int32_t E5b_HS_5 { } ; //!< E5b Signal Health Status
int32_t E1B_HS_5 { } ; //!< E1B Signal Health Status
bool E5a_DVS { } ; //!< E5a Data Validity Status
bool E5b_DVS_5 { } ; //!< E5b Data Validity Status
bool E1B_DVS_5 { } ; //!< E1B Data Validity Status
2020-06-10 08:15:59 +00:00
double BGD_E1E5a_5 { } ; //!< E1-E5a Broadcast Group Delay [s]
double BGD_E1E5b_5 { } ; //!< E1-E5b Broadcast Group Delay [s]
2014-09-03 16:57:37 +00:00
2013-11-23 13:05:38 +00:00
// satellite positions
2020-06-10 08:15:59 +00:00
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.
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_Z { } ; //!< Earth-fixed coordinate z of the satellite [m]. The direction of the IERS (International Earth Rotation and Reference Systems Service) Reference Pole (IRP).
2013-07-15 17:07:10 +00:00
2013-08-16 12:45:30 +00:00
// Satellite velocity
2020-06-10 08:15:59 +00:00
double d_satvel_X { } ; //!< Earth-fixed velocity coordinate x of the satellite [m]
double d_satvel_Y { } ; //!< Earth-fixed velocity coordinate y of the satellite [m]
double d_satvel_Z { } ; //!< Earth-fixed velocity coordinate z of the satellite [m]
2013-11-23 13:05:38 +00:00
2020-06-10 08:15:59 +00:00
uint32_t i_satellite_PRN { } ; //!< SV PRN NUMBER
2013-08-16 12:45:30 +00:00
2020-06-23 07:47:58 +00:00
bool flag_all_ephemeris { } ;
2013-08-16 12:45:30 +00:00
2018-03-03 01:03:39 +00:00
template < class Archive >
2013-08-16 12:45:30 +00:00
2013-11-24 23:55:32 +00:00
/*!
* \ 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 .
*/
2018-08-13 23:13:07 +00:00
inline void serialize ( Archive & archive , const uint32_t version )
2013-07-15 17:07:10 +00:00
{
2018-03-03 01:03:39 +00:00
if ( version )
{
} ;
2018-11-20 16:46:06 +00:00
2018-11-26 20:00:47 +00:00
archive & BOOST_SERIALIZATION_NVP ( i_satellite_PRN ) ;
2018-11-20 16:46:06 +00:00
archive & BOOST_SERIALIZATION_NVP ( M0_1 ) ;
archive & BOOST_SERIALIZATION_NVP ( delta_n_3 ) ;
archive & BOOST_SERIALIZATION_NVP ( e_1 ) ;
archive & BOOST_SERIALIZATION_NVP ( A_1 ) ;
archive & BOOST_SERIALIZATION_NVP ( OMEGA_0_2 ) ;
archive & BOOST_SERIALIZATION_NVP ( i_0_2 ) ;
archive & BOOST_SERIALIZATION_NVP ( omega_2 ) ;
archive & BOOST_SERIALIZATION_NVP ( OMEGA_dot_3 ) ;
archive & BOOST_SERIALIZATION_NVP ( iDot_2 ) ;
archive & BOOST_SERIALIZATION_NVP ( C_uc_3 ) ;
archive & BOOST_SERIALIZATION_NVP ( C_us_3 ) ;
archive & BOOST_SERIALIZATION_NVP ( C_rc_3 ) ;
archive & BOOST_SERIALIZATION_NVP ( C_rs_3 ) ;
archive & BOOST_SERIALIZATION_NVP ( C_ic_4 ) ;
archive & BOOST_SERIALIZATION_NVP ( C_is_4 ) ;
archive & BOOST_SERIALIZATION_NVP ( t0e_1 ) ;
archive & BOOST_SERIALIZATION_NVP ( t0c_4 ) ;
archive & BOOST_SERIALIZATION_NVP ( af0_4 ) ;
archive & BOOST_SERIALIZATION_NVP ( af1_4 ) ;
archive & BOOST_SERIALIZATION_NVP ( af2_4 ) ;
archive & BOOST_SERIALIZATION_NVP ( WN_5 ) ;
archive & BOOST_SERIALIZATION_NVP ( TOW_5 ) ;
archive & BOOST_SERIALIZATION_NVP ( Galileo_satClkDrift ) ;
archive & BOOST_SERIALIZATION_NVP ( Galileo_dtr ) ;
2018-11-26 20:00:47 +00:00
archive & BOOST_SERIALIZATION_NVP ( IOD_ephemeris ) ;
archive & BOOST_SERIALIZATION_NVP ( IOD_nav_1 ) ;
2018-11-20 16:46:06 +00:00
archive & BOOST_SERIALIZATION_NVP ( SISA_3 ) ;
archive & BOOST_SERIALIZATION_NVP ( E5a_HS ) ;
archive & BOOST_SERIALIZATION_NVP ( E5b_HS_5 ) ;
archive & BOOST_SERIALIZATION_NVP ( E1B_HS_5 ) ;
archive & BOOST_SERIALIZATION_NVP ( E5a_DVS ) ;
archive & BOOST_SERIALIZATION_NVP ( E5b_DVS_5 ) ;
archive & BOOST_SERIALIZATION_NVP ( E1B_DVS_5 ) ;
archive & BOOST_SERIALIZATION_NVP ( BGD_E1E5a_5 ) ;
archive & BOOST_SERIALIZATION_NVP ( BGD_E1E5b_5 ) ;
2020-06-23 07:47:58 +00:00
archive & BOOST_SERIALIZATION_NVP ( flag_all_ephemeris ) ;
2013-07-15 17:07:10 +00:00
}
} ;
# endif