diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc index 98f1f299d..b0ae84044 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.cc @@ -300,14 +300,14 @@ void gps_l2_m_dll_pll_tracking_cc::update_local_carrier() { float phase_rad, phase_step_rad; - phase_step_rad = static_cast(GPS_TWO_PI) * d_carrier_doppler_hz / static_cast(d_fs_in); + phase_step_rad = static_cast(GPS_L2_TWO_PI) * d_carrier_doppler_hz / static_cast(d_fs_in); phase_rad = d_rem_carr_phase_rad; for(int i = 0; i < d_current_prn_length_samples; i++) { d_carr_sign[i] = gr_complex(cos(phase_rad), -sin(phase_rad)); phase_rad += phase_step_rad; } - //d_rem_carr_phase_rad = fmod(phase_rad, GPS_TWO_PI); + //d_rem_carr_phase_rad = fmod(phase_rad, GPS_L2_TWO_PI); //d_acc_carrier_phase_rad = d_acc_carrier_phase_rad + d_rem_carr_phase_rad; } @@ -413,7 +413,7 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int // ################## PLL ########################################################## // PLL discriminator - carr_error_hz = pll_cloop_two_quadrant_atan(*d_Prompt) / static_cast(GPS_TWO_PI); + carr_error_hz = pll_cloop_two_quadrant_atan(*d_Prompt) / static_cast(GPS_L2_TWO_PI); // Carrier discriminator filter carr_error_filt_hz = d_carrier_loop_filter.get_carrier_nco(carr_error_hz); // New carrier Doppler frequency estimation @@ -421,10 +421,10 @@ int gps_l2_m_dll_pll_tracking_cc::general_work (int noutput_items, gr_vector_int // New code Doppler frequency estimation d_code_freq_chips = GPS_L2_M_CODE_RATE_HZ + ((d_carrier_doppler_hz * GPS_L2_M_CODE_RATE_HZ) / GPS_L2_FREQ_HZ); //carrier phase accumulator for (K) doppler estimation - d_acc_carrier_phase_rad = d_acc_carrier_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * GPS_L2_M_PERIOD; + d_acc_carrier_phase_rad = d_acc_carrier_phase_rad + GPS_L2_TWO_PI * d_carrier_doppler_hz * GPS_L2_M_PERIOD; //remanent carrier phase to prevent overflow in the code NCO - d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * GPS_L2_M_PERIOD; - d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GPS_TWO_PI); + d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_L2_TWO_PI * d_carrier_doppler_hz * GPS_L2_M_PERIOD; + d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GPS_L2_TWO_PI); // ################## DLL ########################################################## // DLL discriminator diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h index 8432685b9..615df8cfd 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l2_m_dll_pll_tracking_cc.h @@ -45,7 +45,6 @@ #include #include #include "concurrent_queue.h" -#include "gps_sdr_signal_processing.h" #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" diff --git a/src/core/system_parameters/CMakeLists.txt b/src/core/system_parameters/CMakeLists.txt index 5a0a2bb5b..8fe5b0430 100644 --- a/src/core/system_parameters/CMakeLists.txt +++ b/src/core/system_parameters/CMakeLists.txt @@ -37,6 +37,7 @@ set(SYSTEM_PARAMETERS_SOURCES sbas_satellite_correction.cc sbas_telemetry_data.cc galileo_fnav_message.cc + gps_cnav_ephemeris.cc ) diff --git a/src/core/system_parameters/GPS_L2C.h b/src/core/system_parameters/GPS_L2C.h index e0c07541d..1e621a95e 100644 --- a/src/core/system_parameters/GPS_L2C.h +++ b/src/core/system_parameters/GPS_L2C.h @@ -33,6 +33,20 @@ #define GNSS_SDR_GPS_L2C_H_ #include +#include +#include +#include // std::pair +#include +#include "MATH_CONSTANTS.h" + +// Physical constants +const double GPS_L2_C_m_s = 299792458.0; //!< The speed of light, [m/s] +const double GPS_L2_C_m_ms = 299792.4580; //!< The speed of light, [m/ms] +const double GPS_L2_PI = 3.1415926535898; //!< Pi as defined in IS-GPS-200E +const double GPS_L2_TWO_PI = 6.283185307179586;//!< 2Pi as defined in IS-GPS-200E +const double GPS_L2_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Earth rotation rate, [rad/s] +const double GPS_L2_GM = 3.986005e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2] +const double GPS_L2_F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)] // carrier and code frequencies @@ -78,4 +92,120 @@ const int32_t GPS_L2C_M_INIT_REG[115] = 0706202440, 0705056276, 0020373522, 0746013617, 0132720621, 0434015513, 0566721727, 0140633660}; +// CNAV GPS NAVIGATION MESSAGE STRUCTURE +// NAVIGATION MESSAGE FIELDS POSITIONS (from IS-GPS-200E Appendix III) + +#define GPS_CNAV_PREAMBLE {1, 0, 0, 0, 1, 0, 1, 1} + +// common to all messages +const std::vector > CNAV_PRN( { {9,6} } ); +const std::vector > CNAV_MSG_TYPE( { {15,6} } ); +const std::vector > CNAV_TOW( { {21,17} } ); +const std::vector > CNAV_ALERT_FLAG( { {38,1} } ); + +// MESSAGE TYPE 10 (Ephemeris 1) + +const std::vector > CNAV_WN({{39,13}}); +const std::vector > CNAV_HEALTH({{52,3}}); +const std::vector > CNAV_TOP1({{55,11}}); +const double CNAV_TOP1_LSB = 300; +const std::vector > CNAV_URA({{66,5}}); + +const std::vector > CNAV_TOE1({{71,11}}); +const double CNAV_TOE1_LSB = 300; + +const std::vector > CNAV_DELTA_A({{82,26}}); //Relative to AREF = 26,559,710 meters +const double CNAV_DELTA_A_LSB = TWO_N9; + +const std::vector > CNAV_A_DOT({{108,25}}); +const double CNAV_A_DOT_LSB = TWO_N21; + +const std::vector > CNAV_DELTA_N0({{133,17}}); +const double CNAV_DELTA_N0_LSB = TWO_N44; +const std::vector > CNAV_DELTA_N0_DOT({{150,23}}); +const double CNAV_DELTA_N0_DOT_LSB = TWO_N57; +const std::vector > CNAV_M0({{173,33}}); +const double CNAV_M0_LSB = TWO_N32; +const std::vector > CNAV_E_ECCENTRICITY({{206,33}}); +const double CNAV_E_ECCENTRICITY_LSB = TWO_N34; +const std::vector > CNAV_OMEGA({{239,33}}); +const double CNAV_OMEGA_LSB = TWO_N32; +const std::vector > CNAV_INTEGRITY_FLAG({{272,1}}); +const std::vector > CNAV_L2_PHASING_FLAG({{273,1}}); + +// MESSAGE TYPE 11 (Ephemeris 2) + +const std::vector > CNAV_TOE2({{39,11}}); +const double CNAV_TOE2_LSB = 300; +const std::vector > CNAV_OMEGA0({{50,33}}); +const double CNAV_OMEGA0_LSB = TWO_N32; +const std::vector > CNAV_I0({{83,33}}); +const double CNAV_I0_LSB = TWO_N32; +const std::vector > CNAV_DELTA_OMEGA_DOT({{116,17}}); //Relative to REF = -2.6 x 10-9 semi-circles/second. +const double CNAV_DELTA_OMEGA_DOT_LSB = TWO_N44; +const std::vector > CNAV_I0_DOT({{133,15}}); +const double CNAV_I0_DOT_LSB = TWO_N44; +const std::vector > CNAV_CIS({{148,16}}); +const double CNAV_CIS_LSB = TWO_N30; +const std::vector > CNAV_CIC({{164,16}}); +const double CNAV_CIC_LSB = TWO_N30; +const std::vector > CNAV_CRS({{180,24}}); +const double CNAV_CRS_LSB = TWO_N8; +const std::vector > CNAV_CRC({{204,24}}); +const double CNAV_CRC_LSB = TWO_N8; +const std::vector > CNAV_CUS({{228,21}}); +const double CNAV_CUS_LSB = TWO_N30; +const std::vector > CNAV_CUC({{249,21}}); +const double CNAV_CUC_LSB = TWO_N30; + + +// MESSAGE TYPE 30 (CLOCK, IONO, GRUP DELAY) + +const std::vector > CNAV_TOP2({{39,11}}); +const double CNAV_TOP2_LSB = 300; + +const std::vector > CNAV_URA_NED0({{50,5}}); +const std::vector > CNAV_URA_NED1({{55,3}}); +const std::vector > CNAV_URA_NED2({{58,3}}); +const std::vector > CNAV_TOC({{61,11}}); +const double CNAV_TOC_LSB = 300; +const std::vector > CNAV_AF0({{72,26}}); +const double CNAV_AF0_LSB = TWO_N60; +const std::vector > CNAV_AF1({{98,20}}); +const double CNAV_AF1_LSB = TWO_N48; +const std::vector > CNAV_AF2({{118,10}}); +const double CNAV_AF2_LSB = TWO_N35; +const std::vector > CNAV_TGD({{128,13}}); +const double CNAV_TGD_LSB = TWO_N35; +const std::vector > CNAV_ISCL1({{141,13}}); +const double CNAV_ISCL1_LSB = TWO_N35; +const std::vector > CNAV_ISCL2({{154,13}}); +const double CNAV_ISCL2_LSB = TWO_N35; +const std::vector > CNAV_ISCL5I({{167,13}}); +const double CNAV_ISCL5I_LSB = TWO_N35; +const std::vector > CNAV_ISCL5Q({{180,13}}); +const double CNAV_ISCL5Q_LSB = TWO_N35; +const std::vector > CNAV_ALPHA0({{193,8}}); +const double CNAV_ALPHA0_LSB = TWO_N30; +const std::vector > CNAV_ALPHA1({{201,8}}); +const double CNAV_ALPHA1_LSB = TWO_N27; +const std::vector > CNAV_ALPHA2({{209,8}}); +const double CNAV_ALPHA2_LSB = TWO_N24; +const std::vector > CNAV_ALPHA3({{217,8}}); +const double CNAV_ALPHA3_LSB = TWO_N24; +const std::vector > CNAV_BETA0({{225,8}}); +const double CNAV_BETA0_LSB = TWO_P11; +const std::vector > CNAV_BETA1({{233,8}}); +const double CNAV_BETA1_LSB = TWO_P14; +const std::vector > CNAV_BETA2({{241,8}}); +const double CNAV_BETA2_LSB = TWO_P16; +const std::vector > CNAV_BETA3({{249,8}}); +const double CNAV_BETA3_LSB = TWO_P16; +const std::vector > CNAV_WNOP({{257,8}}); + + +// TODO: Add more frames (Almanac, etc...) + + + #endif /* GNSS_SDR_GPS_L2C_H_ */ diff --git a/src/core/system_parameters/MATH_CONSTANTS.h b/src/core/system_parameters/MATH_CONSTANTS.h index a4876c19e..9b2f7b61a 100644 --- a/src/core/system_parameters/MATH_CONSTANTS.h +++ b/src/core/system_parameters/MATH_CONSTANTS.h @@ -76,12 +76,17 @@ const double TWO_N35 = (2.91038304567337e-011); //!< 2^-35 const double TWO_N38 = (3.637978807091713e-012); //!< 2^-38 const double TWO_N43 = (1.136868377216160e-013); //!< 2^-43 +const double TWO_N44 = (5.684341886080802e-14); //!< 2^-44 const double TWO_N46 = (1.4210854715202e-014); //!< 2^-46 +const double TWO_N48 = (3.552713678800501e-15); //!< 2^-46 const double TWO_N50 = (8.881784197001252e-016); //!< 2^-50 const double TWO_N51 = (4.44089209850063e-016); //!< 2^-51 const double TWO_N55 = (2.775557561562891e-017); //!< 2^-55 +const double TWO_N57 = (6.938893903907228e-18); //!< 2^-57 const double TWO_N59 = (1.73472347597681e-018); //!< 2^-59 +const double TWO_N60 = (8.673617379884036e-19); //!< 2^-60 + const double PI_TWO_N19 = (5.992112452678286e-006); //!< Pi*2^-19 const double PI_TWO_N43 = (3.571577341960839e-013); //!< Pi*2^-43 diff --git a/src/core/system_parameters/gps_cnav_ephemeris.cc b/src/core/system_parameters/gps_cnav_ephemeris.cc new file mode 100644 index 000000000..c791d4fbb --- /dev/null +++ b/src/core/system_parameters/gps_cnav_ephemeris.cc @@ -0,0 +1,115 @@ +/*! + * \file Gps_CNAV_Ephemeris.cc + * \brief Interface of a GPS CNAV EPHEMERIS storage and orbital model functions + * + * See http://www.gps.gov/technical/icwg/IS-GPS-200E.pdf Appendix II + * \author Javier Arribas, 2015. jarribas(at)cttc.es + * + * ------------------------------------------------------------------------- + * + * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * + * 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 + * (at your option) any later version. + * + * 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 + * along with GNSS-SDR. If not, see . + * + * ------------------------------------------------------------------------- + */ + +#include "gps_cnav_ephemeris.h" + +Gps_CNAV_Ephemeris::Gps_CNAV_Ephemeris() +{ + i_satellite_PRN = 0; + + d_TOW = 0; + d_Crs = 0; + d_M_0 = 0; + d_Cuc = 0; + d_e_eccentricity = 0; + d_Cus = 0; + + d_Toe = 0; + d_Toc = 0; + d_Cic = 0; + d_OMEGA0 = 0; + d_Cis = 0; + d_i_0 = 0; + d_Crc = 0; + d_OMEGA = 0; + d_IDOT = 0; + + i_GPS_week = 0; + + d_TGD = 0; // Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s] + + d_A_f0 = 0; // Coefficient 0 of code phase offset model [s] + d_A_f1 = 0; // Coefficient 1 of code phase offset model [s/s] + d_A_f2 = 0; // Coefficient 2 of code phase offset model [s/s^2] + + b_integrity_status_flag = false; + b_alert_flag = false; // If true, indicates that the SV URA may be worse than indicated in d_SV_accuracy, use that SV at our own risk. + b_antispoofing_flag = false; // If true, the AntiSpoofing mode is ON in that SV + + //Plane A (info from http://www.navcen.uscg.gov/?Do=constellationStatus) + satelliteBlock[9] = "IIA"; + satelliteBlock[31] = "IIR-M"; + satelliteBlock[8] = "IIA"; + satelliteBlock[7] = "IIR-M"; + satelliteBlock[27] = "IIA"; + //Plane B + satelliteBlock[16] = "IIR"; + satelliteBlock[25] = "IIF"; + satelliteBlock[28] = "IIR"; + satelliteBlock[12] = "IIR-M"; + satelliteBlock[30] = "IIA"; + //Plane C + satelliteBlock[29] = "IIR-M"; + satelliteBlock[3] = "IIA"; + satelliteBlock[19] = "IIR"; + satelliteBlock[17] = "IIR-M"; + satelliteBlock[6] = "IIA"; + //Plane D + satelliteBlock[2] = "IIR"; + satelliteBlock[1] = "IIF"; + satelliteBlock[21] = "IIR"; + satelliteBlock[4] = "IIA"; + satelliteBlock[11] = "IIR"; + satelliteBlock[24] = "IIA"; // Decommissioned from active service on 04 Nov 2011 + //Plane E + satelliteBlock[20] = "IIR"; + satelliteBlock[22] = "IIR"; + satelliteBlock[5] = "IIR-M"; + satelliteBlock[18] = "IIR"; + satelliteBlock[32] = "IIA"; + satelliteBlock[10] = "IIA"; + //Plane F + satelliteBlock[14] = "IIR"; + satelliteBlock[15] = "IIR-M"; + satelliteBlock[13] = "IIR"; + satelliteBlock[23] = "IIR"; + satelliteBlock[26] = "IIA"; + + d_satClkDrift = 0.0; + d_dtr = 0.0; + d_satpos_X = 0.0; + d_satpos_Y = 0.0; + d_satpos_Z = 0.0; + d_satvel_X = 0.0; + d_satvel_Y = 0.0; + d_satvel_Z = 0.0; +} diff --git a/src/core/system_parameters/gps_cnav_ephemeris.h b/src/core/system_parameters/gps_cnav_ephemeris.h new file mode 100644 index 000000000..a570209f5 --- /dev/null +++ b/src/core/system_parameters/gps_cnav_ephemeris.h @@ -0,0 +1,179 @@ +/*! + * \file Gps_CNAV_Ephemeris.h + * \brief Interface of a GPS EPHEMERIS storage + * \author Javier Arribas, 2013. jarribas(at)cttc.es + * + * ------------------------------------------------------------------------- + * + * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * + * 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 + * (at your option) any later version. + * + * 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 + * along with GNSS-SDR. If not, see . + * + * ------------------------------------------------------------------------- + */ + + +#ifndef GNSS_SDR_Gps_CNAV_Ephemeris_H_ +#define GNSS_SDR_Gps_CNAV_Ephemeris_H_ + +#include +#include +#include +#include "boost/assign.hpp" +#include +#include "GPS_L2C.h" + + +/*! + * \brief This class is a storage and orbital model functions for the GPS SV ephemeris data as described in IS-GPS-200E + * + * See http://www.gps.gov/technical/icwg/IS-GPS-200E.pdf Appendix II + */ +class Gps_CNAV_Ephemeris +{ +private: + +public: + unsigned int i_satellite_PRN; // SV PRN NUMBER + + //Message Types 10 and 11 Parameters (1 of 2) + int i_GPS_week; //!< GPS week number, aka WN [week] + int i_URA; //!< ED Accuracy Index + int i_signal_health; //!< Signal health (L1/L2/L5) + double d_Top; //!< Data predict time of week + double d_DELTA_A; //!< Semi-major axis difference at reference time + double d_A_DOT; //!< Change rate in semi-major axis + double d_Delta_n; //!< Mean Motion Difference From Computed Value [semi-circles/s] + double d_DELTA_DOT_N; // Rate of mean motion difference from computed value + double d_M_0; //!< Mean Anomaly at Reference Time [semi-circles] + double d_e_eccentricity; //< Eccentricity + double d_OMEGA; //!< Argument of Perigee [semi-cicles] + double d_OMEGA0; //!< Longitude of Ascending Node of Orbit Plane at Weekly Epoch [semi-cicles] + double d_Toe; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s] + double d_DELTA_OMEGA_DOT; //!< Rate of Right Ascension difference [semi-circles/s] + double d_i_0; //!< Inclination Angle at Reference Time [semi-circles] + double d_IDOT; //!< Rate of Inclination Angle [semi-circles/s] + double d_Cis; //!< Amplitude of the Sine Harmonic Correction Term to the Angle of Inclination [rad] + double d_Cic; //!< Amplitude of the Cosine Harmonic Correction Term to the Angle of Inclination [rad] + double d_Crs; //!< Amplitude of the Sine Harmonic Correction Term to the Orbit Radius [m] + double d_Crc; //!< Amplitude of the Cosine Harmonic Correction Term to the Orbit Radius [m] + double d_Cus; //!< Amplitude of the Sine Harmonic Correction Term to the Argument of Latitude [rad] + double d_Cuc; //!< Amplitude of the Cosine Harmonic Correction Term to the Argument of Latitude [rad] + + //Clock Correction and Accuracy Parameters + double d_Toc; //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s] + double d_A_f0; //!< Coefficient 0 of code phase offset model [s] + double d_A_f1; //!< Coefficient 1 of code phase offset model [s/s] + double d_A_f2; //!< Coefficient 2 of code phase offset model [s/s^2] + + double d_URA0; //! satelliteBlock; //!< Map that stores to which block the PRN belongs http://www.navcen.uscg.gov/?Do=constellationStatus + + 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) + { + using boost::serialization::make_nvp; + if(version){}; + + archive & make_nvp("i_satellite_PRN", i_satellite_PRN); // SV PRN NUMBER + archive & make_nvp("d_TOW", d_TOW); //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s] + archive & make_nvp("d_Crs", d_Crs); //!< Amplitude of the Sine Harmonic Correction Term to the Orbit Radius [m] + archive & make_nvp("d_M_0", d_M_0); //!< Mean Anomaly at Reference Time [semi-circles] + archive & make_nvp("d_Cuc", d_Cuc); //!< Amplitude of the Cosine Harmonic Correction Term to the Argument of Latitude [rad] + archive & make_nvp("d_e_eccentricity", d_e_eccentricity); //!< Eccentricity [dimensionless] + archive & make_nvp("d_Cus", d_Cus); //!< Amplitude of the Sine Harmonic Correction Term to the Argument of Latitude [rad] + archive & make_nvp("d_Toe", d_Toe); //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200E) [s] + archive & make_nvp("d_Toc", d_Toe); //!< clock data reference time (Ref. 20.3.3.3.3.1 IS-GPS-200E) [s] + archive & make_nvp("d_Cic", d_Cic); //!< Amplitude of the Cosine Harmonic Correction Term to the Angle of Inclination [rad] + archive & make_nvp("d_OMEGA0", d_OMEGA0); //!< Longitude of Ascending Node of Orbit Plane at Weekly Epoch [semi-circles] + archive & make_nvp("d_Cis", d_Cis); //!< Amplitude of the Sine Harmonic Correction Term to the Angle of Inclination [rad] + archive & make_nvp("d_i_0", d_i_0); //!< Inclination Angle at Reference Time [semi-circles] + archive & make_nvp("d_Crc", d_Crc); //!< Amplitude of the Cosine Harmonic Correction Term to the Orbit Radius [m] + archive & make_nvp("d_OMEGA", d_OMEGA); //!< Argument of Perigee [semi-cicles] + archive & make_nvp("d_IDOT", d_IDOT); //!< Rate of Inclination Angle [semi-circles/s] + archive & make_nvp("i_GPS_week", i_GPS_week); //!< GPS week number, aka WN [week] + archive & make_nvp("d_TGD", d_TGD); //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s] + + + archive & make_nvp("d_A_f0", d_A_f0); //!< Coefficient 0 of code phase offset model [s] + archive & make_nvp("d_A_f1", d_A_f1); //!< Coefficient 1 of code phase offset model [s/s] + archive & make_nvp("d_A_f2", d_A_f2); //!< Coefficient 2 of code phase offset model [s/s^2] + + archive & make_nvp("b_integrity_status_flag", b_integrity_status_flag); + archive & make_nvp("b_alert_flag", b_alert_flag); //!< If true, indicates that the SV URA may be worse than indicated in d_SV_accuracy, use that SV at our own risk. + archive & make_nvp("b_antispoofing_flag", b_antispoofing_flag); //!< If true, the AntiSpoofing mode is ON in that SV + } + + /*! + * Default constructor + */ + Gps_CNAV_Ephemeris(); +}; + +#endif