0.2.0
Loading...
Searching...
No Matches
BDSEphemeris.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
13
14#pragma once
15
17
19
20namespace NAV
21{
22
25class BDSEphemeris final : public SatNavData
26{
27 public:
28 // #######################################################################################################
29 // Members
30 // #######################################################################################################
31
32 // ------------------------------------------ Time Parameters --------------------------------------------
33
35 const InsTime toc;
36
38 const InsTime toe;
39
58 const size_t AODE;
59
78 const size_t AODC;
79
86 const std::array<double, 3> a;
87
88 // --------------------------------------- Keplerian Parameters ------------------------------------------
89
90 const double sqrt_A;
91 const double e;
92 const double i_0;
93 const double Omega_0;
94 const double omega;
95 const double M_0;
96
97 // -------------------------------------- Pertubation Parameters -----------------------------------------
98
99 const double delta_n;
100 const double Omega_dot;
101 const double i_dot;
102 const double Cus;
103 const double Cuc;
104 const double Cis;
105 const double Cic;
106 const double Crs;
107 const double Crc;
108
109 // ----------------------------------------------- Other -------------------------------------------------
110
116 const double svAccuracy;
117
124 const uint8_t satH1;
125
128 const double T_GD1;
129
132 const double T_GD2;
133
134 // #######################################################################################################
135 // Functions
136 // #######################################################################################################
137
164 const size_t& AODE, const size_t& AODC,
165 const std::array<double, 3>& a,
166 const double& sqrt_A, const double& e, const double& i_0, const double& Omega_0, const double& omega, const double& M_0,
167 const double& delta_n, const double& Omega_dot, const double& i_dot, const double& Cus, const double& Cuc,
168 const double& Cis, const double& Cic, const double& Crs, const double& Crc,
169 const double& svAccuracy, uint8_t satH1, double T_GD1, double T_GD2);
170
171#ifdef TESTING
210 BDSEphemeris(int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, double second, double svClockBias, double svClockDrift, double svClockDriftRate,
211 double AODE, double Crs, double delta_n, double M_0,
212 double Cuc, double e, double Cus, double sqrt_A,
213 double Toe, double Cic, double Omega_0, double Cis,
214 double i_0, double Crc, double omega, double Omega_dot,
215 double i_dot, double spare1, double BDTWeek, double spare2,
216 double svAccuracy, double satH1, double T_GD1, double T_GD2,
217 double TransmissionTimeOfMessage, double AODC, double spare3 = 0.0, double spare4 = 0.0);
218#endif
219
221 ~BDSEphemeris() final = default;
223 BDSEphemeris(const BDSEphemeris&) = default;
227 BDSEphemeris& operator=(const BDSEphemeris&) = delete;
229 BDSEphemeris& operator=(BDSEphemeris&&) = delete;
230
232 [[nodiscard]] double calcSatellitePositionVariance() const final;
233
239 [[nodiscard]] Corrections calcClockCorrections(const InsTime& recvTime, double dist, const Frequency& freq) const final;
240
242 [[nodiscard]] bool isHealthy() const final;
243
244 private:
250 [[nodiscard]] PosVelAccel calcSatelliteData(const InsTime& transTime, Orbit::Calc calc) const final;
251};
252
253} // namespace NAV
The class is responsible for all time-related tasks.
Satellite Navigation data (to calculate SatNavData and clock)
Broadcasted ephemeris message data.
Definition BDSEphemeris.hpp:26
const double e
Eccentricity [-].
Definition BDSEphemeris.hpp:91
const double Cus
Amplitude of the sine harmonic correction term to the argument of latitude [rad].
Definition BDSEphemeris.hpp:102
const InsTime toe
Time of Ephemeris.
Definition BDSEphemeris.hpp:38
const std::array< double, 3 > a
Definition BDSEphemeris.hpp:86
const double delta_n
Mean motion difference from computed value [rad/s].
Definition BDSEphemeris.hpp:99
const double T_GD1
Equipment Group Delay Differential. B1/B3 [s].
Definition BDSEphemeris.hpp:128
const double svAccuracy
SV accuracy [m].
Definition BDSEphemeris.hpp:116
const uint8_t satH1
Autonomous Satellite Health flag.
Definition BDSEphemeris.hpp:124
double calcSatellitePositionVariance() const final
Calculates the Variance of the satellite position in [m^2].
Corrections calcClockCorrections(const InsTime &recvTime, double dist, const Frequency &freq) const final
Calculates clock bias and drift of the satellite.
const double Crc
Amplitude of the cosine harmonic correction term to the orbit radius [m].
Definition BDSEphemeris.hpp:107
BDSEphemeris(const InsTime &toc, const InsTime &toe, const size_t &AODE, const size_t &AODC, const std::array< double, 3 > &a, const double &sqrt_A, const double &e, const double &i_0, const double &Omega_0, const double &omega, const double &M_0, const double &delta_n, const double &Omega_dot, const double &i_dot, const double &Cus, const double &Cuc, const double &Cis, const double &Cic, const double &Crs, const double &Crc, const double &svAccuracy, uint8_t satH1, double T_GD1, double T_GD2)
Constructor.
const double Omega_dot
Rate of change of right ascension [rad/s].
Definition BDSEphemeris.hpp:100
const double i_0
Inclination angle at reference time [rad].
Definition BDSEphemeris.hpp:92
const double Cuc
Amplitude of the cosine harmonic correction term to the argument of latitude [rad].
Definition BDSEphemeris.hpp:103
const double sqrt_A
Square root of the semi-major axis [m^1/2].
Definition BDSEphemeris.hpp:90
const double omega
Argument of perigee [rad].
Definition BDSEphemeris.hpp:94
const double Cis
Amplitude of the sine harmonic correction term to the angle of inclination [rad].
Definition BDSEphemeris.hpp:104
const double Omega_0
Longitude of the ascending node at reference time [rad].
Definition BDSEphemeris.hpp:93
const InsTime toc
Time of Clock.
Definition BDSEphemeris.hpp:35
const double M_0
Mean anomaly at reference time [rad].
Definition BDSEphemeris.hpp:95
const double Crs
Amplitude of the sine harmonic correction term to the orbit radius [m].
Definition BDSEphemeris.hpp:106
const double T_GD2
Equipment Group Delay Differential. B2/B3 [s].
Definition BDSEphemeris.hpp:132
const double i_dot
Rate of change of inclination [rad/s].
Definition BDSEphemeris.hpp:101
const double Cic
Amplitude of the cosine harmonic correction term to the angle of inclination [rad].
Definition BDSEphemeris.hpp:105
bool isHealthy() const final
Checks whether the signal is healthy.
const size_t AODC
Age of Data, Clock.
Definition BDSEphemeris.hpp:78
const size_t AODE
Age of Data, Ephemeris.
Definition BDSEphemeris.hpp:58
~BDSEphemeris() final=default
Destructor.
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
The class is responsible for all time-related tasks.
Definition InsTime.hpp:667
Abstract satellite orbit information.
Definition Orbit.hpp:24
Calc
Calculation flags.
Definition Orbit.hpp:74
Satellite Navigation data (to calculate SatNavData and clock)
Definition SatNavData.hpp:26
Satellite clock corrections.
Definition Clock.hpp:28
Satellite Position, Velocity and Acceleration.
Definition Orbit.hpp:39