Go to the documentation of this file.
56 tgd1(
std::numeric_limits<double>::quiet_NaN()),
57 tgd2(
std::numeric_limits<double>::quiet_NaN())
74 double ToeSOW = bdsws.
sow;
83 double alat,talat,c2al,s2al,du,dr,di,U,R,truea,AINC;
84 double ANLON,cosu,sinu,xip,yip,can,san,cinc,sinc;
85 double xef,yef,zef,dek,dlk,div,domk,duv,drv;
86 double dxp,dyp,vxef,vyef,vzef;
91 double sqrtgm =
SQRT(ell.
gm());
94 double Ak =
A +
Adot * elapte;
96 double twoPI = 2.0e0 *
PI;
104 double dnA =
dn + 0.5 *
dndot * elapte;
106 amm = (sqrtgm / (
A*
Ahalf)) + dnA;
114 meana =
M0 + elapte * amm;
115 meana = fmod(meana, twoPI);
117 ea = meana + lecc *
::sin(meana);
121 F = meana - ( ea - lecc *
::sin(ea));
122 G = 1.0 - lecc *
::cos(ea);
126 }
while ( (fabs(delea) > 1.0e-11 ) && (loop_cnt <= 20) );
135 q =
SQRT( 1.0e0 - lecc*lecc);
138 G = 1.0e0 - lecc * cosea;
145 truea = atan2 ( GSTA, GCTA );
149 talat = 2.0e0 * alat;
150 c2al =
::cos( talat );
151 s2al =
::sin( talat );
153 du = c2al *
Cuc + s2al *
Cus;
154 dr = c2al *
Crc + s2al *
Crs;
155 di = c2al *
Cic + s2al *
Cis;
160 AINC =
i0 + tdrinc * elapte + di;
180 xGK = xip*can - yip*cinc*san;
181 yGK = xip*san + yip*cinc*can;
186 double cosZ =
::cos(angleZ);
187 double sinZ =
::sin(angleZ);
203 const double angleX = -5.0 *
PI/180.0;
204 double cosX =
::cos(angleX);
205 double sinX =
::sin(angleX);
219 inertialPos(0,0) = xGK;
220 inertialPos(1,0) = yGK;
221 inertialPos(2,0) = zGK;
224 result = matZ * matX * inertialPos;
226 xvt.
x[0] = result(0,0);
227 xvt.
x[1] = result(1,0);
228 xvt.
x[2] = result(2,0);
232 dlk = amm * q / (G*G);
235 div = tdrinc - 2.0e0 * dlk * (
Cic * s2al -
Cis * c2al);
236 duv = dlk*(1.e0+ 2.e0 * (
Cus*c2al -
Cuc*s2al));
237 drv =
A * lecc * dek * sinea + 2.e0 * dlk * (
Crs * c2al -
Crc * s2al) +
241 dxp = drv*cosu - R*sinu*duv;
242 dyp = drv*sinu + R*cosu*duv;
259 dIntPos(0,0) = - xip * san *
OMEGAdot
269 dIntPos(2,0) = yip * cinc * div + dyp * sinc;
272 vresult = matZ * matX * dIntPos +
273 dmatZ * matX * inertialPos;
276 xvt.
v[0] = vresult(0,0);
277 xvt.
v[1] = vresult(1,0);
278 xvt.
v[2] = vresult(2,0);
333 const ios::fmtflags oldFlags = s.flags();
334 s.setf(ios::fixed, ios::floatfield);
335 s.setf(ios::right, ios::adjustfield);
336 s.setf(ios::uppercase);
343 s <<
" SV STATUS" << endl << endl
344 <<
"Health bit (SatH1) : 0x" << hex << (unsigned)
satH1 << dec
346 <<
"AODC : " << setw(6) <<
getAOD(
aodc) <<
" hours ("
347 << (unsigned)
aodc <<
")" << endl
348 <<
"AODE : " << setw(6) <<
getAOD(
aode) <<
" hours ("
349 << (unsigned)
aode <<
")" << endl
350 <<
"URA index : " << setw(6) << (unsigned)
uraIndex << endl
351 <<
"URA (nominal) : " << setw(6) << fixed
353 <<
"Health : " << setw(9)
355 <<
"Tgd1 : " << setw(13) << setprecision(6)
356 << scientific <<
tgd1 <<
" sec" << endl
357 <<
"Tgd2 : " << setw(13) << setprecision(6)
358 << scientific <<
tgd2 <<
" sec" << endl << endl
359 <<
" SUBFRAME OVERHEAD" << endl << endl
360 <<
" SOW DOW:HH:MM:SS" << endl
361 <<
printTime(ws1,
"Pg1 SOW: %6.0g %3a-%w:%02H:%02M:%02S\n");
371 return 24 * (aod-23);
double idot
Rate of inclination angle (rad/sec)
@ Unknown
Health state is unknown.
int id
Satellite identifier, e.g. PRN.
const long MIN_MEO_BDS
The first ranging code number for BeiDou MEO/IGSO satellites.
virtual double gm() const noexcept
double Cis
Sine inclination (rad)
double A
Semi-major axis (m)
const double SV_ACCURACY_GPS_NOMINAL_INDEX[]
double svClockBias(const CommonTime &when) const
@ Healthy
Satellite is healthy, PVT valid.
NavMessageType messageType
double svRelativity(const CommonTime &when) const override
double OMEGAdot
Rate of Rt ascension (rad/sec)
bool satH1
Autonomous satellite health flag.
RefFrame frame
reference frame of this data
uint8_t aodc
Age of data - clock.
CommonTime endFit
Time at end of fit interval.
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
double Cuc
Cosine latitude (rad)
double w
Argument of perigee (rad)
const double PI
GPS value of PI; also specified by GAL.
Triple v
satellite velocity in ECEF Cartesian, meters/second
CommonTime Toe
Orbit epoch.
double Crs
Sine radius (m)
NavMessageID signal
Source signal identification for this navigation message data.
bool validate() const override
@ Degraded
Satellite is in a degraded state. Use at your own risk.
virtual double angVelocity() const noexcept
double sin(gnsstk::Angle x)
double relcorr
relativity correction (standard 2R.V/c^2 term), seconds
CommonTime xmitTime
Time of transmission of the start of the data.
double tgd2
Group delay differential on B2I.
double Adot
Rate of semi-major axis (m/sec)
@ Uninitialized
Health status has not been set.
double M0
Mean anomaly (rad)
Triple x
Sat position ECEF Cartesian (X,Y,Z) meters.
@ Unknown
Health is not known or is uninitialized.
bool validate() const override
@ Healthy
Satellite is in a healthy and useable state.
double dndot
Rate of correction to mean motion (rad/sec/sec)
CommonTime getUserTime() const override
double Cus
Sine latitude (rad)
double Ahalf
Square Root of semi-major axis (m**.5)
SatID sat
ID of satellite to which the nav data applies.
double clkdrift
satellite clock drift in seconds/second
CommonTime beginFit
Time at beginning of fit interval.
double cos(gnsstk::Angle x)
double i0
Inclination (rad)
HealthStatus health
Health status of satellite at ref time.
double svClockDrift(const CommonTime &when) const
double Cic
Cosine inclination (rad)
bool getXvt(const CommonTime &when, Xvt &xvt, const ObsID &=ObsID()) override
double Crc
Cosine radius (m)
double tgd1
Group delay differential on B1I.
std::string printTime(const CommonTime &t, const std::string &fmt)
uint8_t aode
Age of data - ephemeris.
@ Ephemeris
Precision orbits for the transmitting SV.
static unsigned getAOD(uint8_t aod)
@ Degraded
Sat is in a degraded state, recommend do not use.
double clkbias
Sat clock correction in seconds.
uint8_t uraIndex
4-bit URA index from subframe 1.
SVHealth health
SV health status.
const long MAX_MEO_BDS
The last ranging code number for BeiDou MEO/IGSO satellites.
@ Unhealthy
Satellite is unhealthy and should not be used.
double OMEGA0
Longitude of ascending node at weekly epoch (rad)
void dumpSVStatus(std::ostream &s) const override
@ Unhealthy
Sat is marked unhealthy, do not use PVT.
bool getXvt(const CommonTime &when, Xvt &xvt, const ObsID &oid=ObsID()) override=0
uint32_t sow
Seconds of week from word 1-2 of the subframe.
double dn
Correction to mean motion (rad/sec)
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:38