Go to the documentation of this file.
76 TUDEF(
"GLOFNavAlm",
"GLOFNavAlm()");
97 TUDEF(
"GLOFNavAlm",
"validate()");
108 TUDEF(
"GLOFNavAlm",
"getXvt()");
118 uut.
eccnA = 0.001482010;
151 std::cout <<
"xvt = " << std::setprecision(17) << xvt << std::endl;
153 std::cout <<
"err_x = " << fabs(xvt.
x[0] - 10947021.572) << std::endl
154 <<
"err_y = " << fabs(xvt.
x[1] - 13078978.287) << std::endl
155 <<
"err_z = " << fabs(xvt.
x[2] - 18922063.362) << std::endl
156 <<
"err_vx = " << fabs(xvt.
v[0] - -3375.497) << std::endl
157 <<
"err_vy = " << fabs(xvt.
v[1] - -161.453) << std::endl
158 <<
"err_vz = " << fabs(xvt.
v[2] - 2060.844) << std::endl;
162 std::cout <<
" = " <<
pos << std::endl;
166 while (st <= 6.02401539573)
171 << std::setprecision(15) << st << std::endl;
182 TUDEF(
"GLOFNavAlm",
"getUserTime()");
197 TUDEF(
"GLOFNavAlm",
"fixFit()");
217 TUDEF(
"GLOFNavAlm",
"nothing");
221 const double omega3 = 0.7292115e-4;
222 const double mu = 398600.4418;
223 const double C20 = -1082.62575e-6;
224 const double ae = 6378.136;
225 const Angle icp(63.0, AngleType::Deg);
226 const double Tcp = 43200;
228 const unsigned aNAj = 615;
229 const Angle alambdaj(-0.189986229, AngleType::SemiCircle);
230 const double atlambdaj = 27122.09375;
231 const Angle aDeltaij(0.011929512, AngleType::SemiCircle);
232 const double aDeltaTj = -2655.76171875;
233 const double aDeltaTPrimej = 0.000549316;
234 const double aepsilonj = 0.001482010;
235 const Angle aomegaj(0.440277100, AngleType::SemiCircle);
237 const unsigned cNAj = 615;
238 const double ctlambdaj = 33300.;
239 const Angle cS0(6.02401539573, AngleType::Rad);
241 const double eXoi = 10947.021572;
242 const double eYoi = 13078.978287;
243 const double eZoi = 18922.063362;
244 const double eVxoi = -3.375497;
245 const double eVyoi = -0.161453;
246 const double eVzoi = 2.060844;
251 Angle lambda = alambdaj;
252 double tlambda = atlambdaj;
253 Angle Deltai = aDeltaij;
254 double DeltaT = aDeltaTj;
255 double DeltaTPrime = aDeltaTPrimej;
256 double e = aepsilonj;
257 Angle omega = aomegaj;
259 double ti = ctlambdaj;
264 double Tdeltap = Tcp + DeltaT;
265 Angle i = icp + Deltai;
267 double a0 = ::pow((Tdeltap/(2*
PI))*(Tdeltap/(2*
PI))*
mu, 1.0/3.0);
268 cerr <<
"a(0) = " << a0 << endl;
270 double anp1 = -9999999999999;
272 unsigned iteration = 0;
273 double nuTerm = 1 + (e *
cos(nu));
274 nuTerm = nuTerm * nuTerm * nuTerm;
275 double ecc2obv = 1 - (e*e);
276 double eTerm = ::pow(ecc2obv, 3.0/2.0);
277 double omegaTerm = 1 + (e *
cos(omega));
278 omegaTerm = omegaTerm * omegaTerm;
279 double siniTerm = 2.0 - ((5.0/2.0) *
sin(i) *
sin(i));
280 double bigTerm = siniTerm * (eTerm / omegaTerm) + (nuTerm / ecc2obv);
281 double C20Term = (3.0/2.0)*C20;
282 cerr <<
"bigTerm = " << siniTerm <<
" * (" << eTerm <<
" / " << omegaTerm
283 <<
") + (" << nuTerm <<
" / " << ecc2obv <<
")" << endl;
284 cerr <<
" Tock_b = " << nuTerm << endl
285 <<
" Tock_c = " << (nuTerm / ecc2obv) << endl
286 <<
" Tock_d = " << eTerm << endl
287 <<
" Tock_e = " << C20Term << endl
288 <<
" Tock_f = " << omegaTerm << endl
289 <<
" Tock_g = " << (eTerm / omegaTerm) << endl
290 <<
" Tock_h = " << siniTerm << endl
291 <<
" Tock_i = " << bigTerm << endl;
292 while (fabs(anp1-an) >= 1e-3)
294 double pn = an * (1-e*e);
300 double tock_k = (1.0+(3.0/2.0)*C20*(ae/pn)*(ae/pn)*bigTerm);
301 double Tocknp1 = Tdeltap / tock_k;
302 cerr <<
" Tock_k = " << tock_k << endl
303 <<
"p(" << iteration <<
") = " << pn << endl
304 <<
" Tock(" << (iteration+1) <<
") = " << Tocknp1 << endl;
307 anp1 = ::pow((Tocknp1/(2*
PI))*(Tocknp1/(2*
PI))*
mu, 1.0/3.0);
308 cerr <<
"a(" << iteration <<
") = " << an << endl
309 <<
"a(" << (iteration+1) <<
") = " << anp1 << endl;
313 cerr <<
"a = " << a <<
" km" << endl;
315 double earthvs = (ae/a);
316 earthvs = earthvs * earthvs;
317 double tstar = ti - tlambda + (86400.0*(N0-NA));
318 double Wk = tstar / Tdeltap;
322 double secSinceRef = (Tdeltap*W) + (DeltaTPrime * W * W);
323 double tlambdakBar = tlambda + secSinceRef;
324 double tlambdak = std::fmod(tlambdakBar, 86400.0);
327 double OmegaPrime = C20Term * n * earthvs *
cos(i) * ::sqrt(ecc2obv);
328 double radPerSec = OmegaPrime - omega3;
329 Angle lambdak = lambda +
Angle(radPerSec * secSinceRef, AngleType::Rad);
330 cerr <<
"tstar = " << tstar << endl
331 <<
"Wk = " << Wk << endl
332 <<
"W = " << W << endl
333 <<
"tlambdakBar = " << tlambdakBar << endl
334 <<
"tlambdak = " << tlambdak << endl
335 <<
"n = " << n << endl
336 <<
"OMEGAdot = " << OmegaPrime << endl
337 <<
"lambdak = " << lambdak << endl;
347 unsigned errorTotal = 0;
356 std::cout <<
"Total Failures for " << __FILE__ <<
": " << errorTotal
@ Geodetic
geodetic latitude, longitude, and height above ellipsoid
double deltaTnA
Correction to mean value of Draconian period (Delta T_n^A).
static double getSiderealTime(const CommonTime &time)
@ Cartesian
cartesian (Earth-centered, Earth-fixed)
#define TUCATCH(STATEMENT)
double lambdanA
Longitude of ascending node (lambda_n^A).
#define TUASSERTE(TYPE, EXP, GOT)
NavMessageType messageType
CommonTime Toa
Reference time for almanac.
RefFrame frame
reference frame of this data
CommonTime endFit
Time at end of fit interval.
double eccnA
Eccentricity (epsilon_n^A).
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
CommonTime & setTimeSystem(TimeSystem timeSystem)
const double PI
GPS value of PI; also specified by GAL.
Triple v
satellite velocity in ECEF Cartesian, meters/second
NavMessageID signal
Source signal identification for this navigation message data.
double sin(gnsstk::Angle x)
double relcorr
relativity correction (standard 2R.V/c^2 term), seconds
CommonTime getUserTime() const override
double omeganA
Argument of perigee (omega_n^A).
static const GNSSTK_EXPORT CommonTime END_OF_TIME
latest representable CommonTime
Triple x
Sat position ECEF Cartesian (X,Y,Z) meters.
double deltaTdotnA
Time derivative of deltaT (Delta T'_n^A).
page HOWTO subpage DoxygenGuide Documenting Your Code page DoxygenGuide Documenting Your Code todo Flesh out this document section doctips Tips for Documenting When defining make sure that the prototype is identical between the cpp and hpp including both the namespaces and the parameter names for you have std::string as the return type in the hpp file and string as the return type in the cpp Doxygen may get confused and autolink to the cpp version with no documentation If you don t use the same parameter names between the cpp and hpp that will also confuse Doxygen Don t put type information in return or param documentation It doesn t really add anything and will often cause Doxygen to complain and not produce the documentation< br > use note Do not put a comma after a param name unless you mean to document multiple parameters< br/> the output stream</code >< br/> y
bool validate() const override
double taunA
Time offset to GLONASS time (tau_n^A).
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
double clkdrift
satellite clock drift in seconds/second
bool healthBits
Health flag (C_n, 1 = operable).
#define TUASSERTFEPS(EXP, GOT, EPS)
CommonTime beginFit
Time at beginning of fit interval.
double cos(gnsstk::Angle x)
#define TUDEF(CLASS, METHOD)
void setSemiMajorAxisIncl()
Compute and set the semi-major axis (A) and inclination (i).
@ GLO
GLONASS system time (aka UTC(SU))
CommonTime xmit2
Transmit time for string 2 (eph) or odd string.
std::string printTime(const CommonTime &t, const std::string &fmt)
unsigned constructorTest()
int freqnA
Frequency offset (H_n^A).
NavMessageType
Identify different types of navigation message data.
@ PZ90KGS
PZ90 the "original".
#define TUASSERTFE(EXP, GOT)
double clkbias
Sat clock correction in seconds.
Class to assist in doing all the math to get the XVT.
double tLambdanA
Time of ascending node crossing (t_lambda_n^A).
double deltainA
Correction to mean inclination (Delta i_n^A).
bool getXvt(const CommonTime &when, Xvt &xvt, const ObsID &=ObsID()) override
unsigned getUserTimeTest()
@ Almanac
Low-precision orbits for other than the transmitting SV.
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39