GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
beidou_dnav_ephemeris.h
Go to the documentation of this file.
1 /*!
2  * \file beidou_dnav_ephemeris.h
3  * \brief Interface of a BEIDOU EPHEMERIS storage
4  * \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.com
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_BEIDOU_DNAV_EPHEMERIS_H
19 #define GNSS_SDR_BEIDOU_DNAV_EPHEMERIS_H
20 
21 #include "gnss_ephemeris.h"
22 #include <boost/serialization/nvp.hpp>
23 #include <map>
24 #include <string>
25 
26 /** \addtogroup Core
27  * \{ */
28 /** \addtogroup System_Parameters
29  * \{ */
30 
31 
32 /*!
33  * \brief This is a storage class for the Beidou SV ephemeris data as described in
34  * BeiDou Navigation Satellite System Signal In Space Interface Control Document
35  * Open Service Signal B1I (Version 3.0)
36  *
37  * See http://en.beidou.gov.cn/SYSTEMS/Officialdocument/201902/P020190227601370045731.pdf
38  */
40 {
41 public:
42  /*!
43  * Default constructor
44  */
46 
47  int SV_accuracy{}; //!< User Range Accuracy (URA) index of the SV (reference paragraph 5.2.4.5) for the standard positioning service user
48  int SV_health{};
49  double TGD1{}; //!< Estimated Group Delay Differential on B1I [s]
50  double TGD2{}; //!< Estimated Group Delay Differential on B2I [s]
51  double AODC{}; //!< Age of Data, Clock
52  double AODE{}; //!< Age of Data, Ephemeris
53  int AODO{}; //!< Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s]
54 
55  int sig_type{}; //!< BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q) */
56  int nav_type{}; //!< BDS: nav type (0:unknown,1:IGSO/MEO,2:GEO) */
57 
58  bool fit_interval_flag{}; //!< Curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours.
59  double spare1{};
60  double spare2{};
61 
62  /*! \brief If true, enhanced level of integrity assurance.
63  *
64  * If false, indicates that the conveying signal is provided with the
65  * legacy level of integrity assurance. That is, the probability that the
66  * instantaneous URE of the conveying signal exceeds 4.42 times the upper
67  * bound value of the current broadcast URA index, for more than 5.2
68  * seconds, without an accompanying alert, is less than 1E-5 per hour. If
69  * true, indicates that the conveying signal is provided with an enhanced
70  * level of integrity assurance. That is, the probability that the
71  * instantaneous URE of the conveying signal exceeds 5.73 times the upper
72  * bound value of the current broadcast URA index, for more than 5.2
73  * seconds, without an accompanying alert, is less than 1E-8 per hour.
74  */
76  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.
77  bool antispoofing_flag{}; //!< If true, the AntiSpoofing mode is ON in that SV
78 
79  std::map<int, std::string> satelliteBlock; //!< Map that stores to which block the PRN belongs
80 
81  template <class Archive>
82 
83  /*!
84  * \brief Serialize is a boost standard method to be called by the boost XML
85  * serialization. Here is used to save the ephemeris data on disk file.
86  */
87  void serialize(Archive& archive, const unsigned int version)
88  {
89  using boost::serialization::make_nvp;
90  if (version)
91  {
92  };
93 
94  archive& BOOST_SERIALIZATION_NVP(PRN);
95  archive& BOOST_SERIALIZATION_NVP(M_0);
96  archive& BOOST_SERIALIZATION_NVP(delta_n);
97  archive& BOOST_SERIALIZATION_NVP(ecc);
98  archive& BOOST_SERIALIZATION_NVP(sqrtA);
99  archive& BOOST_SERIALIZATION_NVP(OMEGA_0);
100  archive& BOOST_SERIALIZATION_NVP(i_0);
101  archive& BOOST_SERIALIZATION_NVP(omega);
102  archive& BOOST_SERIALIZATION_NVP(OMEGAdot);
103  archive& BOOST_SERIALIZATION_NVP(idot);
104  archive& BOOST_SERIALIZATION_NVP(Cuc);
105  archive& BOOST_SERIALIZATION_NVP(Cus);
106  archive& BOOST_SERIALIZATION_NVP(Crc);
107  archive& BOOST_SERIALIZATION_NVP(Crs);
108  archive& BOOST_SERIALIZATION_NVP(Cic);
109  archive& BOOST_SERIALIZATION_NVP(Cis);
110  archive& BOOST_SERIALIZATION_NVP(toe);
111  archive& BOOST_SERIALIZATION_NVP(toc);
112  archive& BOOST_SERIALIZATION_NVP(af0);
113  archive& BOOST_SERIALIZATION_NVP(af1);
114  archive& BOOST_SERIALIZATION_NVP(af2);
115  archive& BOOST_SERIALIZATION_NVP(WN);
116  archive& BOOST_SERIALIZATION_NVP(tow);
117  archive& BOOST_SERIALIZATION_NVP(satClkDrift);
118  archive& BOOST_SERIALIZATION_NVP(dtr);
119 
120  archive& BOOST_SERIALIZATION_NVP(AODE);
121  archive& BOOST_SERIALIZATION_NVP(SV_accuracy);
122  archive& BOOST_SERIALIZATION_NVP(SV_health);
123  archive& BOOST_SERIALIZATION_NVP(AODC);
124  archive& BOOST_SERIALIZATION_NVP(TGD1);
125  archive& BOOST_SERIALIZATION_NVP(TGD2);
126  archive& BOOST_SERIALIZATION_NVP(sig_type);
127  archive& BOOST_SERIALIZATION_NVP(nav_type);
128  archive& BOOST_SERIALIZATION_NVP(AODO);
129  archive& BOOST_SERIALIZATION_NVP(fit_interval_flag);
130  archive& BOOST_SERIALIZATION_NVP(spare1);
131  archive& BOOST_SERIALIZATION_NVP(spare2);
132  archive& BOOST_SERIALIZATION_NVP(integrity_status_flag);
133  archive& BOOST_SERIALIZATION_NVP(alert_flag);
134  archive& BOOST_SERIALIZATION_NVP(antispoofing_flag);
135  }
136 };
137 
138 
139 /** \} */
140 /** \} */
141 #endif // GNSS_SDR_BEIDOU_DNAV_EPHEMERIS_H
int sig_type
BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q) */.
int AODO
Age of Data Offset (AODO) term for the navigation message correction table (NMCT) contained in subfra...
double AODE
Age of Data, Ephemeris.
double i_0
Inclination angle at reference time [rad].
int nav_type
BDS: nav type (0:unknown,1:IGSO/MEO,2:GEO) */.
double TGD2
Estimated Group Delay Differential on B2I [s].
double AODC
Age of Data, Clock.
double OMEGA_0
Longitude of ascending node of orbital plane at weekly epoch [rad].
int32_t toc
Clock correction data reference Time of Week [sec].
double Crc
Amplitude of the cosine harmonic correction term to the orbit radius [meters].
bool antispoofing_flag
If true, the AntiSpoofing mode is ON in that SV.
double af2
SV clock drift rate correction coefficient [s/s^2].
void serialize(Archive &archive, const unsigned int version)
Serialize is a boost standard method to be called by the boost XML serialization. Here is used to sav...
double TGD1
Estimated Group Delay Differential on B1I [s].
uint32_t PRN
SV ID.
This is a storage class for the Beidou SV ephemeris data as described in BeiDou Navigation Satellite ...
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 Cis
Amplitude of the sine harmonic correction term to the angle of inclination [rad]. ...
std::map< int, std::string > satelliteBlock
Map that stores to which block the PRN belongs.
int SV_accuracy
User Range Accuracy (URA) index of the SV (reference paragraph 5.2.4.5) for the standard positioning ...
double af0
SV clock bias correction coefficient [s].
Base class for GNSS Ephemeris.
double ecc
Eccentricity.
double M_0
Mean anomaly at reference time [rad].
bool integrity_status_flag
If true, enhanced level of integrity assurance.
int32_t WN
Week number.
int32_t toe
Ephemeris reference time [s].
int32_t tow
Time of Week.
double Cus
Amplitude of the sine harmonic correction term to the argument of latitude [rad]. ...
double OMEGAdot
Rate of right ascension [rad/sec].
double delta_n
Mean motion difference from computed value [rad/sec].
double idot
Rate of inclination angle [rad/sec].
Base class for GNSS ephemeris storage.
double Cic
Amplitude of the cosine harmonic correction term to the angle of inclination [rad].
double Cuc
Amplitude of the cosine harmonic correction term to the argument of latitude [rad].
double omega
Argument of perigee [rad].
double af1
SV clock drift correction coefficient [s/s].
bool fit_interval_flag
Curve-fit interval used by the CS (Block II/IIA/IIR/IIR-M/IIF) and SS (Block IIIA) in determining the...
double Crs
Amplitude of the sine harmonic correction term to the orbit radius [meters].
double satClkDrift
SV clock drift.
double dtr
Relativistic clock correction term.
double sqrtA
Square root of the semi-major axis [meters^1/2].