Go to the documentation of this file.
51 const double GLOCNavEph::we = 7.2921151467e-5;
59 clkBias(
std::numeric_limits<double>::quiet_NaN()),
60 freqBias(
std::numeric_limits<double>::quiet_NaN()),
61 driftRate(
std::numeric_limits<double>::quiet_NaN()),
62 tauc(
std::numeric_limits<double>::quiet_NaN()),
63 taucdot(
std::numeric_limits<double>::quiet_NaN()),
64 tauDelta(
std::numeric_limits<double>::quiet_NaN()),
65 tauGPS(
std::numeric_limits<double>::quiet_NaN()),
80 DEBUGTRACE(
"GLOCNavEph::validate returning " << rv);
92 xvt.
x[0] =
pos[0]*1.e3;
93 xvt.
x[1] =
pos[1]*1.e3;
94 xvt.
x[2] =
pos[2]*1.e3;
95 xvt.
v[0] =
vel[0]*1.e3;
96 xvt.
v[1] =
vel[1]*1.e3;
97 xvt.
v[2] =
vel[2]*1.e3;
109 bool simplified = (std::fabs(when -
Toe) <= 900);
111 k4(6), tempRes(6), a1(3), a23(3), a4(3);
114 initialState(0) =
pos[0]*1000.0;
115 initialState(2) =
pos[1]*1000.0;
116 initialState(4) =
pos[2]*1000.0;
117 initialState(1) =
vel[0]*1000.0;
118 initialState(3) =
vel[1]*1000.0;
119 initialState(5) =
vel[2]*1000.0;
120 accel(0) =
acc[0]*1000.0;
121 accel(1) =
acc[1]*1000.0;
122 accel(2) =
acc[2]*1000.0;
125 if ((when -
Toe) < 0.0)
127 rkStep =
step*(-1.0);
130 double tolerance(1e-9);
138 if((workEpoch + rkStep) > when)
140 rkStep = (when - workEpoch);
145 if ((workEpoch + rkStep) < when)
147 rkStep = (when - workEpoch);
152 double dt = when-
Toe;
153 if (std::fabs(dt) >= 900)
157 a23 = 1000.0 *
ltdmp.
geta(dt+(rkStep/2.0));
161 k1 =
derivative(initialState, accel, a1, simplified);
162 tempRes = initialState + k1*rkStep/2.0;
163 k2 =
derivative(tempRes, accel, a23, simplified);
164 tempRes = initialState + k2*rkStep/2.0;
165 k3 =
derivative(tempRes, accel, a23, simplified);
166 tempRes = initialState + k3*rkStep;
167 k4 =
derivative(tempRes, accel, a4, simplified);
168 initialState = initialState +
169 (k1/6.0 + k2/3.0 + k3/3.0 + k4/6.0) * rkStep;
172 if (std::fabs(when - workEpoch) < tolerance)
177 xvt.
x[0] = initialState(0);
178 xvt.
x[1] = initialState(2);
179 xvt.
x[2] = initialState(4);
180 xvt.
v[0] = initialState(1);
181 xvt.
v[1] = initialState(3);
182 xvt.
v[2] = initialState(5);
259 ios::fmtflags oldFlags = s.flags();
261 s.setf(ios::fixed, ios::floatfield);
262 s.setf(ios::right, ios::adjustfield);
263 s.setf(ios::uppercase);
267 s <<
"****************************************************************"
268 <<
"************" << endl
269 <<
"GLONASS ORB/CLK (IMMEDIATE) PARAMETERS" << endl << endl
289 string tform(
"%02m/%02d/%Y %03j %02H:%02M:%02S %7.0s %P");
291 <<
" TIMES OF INTEREST" << endl << endl
292 <<
" MM/DD/YYYY DOY HH:MM:SS SOD" << endl
298 s.setf(ios::scientific, ios::floatfield);
299 s.setf(ios::right, ios::adjustfield);
300 s.setf(ios::uppercase);
304 s <<
" CLOCK PARAMETERS" << endl << endl
305 <<
"Bias: " << setw(16) <<
clkBias <<
" sec (Ï„)" << endl
306 <<
"Drift: " << setw(16) <<
freqBias <<
" sec/sec (γ)" << endl
307 <<
"Drift rate: " << setw(16) <<
driftRate <<
" sec/(sec**2) (β)"
309 <<
" EPHEMERIS/CLOCK STATUS" << endl
311 <<
" AGE REGIME ACCURACY (σ, m)" << endl
312 <<
"Ephemeris:" << setw(9) << (unsigned)
EjE <<
" " << setw(10)
316 <<
"Clock: " << setw(9) << (unsigned)
EjT <<
" " << setw(10)
320 << scientific << setprecision(6)
321 <<
" ORBIT PARAMETERS" << endl << endl
325 <<
"Position: " << setw(16) <<
pos[0] <<
", " << setw(16) <<
pos[1]
326 <<
", " << setw(16) <<
pos[2] <<
" km" << endl
327 <<
"Velocity: " << setw(16) <<
vel[0] <<
", " << setw(16) <<
vel[1]
328 <<
", " << setw(16) <<
vel[2] <<
" km/sec" << endl
329 <<
"Accel: " << setw(16) <<
acc[0] <<
", " << setw(16) <<
acc[1]
330 <<
", " << setw(16) <<
acc[2] <<
" km/sec**2" << endl
331 <<
"Ant Offset: " << setw(16) <<
apcOffset[0] <<
", " << setw(16)
334 <<
"Code Bias: " << setw(16) <<
tauDelta
335 <<
" sec (Δτ, L3OCp time to L3OCd time)" << endl
336 <<
"Time corr: " << setw(16) <<
tauc <<
" sec " << setw(16) <<
taucdot
337 <<
" sec/sec (GLONASS to MT)" << endl
338 <<
"Time offset:" << setw(16) <<
tauGPS <<
" sec (from GPS)" << endl
339 <<
"Next Eph: " << setw(16) << (unsigned)
PS <<
" strings" << endl;
341 s.setf(ios::fixed, ios::floatfield);
343 s <<
"t_b: " << setw(16) <<
tb <<
" seconds (MT)" << endl
354 <<
"tb (31): " <<
printTime(ref31,tform) << endl
355 <<
"tb (32): " <<
printTime(ref32,tform) << endl;
365 string tform(
"%02H:%02M:%02S");
366 string tform2(
"%02m/%02d/%4Y %03j %02H:%02M:%02S");
384 const double mu = pz90.
gm();
385 const double ae = pz90.
a();
386 const double j02 = -pz90.
j20();
390 const double we = 7.2921151467e-5;
392 double x(inState(0));
393 double y(inState(2));
394 double z(inState(4));
395 double r2(x*x +
y*
y + z*z);
396 double r(std::sqrt(r2));
403 double k1(-1.5*j02*xmu*rho*rho);
404 double cm(k1*(1.0-5.0*zr2));
405 double cmz(k1*(3.0-5.0*zr2));
407 double gloAx(k2*xr +
we*
we*x + 2.0*
we*inState(3) + accel(0));
408 double gloAy(k2*yr +
we*
we*
y - 2.0*
we*inState(1) + accel(1));
409 double gloAz((cmz-xmu)*zr + accel(2));
419 inState(5), gloAz });
429 case -15:
return 0.01;
430 case -14:
return 0.02;
431 case -13:
return 0.03;
432 case -12:
return 0.04;
433 case -11:
return 0.06;
434 case -10:
return 0.08;
436 case -8:
return 0.15;
459 default:
return std::numeric_limits<double>::quiet_NaN();
GLOCSatType Mj
What satellite j is and what it transmits.
bool validate() const override
GLOCRegime RjT
Regime for generation of clock data.
@ PZ90
The reference frame used by Glonass.
CommonTime getUserTime() const override
Triple vel
Satellite velocity at tb in km/s.
int id
Satellite identifier, e.g. PRN.
bool getXvt(const CommonTime &when, Xvt &xvt, const ObsID &=ObsID()) override
GLOCNavHeader header32
Header (incl xmit time) data from string 32.
uint8_t PS
Number of strings from this type 10 to the next.
Triple acc
Satellite acceleration at tb in km/s**2.
uint8_t EjT
Age of clock (6-hour intervals).
uint8_t EjE
Age of ephemeris (6-hour intervals).
void dump(std::ostream &s) const
Dump (in full detail) the contents of this object.
Triple pos
Satellite position at tb in km.
virtual double a() const noexcept
static double factorToSigma(int8_t factor)
CommonTime Toe
Reference time, combining N4, NT and tb.
double tauDelta
Offset of L3OCP time to L3OCD time.
GLOCRegime RjE
Regime for generation of ephemeris data.
GLOCNavHeader header
Common data.
gnsstk::Xvt::HealthStatus toXvtHealth(SVHealth e)
Cast SVHealth to Xvt::HealthStatus.
NavMessageType messageType
unsigned long tb31
Reference instant in Moscow time for string 31.
RefFrame frame
reference frame of this data
CommonTime endFit
Time at end of fit interval.
Triple apcOffset
L3OC APC offset from center of mass.
@ Any
wildcard; allows comparison with any other type
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
CommonTime & setTimeSystem(TimeSystem timeSystem)
void dump(std::ostream &s, DumpDetail dl) const override
Triple v
satellite velocity in ECEF Cartesian, meters/second
NavMessageID signal
Source signal identification for this navigation message data.
@ Unknown
unknown time frame; for legacy code compatibility
@ Unknown
Unknown or uninitialized stategy value.
double relcorr
relativity correction (standard 2R.V/c^2 term), seconds
static const GNSSTK_EXPORT double we
double freqBias
Satellite relative frequency bias (gamma^j).
GLOCNavHeader header11
Header (incl xmit time) data from string 11.
virtual double j20() const noexcept
GLOCSatType
Values for Word M in the ephemeris (immediate) and almanac data.
Triple x
Sat position ECEF Cartesian (X,Y,Z) meters.
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
double taucdot
Rate of correction for GLONASS to Moscow time.
unsigned long tb32
Reference instant in Moscow time for string 32.
double clkBias
Satellite clock bias in sec (tau^j).
double tauGPS
Fractional part of offset from GPS to GLONASS time.
SatID sat
ID of satellite to which the nav data applies.
double tauc
Correction for GLONASS to Moscow time.
void dumpTerse(std::ostream &s) const
double clkdrift
satellite clock drift in seconds/second
int8_t FjE
Accuracy factors dependent on ephemeris errors.
GLOCRegime
Regime for data generation (RjE, RjT, see ICD 5.2.2.8).
CommonTime beginFit
Time at beginning of fit interval.
GLOCNavHeader header31
Header (incl xmit time) data from string 31.
virtual double gm() const noexcept
int8_t FjT
Accuracy factors dependent on clock errors.
@ Full
Include all detailed information.
HealthStatus health
Health status of satellite at ref time.
@ Terse
Aptly named, multiple lines of output with no labels.
uint8_t N4
Number of leap years since 1996.
TimeSystem getTimeSystem() const
Obtain time system info (enum).
DumpDetail
Specify level of detail for dump output.
std::string printTime(const CommonTime &t, const std::string &fmt)
Vector< double > derivative(const Vector< double > &inState, const Vector< double > &accel, const Vector< double > <, bool simplified) const
@ Ephemeris
Precision orbits for the transmitting SV.
GLOCNavLTDMP ltdmp
Long-term dynamic model parameters.
uint16_t NT
Day within four-year interval N4.
double driftRate
Half rate of relative deviation of carrier freq.
#define DEBUGTRACE_FUNCTION()
double clkbias
Sat clock correction in seconds.
virtual double computeRelativityCorrection(void)
GLOCNavHeader header12
Header (incl xmit time) data from string 12.
unsigned long tb
Instant in Moscow time this data relates to.
Vector< double > geta(double deltat) const
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39