GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
gps_cnav_ephemeris.h
Go to the documentation of this file.
1/*!
2 * \file gps_cnav_ephemeris.h
3 * \brief Interface of a GPS CNAV EPHEMERIS storage
4 * \author Javier Arribas, 2015. jarribas(at)cttc.es
5 *
6 * -----------------------------------------------------------------------------
7 *
8 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9 * This file is part of GNSS-SDR.
10 *
11 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12 * SPDX-License-Identifier: GPL-3.0-or-later
13 *
14 * -----------------------------------------------------------------------------
15 */
16
17
18#ifndef GNSS_SDR_GPS_CNAV_EPHEMERIS_H
19#define GNSS_SDR_GPS_CNAV_EPHEMERIS_H
20
21#include "gnss_ephemeris.h"
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 is a storage class for the GPS CNAV ephemeris data as described
33 * in IS-GPS-200M
34 *
35 * See https://www.gps.gov/sites/default/files/2025-07/IS-GPS-200M.pdf Appendix III
36 */
37class Gps_CNAV_Ephemeris : public Gnss_Ephemeris
38{
39public:
40 /*!
41 * Constructor
42 */
44 {
45 this->System = 'G';
46 }
47
48 double delta_A{}; //!< Semi-major axis difference at reference time
49 double Adot{}; //!< Change rate in semi-major axis
50 double delta_ndot{}; //!< Rate of mean motion difference from computed value
51 double delta_OMEGAdot{}; //!< Rate of Right Ascension difference [semi-circles/s]
52 int32_t toe1{}; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200M) [s]
53 int32_t toe2{}; //!< Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200M) [s]
54 int32_t signal_health{}; //!< Signal health (L1/L2/L5)
55 int32_t top{}; //!< Data predict time of week
56 int32_t URA{}; //!< ED Accuracy Index
57
58 double URA0{}; //!< NED Accuracy Index
59 double URA1{}; //!< NED Accuracy Change Index
60 double URA2{}; //!< NED Accuracy Change Rate Index
61
62 // Group Delay Differential Parameters
63 double TGD{}; //!< Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(Y)" s users [s]
64 double ISCL1{};
65 double ISCL2{};
66 double ISCL5I{};
67 double ISCL5Q{};
68
69 /*! \brief If true, enhanced level of integrity assurance.
70 *
71 * If false, indicates that the conveying signal is provided with the
72 * legacy level of integrity assurance. That is, the probability that the
73 * instantaneous URE of the conveying signal exceeds 4.42 times the upper
74 * bound value of the current broadcast URA index, for more than 5.2
75 * seconds, without an accompanying alert, is less than 1E-5 per hour. If
76 * true, indicates that the conveying signal is provided with an enhanced
77 * level of integrity assurance. That is, the probability that the
78 * instantaneous URE of the conveying signal exceeds 5.73 times the upper
79 * bound value of the current broadcast URA index, for more than 5.2
80 * seconds, without an accompanying alert, is less than 1E-8 per hour.
81 */
83 bool l2c_phasing_flag{};
84 bool 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.
85 bool antispoofing_flag{}; //!< If true, the AntiSpoofing mode is ON in that SV
86
87 template <class Archive>
88
89 /*!
90 * \brief Serialize is a boost standard method to be called by the boost XML
91 * serialization. Here is used to save the ephemeris data on disk file.
92 */
93 inline void serialize(Archive& archive, const uint32_t version)
94 {
95 using boost::serialization::make_nvp;
96 if (version)
97 {
98 };
99
100 archive& BOOST_SERIALIZATION_NVP(PRN);
101 archive& BOOST_SERIALIZATION_NVP(M_0);
102 archive& BOOST_SERIALIZATION_NVP(delta_n);
103 archive& BOOST_SERIALIZATION_NVP(ecc);
104 archive& BOOST_SERIALIZATION_NVP(sqrtA);
105 archive& BOOST_SERIALIZATION_NVP(OMEGA_0);
106 archive& BOOST_SERIALIZATION_NVP(i_0);
107 archive& BOOST_SERIALIZATION_NVP(omega);
108 archive& BOOST_SERIALIZATION_NVP(OMEGAdot);
109 archive& BOOST_SERIALIZATION_NVP(idot);
110 archive& BOOST_SERIALIZATION_NVP(Cuc);
111 archive& BOOST_SERIALIZATION_NVP(Cus);
112 archive& BOOST_SERIALIZATION_NVP(Crc);
113 archive& BOOST_SERIALIZATION_NVP(Crs);
114 archive& BOOST_SERIALIZATION_NVP(Cic);
115 archive& BOOST_SERIALIZATION_NVP(Cis);
116 archive& BOOST_SERIALIZATION_NVP(toe);
117 archive& BOOST_SERIALIZATION_NVP(toc);
118 archive& BOOST_SERIALIZATION_NVP(af0);
119 archive& BOOST_SERIALIZATION_NVP(af1);
120 archive& BOOST_SERIALIZATION_NVP(af2);
121 archive& BOOST_SERIALIZATION_NVP(WN);
122 archive& BOOST_SERIALIZATION_NVP(tow);
123 archive& BOOST_SERIALIZATION_NVP(satClkDrift);
124 archive& BOOST_SERIALIZATION_NVP(dtr);
125
126 archive& BOOST_SERIALIZATION_NVP(toe1);
127 archive& BOOST_SERIALIZATION_NVP(toe2);
128 archive& BOOST_SERIALIZATION_NVP(TGD);
129 archive& BOOST_SERIALIZATION_NVP(ISCL1);
130 archive& BOOST_SERIALIZATION_NVP(ISCL2);
131 archive& BOOST_SERIALIZATION_NVP(ISCL5I);
132 archive& BOOST_SERIALIZATION_NVP(ISCL5Q);
133 archive& BOOST_SERIALIZATION_NVP(delta_A);
134 archive& BOOST_SERIALIZATION_NVP(Adot);
135 archive& BOOST_SERIALIZATION_NVP(delta_OMEGAdot);
136 archive& BOOST_SERIALIZATION_NVP(integrity_status_flag);
137 archive& BOOST_SERIALIZATION_NVP(l2c_phasing_flag);
138 archive& BOOST_SERIALIZATION_NVP(alert_flag);
139 archive& BOOST_SERIALIZATION_NVP(antispoofing_flag);
140 }
141};
142
143
144/** \} */
145/** \} */
146#endif // GNSS_SDR_GPS_CNAV_EPHEMERIS_H
double OMEGA_0
Longitude of ascending node of orbital plane at weekly epoch [rad].
double sqrtA
Square root of the semi-major axis [meters^1/2].
double M_0
Mean anomaly at reference time [rad].
double af0
SV clock bias correction coefficient [s].
double Crc
Amplitude of the cosine harmonic correction term to the orbit radius [meters].
double Crs
Amplitude of the sine harmonic correction term to the orbit radius [meters].
char System
Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'C': BeiDou.
double Cus
Amplitude of the sine harmonic correction term to the argument of latitude [rad].
double Cis
Amplitude of the sine harmonic correction term to the angle of inclination [rad].
double idot
Rate of inclination angle [rad/sec].
double i_0
Inclination angle at reference time [rad].
double OMEGAdot
Rate of right ascension [rad/sec].
double delta_n
Mean motion difference from computed value [rad/sec].
double ecc
Eccentricity.
double satClkDrift
SV clock drift.
double dtr
Relativistic clock correction term.
double af1
SV clock drift correction coefficient [s/s].
double af2
SV clock drift rate correction coefficient [s/s^2].
uint32_t PRN
SV ID.
double Cuc
Amplitude of the cosine harmonic correction term to the argument of latitude [rad].
double Cic
Amplitude of the cosine harmonic correction term to the angle of inclination [rad].
int32_t tow
Time of Week.
double omega
Argument of perigee [rad].
int32_t toe
Ephemeris reference time [s].
int32_t toc
Clock correction data reference Time of Week [sec].
int32_t WN
Week number.
bool integrity_status_flag
If true, enhanced level of integrity assurance.
double URA2
NED Accuracy Change Rate Index.
int32_t signal_health
Signal health (L1/L2/L5).
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...
int32_t URA
ED Accuracy Index.
double delta_A
Semi-major axis difference at reference time.
int32_t toe1
Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200M) [s].
double delta_ndot
Rate of mean motion difference from computed value.
double delta_OMEGAdot
Rate of Right Ascension difference [semi-circles/s].
double Adot
Change rate in semi-major axis.
bool alert_flag
If true, indicates that the SV URA may be worse than indicated in d_SV_accuracy, use that SV at our o...
double URA0
NED Accuracy Index.
int32_t top
Data predict time of week.
double URA1
NED Accuracy Change Index.
double TGD
Estimated Group Delay Differential: L1-L2 correction term only for the benefit of "L1 P(Y)" or "L2 P(...
int32_t toe2
Ephemeris data reference time of week (Ref. 20.3.3.4.3 IS-GPS-200M) [s].
bool antispoofing_flag
If true, the AntiSpoofing mode is ON in that SV.
Base class for GNSS Ephemeris.