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 .
*
* GNSS - SDR is free software : you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
2015-01-08 18:49:59 +00:00
* ( at your option ) any later version .
2013-07-15 17:07:10 +00:00
*
* GNSS - SDR is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2018-05-13 20:49:11 +00:00
* along with GNSS - SDR . If not , see < https : //www.gnu.org/licenses/>.
2013-07-15 17:07:10 +00:00
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
# ifndef GNSS_SDR_GALILEO_EPHEMERIS_H_
# define GNSS_SDR_GALILEO_EPHEMERIS_H_
# 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
2016-10-22 11:46:22 +00:00
* ( See https : //www.gsc-europa.eu/system/files/galileo_documents/Galileo_OS_SIS_ICD.pdf )
2013-07-15 17:07:10 +00:00
*
*/
class Galileo_Ephemeris
{
public :
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 */
bool flag_all_ephemeris ;
2018-08-13 23:13:07 +00:00
int32_t IOD_ephemeris ;
int32_t IOD_nav_1 ;
int32_t SV_ID_PRN_4 ;
2018-03-03 01:03:39 +00:00
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
2018-03-25 17:47:28 +00:00
double A_1 ; //!< Square root of the semi-major axis [meters^1/2]
2018-03-03 01:03:39 +00:00
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]
2018-12-13 23:42:05 +00:00
int32_t t0e_1 ; //!< Ephemeris reference time [s]
2013-11-23 13:05:38 +00:00
/*Clock correction parameters*/
2018-12-13 23:42:05 +00:00
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
/*GST*/
2018-12-13 23:42:05 +00:00
// Not belong to ephemeris set (page 1 to 4)
int32_t WN_5 ; //!< Week number
int32_t TOW_5 ; //!< Time of Week
2013-11-23 13:05:38 +00:00
double Galileo_satClkDrift ;
2018-03-03 01:03:39 +00:00
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
2018-12-13 23:42:05 +00:00
int32_t SISA_3 ;
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
2018-08-13 23:13:07 +00:00
bool E5a_DVS ; //!< E5a Data Validity Status
2018-12-13 23:42:05 +00:00
bool E5b_DVS_5 ; //!< E5b Data Validity Status
bool E1B_DVS_5 ; //!< E1B Data Validity Status
2017-08-21 09:45:12 +00:00
2018-03-03 01:03:39 +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
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
2013-11-23 13:05:38 +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]
2018-08-13 23:13:07 +00:00
uint32_t i_satellite_PRN ; //!< SV PRN NUMBER
2013-08-16 12:45:30 +00:00
2018-03-03 01:03:39 +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 ( ) ;
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 ( flag_all_ephemeris ) ;
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 ) ;
2013-07-15 17:07:10 +00:00
}
} ;
# endif