NewNavToRinex.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
39 #include "NewNavToRinex.hpp"
40 #include "RinexNavDataFactory.hpp"
41 #include "GPSLNavEph.hpp"
42 #include "GalFNavEph.hpp"
43 #include "GalFNavHealth.hpp"
44 #include "GalINavEph.hpp"
45 #include "GalINavHealth.hpp"
46 #include "BDSD1NavEph.hpp"
47 #include "BDSD2NavEph.hpp"
48 #include "GLOFNavEph.hpp"
49 #include "GPSWeekSecond.hpp"
50 #include "BDSWeekSecond.hpp"
51 #include "KlobucharIonoNavData.hpp"
52 #include "NeQuickIonoNavData.hpp"
53 #include "DebugTrace.hpp"
54 #include "TimeString.hpp"
55 
56 namespace gnsstk
57 {
58  bool NewNavToRinex ::
60  {
62  bool rv = false, tmp;
63  // Collection of satellite systems that made it into rndList.
64  // Used to set the header system type.
65  std::set<SatelliteSystem> systems;
66  for (const auto& i : data)
67  {
68  tmp = fillHeader(i, header);
69  if (tmp)
70  {
71  // No need to try to fill data from this object, as the
72  // header and data objects are mutually exclusive.
73  rv = true;
74  continue;
75  }
76  Rinex3NavData rnd;
77  tmp = fillData(i, rnd, healthGet);
78  if (tmp)
79  {
80  rndList.push_back(rnd);
81  systems.insert(rnd.sat.system);
82  rv = true;
83  }
84  }
85  if (systems.size() == 1)
86  {
87  header.fileSysSat.system = *systems.begin();
89  header.fileSys = rsat.systemChar();
90  }
91  else if (systems.size() > 1)
92  {
93  header.fileSys = "M"; // Mixed
95  }
96  return rv;
97  }
98 
99 
100  bool NewNavToRinex ::
101  write(const std::string& filename)
102  {
104  using namespace std;
105  Rinex3NavStream rns(filename.c_str(), ios::out);
106  if (!rns)
107  {
108  cerr << "Unable to open \"" << filename << "\" for output." << endl;
109  return false;
110  }
111  rns << header;
112  if (!rns)
113  {
114  cerr << "Failed to write header to \"" << filename << "\"." << endl;
115  return false;
116  }
117  for (const auto& i : rndList)
118  {
119  rns << i;
120  if (!rns)
121  {
122  cerr << "Failed to write data to \"" << filename << "\"." << endl;
123  return false;
124  }
125  }
126  return true;
127  }
128 
129 
130  bool NewNavToRinex ::
132  {
134  bool rv = false;
135  std::shared_ptr<StdNavTimeOffset> todPtr;
136  std::shared_ptr<KlobucharIonoNavData> kiPtr;
137  std::shared_ptr<NeQuickIonoNavData> neqiPtr;
138  switch (ndp->signal.messageType)
139  {
141  todPtr = std::dynamic_pointer_cast<StdNavTimeOffset>(ndp);
142  if (todPtr)
143  {
145  if (fillTimeSystemCorrection(todPtr, tsc))
146  {
148  h.mapTimeCorr[tsc.asString4()] = tsc;
149  if (todPtr->deltatLS > 0)
150  {
151  h.leapSeconds = todPtr->deltatLS;
152  h.leapDelta = todPtr->deltatLSF;
153  h.leapWeek = todPtr->wnLSF;
154  h.leapDay = todPtr->dn;
156  }
157  rv = true;
158  }
159  }
160  break;
162  kiPtr =
163  std::dynamic_pointer_cast<KlobucharIonoNavData>(ndp);
164  if (kiPtr)
165  {
166  // Only GPS Alpha and Beta parameters are
167  // supported in RINEX (e.g. no QZSS Klobuchar).
168  if (ndp->signal.system != SatelliteSystem::GPS)
169  {
170  break;
171  }
172  IonoCorr icA, icB;
173  icA.type = IonoCorr::GPSA;
174  icA.param[0] = kiPtr->alpha[0];
175  icA.param[1] = kiPtr->alpha[1];
176  icA.param[2] = kiPtr->alpha[2];
177  icA.param[3] = kiPtr->alpha[3];
178  icB.type = IonoCorr::GPSB;
179  icB.param[0] = kiPtr->beta[0];
180  icB.param[1] = kiPtr->beta[1];
181  icB.param[2] = kiPtr->beta[2];
182  icB.param[3] = kiPtr->beta[3];
183  h.mapIonoCorr[icA.asString()] = icA;
184  h.mapIonoCorr[icB.asString()] = icB;
186  rv = true;
187  }
188  else
189  {
190  neqiPtr =
191  std::dynamic_pointer_cast<NeQuickIonoNavData>(ndp);
192  if (neqiPtr)
193  {
194  // Only Galileo NeQuick parameters are
195  // supported in RINEX.
196  if (ndp->signal.system != SatelliteSystem::Galileo)
197  {
198  break;
199  }
200  IonoCorr ic;
201  ic.param[0] = neqiPtr->ai[0];
202  ic.param[1] = neqiPtr->ai[1];
203  ic.param[2] = neqiPtr->ai[2];
204  ic.type = IonoCorr::GAL;
205  h.mapIonoCorr[ic.asString()] = ic;
207  rv = true;
208  }
209  }
210  break;
211  default:
212  // ignore.
213  break;
214  } // switch (ndp->signal.messageType)
215  return rv;
216  } // NewNavToRinex::fillHeader(const NavDataPtr& ndp, Rinex3NavHeader& h)
217 
218 
219  bool NewNavToRinex ::
220  fillData(const NavDataPtr& ndp, Rinex3NavData& rnd, HealthGetter& healthGet)
221  {
223  if (!ndp)
224  {
225  DEBUGTRACE("null ndp");
226  return false;
227  }
228  DEBUGTRACE(ndp->signal);
229  if (ndp->signal.messageType != NavMessageType::Ephemeris)
230  {
231  DEBUGTRACE("non-ephemeris");
232  return false;
233  }
234  if (!fillDataGPSLNav(ndp, rnd) &&
235  !fillDataGalFNav(ndp, rnd, healthGet) &&
236  !fillDataGalINav(ndp, rnd, healthGet) &&
237  !fillDataBDSD1Nav(ndp, rnd) &&
238  !fillDataBDSD2Nav(ndp, rnd) &&
239  !fillDataGLOFNav(ndp, rnd))
240  {
241  DEBUGTRACE("NO TRANSLATION");
242  return false;
243  }
244  return true;
245  }
246 
247 
248  bool NewNavToRinex ::
250  {
252  if (ndp->signal.nav != gnsstk::NavType::GPSLNAV)
253  {
254  DEBUGTRACE("not GPSLNAV");
255  return false;
256  }
257  std::shared_ptr<OrbitDataKepler> odk =
258  std::dynamic_pointer_cast<OrbitDataKepler>(ndp);
259  if (!odk)
260  {
261  DEBUGTRACE("not an OrbitDataKepler");
262  return false;
263  }
264  std::shared_ptr<GPSLNavEph> eph =
265  std::dynamic_pointer_cast<GPSLNavEph>(ndp);
266  if (!eph)
267  {
268  DEBUGTRACE("not a GPSLNavEph");
269  return false;
270  }
271  if (!fillDataKepler(odk, rnd))
272  {
273  DEBUGTRACE("fillDataKepler failed");
274  return false;
275  }
276  GPSWeekSecond xmit(eph->timeStamp);
277  rnd.xmitTime = xmit.sow;
278  rnd.weeknum = xmit.week;
279  rnd.accuracy = ura2nominalAccuracy(eph->uraIndex);
280  rnd.health = eph->healthBits;
281  rnd.codeflgs = static_cast<short>(eph->codesL2);
282  rnd.L2Pdata = eph->L2Pdata;
283  rnd.IODC = eph->iodc;
284  rnd.IODE = eph->iode;
285  rnd.Tgd = eph->tgd;
286  rnd.fitint = getLegacyFitInterval(eph->iodc, eph->fitIntFlag);
287  return true;
288  }
289 
290 
291  bool NewNavToRinex ::
293  HealthGetter& healthGet)
294  {
296  if (ndp->signal.nav != gnsstk::NavType::GalFNAV)
297  {
298  DEBUGTRACE("not GalFNAV");
299  return false;
300  }
301  std::shared_ptr<OrbitDataKepler> odk =
302  std::dynamic_pointer_cast<OrbitDataKepler>(ndp);
303  if (!odk)
304  {
305  DEBUGTRACE("not an OrbitDataKepler");
306  return false;
307  }
308  std::shared_ptr<GalFNavEph> eph =
309  std::dynamic_pointer_cast<GalFNavEph>(ndp);
310  if (!eph)
311  {
312  DEBUGTRACE("not a GalFNavEph");
313  return false;
314  }
315  if (!fillDataKepler(odk, rnd))
316  {
317  DEBUGTRACE("fillDataKepler failed");
318  return false;
319  }
320  // RINEX 3.04 Table A8 note 4 says the GAL week number
321  // is identical to the GPS week number. ergo, it's not
322  // really a Galileo week number.
323  GPSWeekSecond xmit(eph->timeStamp);
324  rnd.xmitTime = xmit.sow;
325  DEBUGTRACE("GAL F/Nav week number=" << xmit.week
326  << printTime(eph->timeStamp," date=%Y/%02m/%02d"));
327  rnd.weeknum = xmit.week;
328  rnd.IODnav = eph->iodnav1;
329  rnd.datasources = 0;
330  if ((eph->signal.obs.band == CarrierBand::L5) &&
331  (eph->signal.obs.code == TrackingCode::E5aI))
332  {
333  rnd.datasources |= 0x02;
334  rnd.datasources |= 0x100;
335  }
336  rnd.health = ((int)eph->dvsE5a & 0x01) << 3;
337  rnd.health |= ((int)eph->hsE5a & 0x03) << 4;
338  NavDataPtr healthPtr;
339  NavSatelliteID sidE1B(eph->signal);
340  sidE1B.obs.band = CarrierBand::L1;
341  sidE1B.obs.code = TrackingCode::E1B;
342  sidE1B.nav = NavType::GalINAV;
343  if (healthGet.getHealth(sidE1B, eph->timeStamp, healthPtr))
344  {
345  DEBUGTRACE("got some health");
346  auto fnh(std::dynamic_pointer_cast<GalINavHealth>(healthPtr));
347  if (fnh)
348  {
349  DEBUGTRACE("and it's I/NAV");
350  //healthPtr->dump(std::cerr, DumpDetail::Full);
351  rnd.health |= ((int)fnh->dataValidityStatus & 0x01);
352  rnd.health |= ((int)fnh->sigHealthStatus & 0x03) << 1;
353  }
354  }
355  NavSatelliteID sidE5b(eph->signal);
356  sidE5b.obs.band = CarrierBand::L1;
357  sidE5b.obs.code = TrackingCode::E5bI;
358  sidE5b.nav = NavType::GalINAV;
359  if (healthGet.getHealth(sidE5b, eph->timeStamp, healthPtr))
360  {
361  DEBUGTRACE("got some health");
362  auto fnh(std::dynamic_pointer_cast<GalINavHealth>(healthPtr));
363  if (fnh)
364  {
365  DEBUGTRACE("and it's I/NAV");
366  //healthPtr->dump(std::cerr, DumpDetail::Full);
367  rnd.health |= ((int)fnh->dataValidityStatus & 0x01) << 6;
368  rnd.health |= ((int)fnh->sigHealthStatus & 0x03) << 7;
369  }
370  }
371  rnd.Tgd = eph->bgdE5aE1;
374  rnd.accuracy = RinexNavDataFactory::encodeSISA(eph->sisaIndex);
375  return true;
376  }
377 
378 
379  bool NewNavToRinex ::
381  HealthGetter& healthGet)
382  {
384  if (ndp->signal.nav != gnsstk::NavType::GalINAV)
385  {
386  DEBUGTRACE("not GalINAV");
387  return false;
388  }
389  std::shared_ptr<OrbitDataKepler> odk =
390  std::dynamic_pointer_cast<OrbitDataKepler>(ndp);
391  if (!odk)
392  {
393  DEBUGTRACE("not an OrbitDataKepler");
394  return false;
395  }
396  std::shared_ptr<GalINavEph> eph =
397  std::dynamic_pointer_cast<GalINavEph>(ndp);
398  if (!eph)
399  {
400  DEBUGTRACE("not a GalINavEph");
401  return false;
402  }
403  if (!fillDataKepler(odk, rnd))
404  {
405  DEBUGTRACE("fillDataKepler failed");
406  return false;
407  }
408  // RINEX 3.04 Table A8 note 4 says the GAL week number
409  // is identical to the GPS week number. ergo, it's not
410  // really a Galileo week number.
411  GPSWeekSecond xmit(eph->timeStamp);
412  rnd.xmitTime = xmit.sow;
413  DEBUGTRACE("GAL I/Nav week number=" << xmit.week
414  << printTime(eph->timeStamp," date=%Y/%02m/%02d"));
415  rnd.weeknum = xmit.week;
416  rnd.IODnav = eph->iodnav1;
417  rnd.datasources = 0;
418  if ((eph->signal.obs.band == CarrierBand::L1) &&
419  (eph->signal.obs.code == TrackingCode::E1B))
420  {
421  rnd.datasources |= 0x01;
422  }
423  else if ((eph->signal.obs.band == CarrierBand::E5b) &&
424  (eph->signal.obs.code == TrackingCode::E5bI))
425  {
426  rnd.datasources |= 0x04;
427  }
428  rnd.datasources |= 0x200;
429  rnd.health = (int)eph->dvsE1B & 0x01;
430  rnd.health |= ((int)eph->hsE1B & 0x03) << 1;
431  NavDataPtr healthPtr;
432  NavSatelliteID sidE5a(eph->signal);
433  sidE5a.obs.band = CarrierBand::L5;
434  sidE5a.obs.code = TrackingCode::E5aI;
435  sidE5a.nav = NavType::GalFNAV;
436  if (healthGet.getHealth(sidE5a, eph->timeStamp, healthPtr))
437  {
438  DEBUGTRACE("got some health");
439  auto fnh(std::dynamic_pointer_cast<GalFNavHealth>(healthPtr));
440  if (fnh)
441  {
442  DEBUGTRACE("and it's F/NAV");
443  //healthPtr->dump(std::cerr, DumpDetail::Full);
444  rnd.health |= ((int)fnh->dataValidityStatus & 0x01) << 3;
445  rnd.health |= ((int)fnh->sigHealthStatus & 0x03) << 4;
446  }
447  }
448  rnd.health |= ((int)eph->dvsE5b & 0x01) << 6;
449  rnd.health |= ((int)eph->hsE5b & 0x03) << 7;
450  rnd.Tgd = eph->bgdE5aE1;
451  rnd.Tgd2 = eph->bgdE5bE1;
452  rnd.accuracy = RinexNavDataFactory::encodeSISA(eph->sisaIndex);
453  return true;
454  }
455 
456 
457  bool NewNavToRinex ::
459  {
461  if (ndp->signal.nav != gnsstk::NavType::BeiDou_D1)
462  {
463  DEBUGTRACE("not BeiDou_D1");
464  return false;
465  }
466  std::shared_ptr<OrbitDataKepler> odk =
467  std::dynamic_pointer_cast<OrbitDataKepler>(ndp);
468  if (!odk)
469  {
470  DEBUGTRACE("not an OrbitDataKepler");
471  return false;
472  }
473  std::shared_ptr<BDSD1NavEph> eph =
474  std::dynamic_pointer_cast<BDSD1NavEph>(ndp);
475  if (!eph)
476  {
477  DEBUGTRACE("not a BDSD1NavEph");
478  return false;
479  }
480  if (!fillDataKepler(odk, rnd))
481  {
482  DEBUGTRACE("fillDataKepler failed");
483  return false;
484  }
485  BDSWeekSecond xmit(eph->timeStamp);
486  rnd.xmitTime = xmit.sow;
487  rnd.weeknum = xmit.week;
488  rnd.IODE = eph->aode;
489  rnd.IODC = eph->aodc;
490  rnd.health = eph->satH1;
491  if (eph->uraIndex >= 15)
492  {
493  rnd.accuracy = 8192;
494  }
495  else
496  {
497  rnd.accuracy = ura2nominalAccuracy(eph->uraIndex);
498  }
499  rnd.Tgd = eph->tgd1;
500  rnd.Tgd2 = eph->tgd2;
501  return true;
502  }
503 
504 
505  bool NewNavToRinex ::
507  {
509  if (ndp->signal.nav != gnsstk::NavType::BeiDou_D2)
510  {
511  DEBUGTRACE("not BeiDou_D2");
512  return false;
513  }
514  std::shared_ptr<OrbitDataKepler> odk =
515  std::dynamic_pointer_cast<OrbitDataKepler>(ndp);
516  if (!odk)
517  {
518  DEBUGTRACE("not an OrbitDataKepler");
519  return false;
520  }
521  std::shared_ptr<BDSD2NavEph> eph =
522  std::dynamic_pointer_cast<BDSD2NavEph>(ndp);
523  if (!eph)
524  {
525  DEBUGTRACE("not a BDSD2NavEph");
526  return false;
527  }
528  if (!fillDataKepler(odk, rnd))
529  {
530  DEBUGTRACE("fillDataKepler failed");
531  return false;
532  }
533  BDSWeekSecond xmit(eph->timeStamp);
534  rnd.xmitTime = xmit.sow;
535  rnd.weeknum = xmit.week;
536  rnd.IODE = eph->aode;
537  rnd.IODC = eph->aodc;
538  rnd.health = eph->satH1;
539  if (eph->uraIndex >= 15)
540  {
541  rnd.accuracy = 8192;
542  }
543  else
544  {
545  rnd.accuracy = ura2nominalAccuracy(eph->uraIndex);
546  }
547  rnd.Tgd = eph->tgd1;
548  rnd.Tgd2 = eph->tgd2;
549  return true;
550  }
551 
552 
553  bool NewNavToRinex ::
555  {
557  if (ndp->signal.nav != gnsstk::NavType::GloCivilF)
558  {
559  DEBUGTRACE("not GLONASS FDMA");
560  return false;
561  }
562  std::shared_ptr<GLOFNavEph> eph =
563  std::dynamic_pointer_cast<GLOFNavEph>(ndp);
564  if (!eph)
565  {
566  DEBUGTRACE("not a GLOFNavEph");
567  return false;
568  }
569  rnd.time = eph->Toe;
570  rnd.satSys = "R";
571  rnd.PRNID = eph->slot;
572  rnd.sat = RinexSatID(eph->slot, SatelliteSystem::Glonass);
573  rnd.TauN = -(eph->clkBias);
574  rnd.GammaN = eph->freqBias;
575  // We're only getting seconds of week so it's odd but okay to
576  // use GPSWeekSecond here.
577  GPSWeekSecond mft(eph->ref);
578  rnd.MFtime = mft.sow;
579  // convert meters to km for RINEX
580  rnd.px = eph->pos[0] / 1000.0;
581  rnd.py = eph->pos[1] / 1000.0;
582  rnd.pz = eph->pos[2] / 1000.0;
583  rnd.vx = eph->vel[0] / 1000.0;
584  rnd.vy = eph->vel[1] / 1000.0;
585  rnd.vz = eph->vel[2] / 1000.0;
586  rnd.ax = eph->acc[0] / 1000.0;
587  rnd.ay = eph->acc[1] / 1000.0;
588  rnd.az = eph->acc[2] / 1000.0;
589  rnd.health = (eph->healthBits >> 2) & 1;
590  rnd.freqNum = eph->signal.obs.freqOffs;
591  rnd.ageOfInfo = eph->aod;
592  return true;
593  }
594 
595 
596  bool NewNavToRinex ::
597  fillDataKepler(const std::shared_ptr<OrbitDataKepler>& odk,
598  Rinex3NavData& rnd)
599  {
601  if (!odk)
602  {
603  return false;
604  }
605  if (odk->signal.messageType != NavMessageType::Ephemeris)
606  {
607  DEBUGTRACE("non-ephemeris");
608  return false;
609  }
610  rnd.time = odk->Toc;
611  rnd.sat = odk->signal.sat;
612  rnd.satSys = rnd.sat.systemChar();
613  rnd.PRNID = rnd.sat.id;
614  // Seconds of week are the same for everyone (the start of
615  // the week is the same, conceptually, I'm not talking about
616  // time offsets between systems).
617  GPSWeekSecond tocWS(odk->Toc);
618  GPSWeekSecond toeWS(odk->Toe);
619  rnd.Toc = tocWS.sow;
620  rnd.af0 = odk->af0;
621  rnd.af1 = odk->af1;
622  rnd.af2 = odk->af2;
623  rnd.Cuc = odk->Cuc;
624  rnd.Cus = odk->Cus;
625  rnd.Crc = odk->Crc;
626  rnd.Crs = odk->Crs;
627  rnd.Cic = odk->Cic;
628  rnd.Cis = odk->Cis;
629  rnd.Toe = toeWS.sow;
630  rnd.M0 = odk->M0;
631  rnd.dn = odk->dn;
632  rnd.ecc = odk->ecc;
633  rnd.Ahalf = odk->Ahalf;
634  rnd.OMEGA0 = odk->OMEGA0;
635  rnd.i0 = odk->i0;
636  rnd.w = odk->w;
637  rnd.OMEGAdot = odk->OMEGAdot;
638  rnd.idot = odk->idot;
639  return true;
640  }
641 
642 
643  bool NewNavToRinex ::
644  fillTimeSystemCorrection(const std::shared_ptr<StdNavTimeOffset>& toffs,
646  {
649  toffs->src, toffs->tgt, tsc.type))
650  {
651  return false;
652  }
653  tsc.frTS = toffs->src;
654  tsc.toTS = toffs->tgt;
655  tsc.A0 = toffs->a0;
656  tsc.A1 = toffs->a1;
657  tsc.refTime = toffs->refTime;
658  // This isn't really the geoProvider which is an SBAS thing,
659  // but the RINEX 3.04 documentation says to put the "System
660  // and number Snn of GNSS satellite broadcasting the time
661  // system difference or..."
662  RinexSatID sid(toffs->signal.sat);
663  tsc.geoProvider = sid.toString();
664  return true;
665  }
666 
667 
668  bool HealthGetter ::
669  getHealth(const NavSatelliteID& nsid, const CommonTime& when,
670  NavDataPtr& healthOut)
671  {
672  const auto& hmi = healthMap.find(nsid);
673  if (hmi == healthMap.end())
674  {
675  return false;
676  }
677  const auto& ndmi = hmi->second.lower_bound(when);
678  if (ndmi == hmi->second.end())
679  {
680  return false;
681  }
682  healthOut = ndmi->second;
683  return true;
684  }
685 
686 
689  : navLib(nl), xmitHealth(SVHealth::Any),
691  {
692  }
693 
694 
696  getHealth(const NavSatelliteID& nsid, const CommonTime& when,
697  NavDataPtr& healthOut)
698  {
700  return navLib.find(nmid, when, healthOut, xmitHealth, valid, order);
701  }
702 }
gnsstk::NavDataPtr
std::shared_ptr< NavData > NavDataPtr
Factories instantiate these in response to find() requests.
Definition: NavData.hpp:62
gnsstk::ura2nominalAccuracy
double ura2nominalAccuracy(short ura) noexcept
Definition: GPS_URA.hpp:146
gnsstk::Rinex3NavData::fitint
RNDouble fitint
Fit interval.
Definition: Rinex3NavData.hpp:197
gnsstk::NavSignalID::nav
NavType nav
Navigation message structure of this signal.
Definition: NavSignalID.hpp:96
gnsstk::Rinex3NavHeader::validLeapSeconds
@ validLeapSeconds
Set if the Leap Seconds value is valid.
Definition: Rinex3NavHeader.hpp:164
gnsstk::Rinex3NavHeader::fileSysSat
SatID fileSysSat
File system as a SatID.
Definition: Rinex3NavHeader.hpp:181
gnsstk::NavMessageID
Class used to identify/categorize navigation message data.
Definition: NavMessageID.hpp:52
gnsstk::Rinex3NavData::Ahalf
RNDouble Ahalf
SQRT of semi-major axis (m**1/2)
Definition: Rinex3NavData.hpp:191
gnsstk::NewNavToRinex::fillDataGLOFNav
static bool fillDataGLOFNav(const NavDataPtr &ndp, Rinex3NavData &rnd)
Definition: NewNavToRinex.cpp:554
gnsstk::Rinex3NavData::vz
RNDouble vz
SV velocity.
Definition: Rinex3NavData.hpp:204
gnsstk::Rinex3NavData::py
RNDouble py
Definition: Rinex3NavData.hpp:203
gnsstk::Rinex3NavData::Toc
double Toc
Time of clock (sec of week)
Definition: Rinex3NavData.hpp:167
gnsstk::NewNavToRinex::rndList
std::list< Rinex3NavData > rndList
The data created by translate() to be written.
Definition: NewNavToRinex.hpp:228
gnsstk::SatID::id
int id
Satellite identifier, e.g. PRN.
Definition: SatID.hpp:154
gnsstk::TimeSystemCorrection
Definition: TimeSystemCorr.hpp:60
gnsstk::Rinex3NavData::Cuc
RNDouble Cuc
Cosine latitude (rad)
Definition: Rinex3NavData.hpp:177
gnsstk::Rinex3NavData::Tgd2
RNDouble Tgd2
Group delay differential (sec) (BDS:B2/B3 GAL:E5b/E1)
Definition: Rinex3NavData.hpp:172
gnsstk::Rinex3NavHeader::leapWeek
long leapWeek
Week number of ref time.
Definition: Rinex3NavHeader.hpp:192
gnsstk::Rinex3NavStream
Definition: Rinex3NavStream.hpp:62
BDSD2NavEph.hpp
gnsstk::Rinex3NavHeader::valid
unsigned long valid
Definition: Rinex3NavHeader.hpp:153
gnsstk::NavLibraryHealthGetter::order
NavSearchOrder order
Parameter to NavLibrary::getHealth()
Definition: NewNavToRinex.hpp:91
gnsstk::Rinex3NavData
Definition: Rinex3NavData.hpp:69
gnsstk::Rinex3NavData::time
CommonTime time
Time according to the sat/epoch record (TOC)
Definition: Rinex3NavData.hpp:122
gnsstk::NavType::BeiDou_D1
@ BeiDou_D1
gnsstk::TrackingCode::E1B
@ E1B
Galileo E1-B signal, supporting OS/HAS/SoL.
gnsstk::Rinex3NavData::Cic
RNDouble Cic
Cosine inclination (rad)
Definition: Rinex3NavData.hpp:181
gnsstk::Rinex3NavHeader::validIonoCorrGPS
@ validIonoCorrGPS
Set if GPS Iono Correction data is valid.
Definition: Rinex3NavHeader.hpp:161
gnsstk::NewNavToRinex::translate
bool translate(const NavDataPtrList &data, HealthGetter &healthGet)
Definition: NewNavToRinex.cpp:59
gnsstk::NavType::GalINAV
@ GalINAV
NeQuickIonoNavData.hpp
gnsstk::TimeSystemCorrection::type
CorrType type
Definition: TimeSystemCorr.hpp:164
gnsstk::RinexNavDataFactory::encodeSISA
static double encodeSISA(uint8_t sisa)
Definition: RinexNavDataFactory.cpp:1318
gnsstk::TimeSystemCorrection::A1
double A1
Definition: TimeSystemCorr.hpp:166
gnsstk::CarrierBand::E5b
@ E5b
Galileo E5b.
gnsstk::Rinex3NavData::satSys
std::string satSys
Satellite system of Epoch: G,R,E,S,C.
Definition: Rinex3NavData.hpp:123
gnsstk::Rinex3NavData::ax
RNDouble ax
Definition: Rinex3NavData.hpp:205
gnsstk::Rinex3NavData::Toe
RNDouble Toe
Ephemeris epoch (sec of week)
Definition: Rinex3NavData.hpp:187
gnsstk::NavLibraryHealthGetter::getHealth
bool getHealth(const NavSatelliteID &nsid, const CommonTime &when, NavDataPtr &healthOut) override
Definition: NewNavToRinex.cpp:696
gnsstk::NavSatelliteID
Definition: NavSatelliteID.hpp:57
gnsstk::Rinex3NavData::ecc
RNDouble ecc
Eccentricity.
Definition: Rinex3NavData.hpp:190
DEBUGTRACE
#define DEBUGTRACE(EXPR)
Definition: DebugTrace.hpp:119
gnsstk::Rinex3NavData::IODC
RNDouble IODC
Index of data-clock.
Definition: Rinex3NavData.hpp:138
gnsstk::TimeSystemCorrection::refTime
CommonTime refTime
reference time for polynominal
Definition: TimeSystemCorr.hpp:167
gnsstk::NewNavToRinex::header
Rinex3NavHeader header
The header that will be used by translate() and write().
Definition: NewNavToRinex.hpp:226
gnsstk::Rinex3NavData::af2
RNDouble af2
SV clock drift rate (sec/sec**2)
Definition: Rinex3NavData.hpp:170
gnsstk::Rinex3NavData::health
short health
SV health.
Definition: Rinex3NavData.hpp:131
gnsstk::CarrierBand::Any
@ Any
Used to match any carrier band.
gnsstk::TimeSystemCorrection::A0
double A0
Definition: TimeSystemCorr.hpp:166
gnsstk::Rinex3NavData::i0
RNDouble i0
Inclination (rad)
Definition: Rinex3NavData.hpp:193
gnsstk::NavMessageType::Health
@ Health
SV health status information message.
GalFNavHealth.hpp
gnsstk::NavDataPtrList
std::list< NavDataPtr > NavDataPtrList
Definition: NavData.hpp:75
gnsstk::Rinex3NavData::OMEGA0
RNDouble OMEGA0
Rt ascension of ascending node (rad)
Definition: Rinex3NavData.hpp:192
gnsstk::NewNavToRinex::write
bool write(const std::string &filename)
Definition: NewNavToRinex.cpp:101
GalINavHealth.hpp
gnsstk::Rinex3NavHeader::mapIonoCorr
std::map< std::string, IonoCorr > mapIonoCorr
map of label : GAL, GPSA or GPSB, and IONO CORRs
Definition: Rinex3NavHeader.hpp:189
gnsstk::ObsID::band
CarrierBand band
Definition: ObsID.hpp:200
gnsstk::Rinex3NavData::Crs
RNDouble Crs
Sine radius (m)
Definition: Rinex3NavData.hpp:180
gnsstk::NavType::GloCivilF
@ GloCivilF
gnsstk::NavLibraryHealthGetter::NavLibraryHealthGetter
NavLibraryHealthGetter(NavLibrary &nl)
Definition: NewNavToRinex.cpp:688
gnsstk::IonoCorr
Ionospheric Corrections.
Definition: Rinex3NavHeader.hpp:66
GalFNavEph.hpp
gnsstk::IonoCorr::asString
std::string asString() const noexcept
Return string version of CorrType.
Definition: Rinex3NavHeader.cpp:124
gnsstk::SVHealth
SVHealth
Identify different types of SV health states.
Definition: SVHealth.hpp:52
gnsstk::NavValidityType
NavValidityType
Definition: NavValidityType.hpp:53
gnsstk::IonoCorr::GAL
@ GAL
Galileo.
Definition: Rinex3NavHeader.hpp:73
gnsstk::Rinex3NavData::OMEGAdot
RNDouble OMEGAdot
Rate of Rt ascension (rad/sec)
Definition: Rinex3NavData.hpp:195
gnsstk::NavSearchOrder
NavSearchOrder
Specify the behavior of nav data searches in NavLibrary/NavDataFactory.
Definition: NavSearchOrder.hpp:51
gnsstk::Rinex3NavData::IODE
RNDouble IODE
Index of data-eph.
Definition: Rinex3NavData.hpp:139
gnsstk::Rinex3NavHeader::validTimeSysCorr
@ validTimeSysCorr
Set if Time System Correction is valid.
Definition: Rinex3NavHeader.hpp:163
gnsstk::Rinex3NavData::dn
RNDouble dn
Correction to mean motion (rad/sec)
Definition: Rinex3NavData.hpp:189
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::NavType::GPSLNAV
@ GPSLNAV
gnsstk::NewNavToRinex::fillDataKepler
static bool fillDataKepler(const std::shared_ptr< OrbitDataKepler > &odk, Rinex3NavData &rnd)
Definition: NewNavToRinex.cpp:597
gnsstk::GPSWeekSecond
Definition: GPSWeekSecond.hpp:56
gnsstk::Rinex3NavData::Crc
RNDouble Crc
Cosine radius (m)
Definition: Rinex3NavData.hpp:179
gnsstk::HealthGetter::getHealth
virtual bool getHealth(const NavSatelliteID &nsid, const CommonTime &when, NavDataPtr &healthOut)
Definition: NewNavToRinex.cpp:669
gnsstk::Rinex3NavData::ageOfInfo
RNDouble ageOfInfo
Age of oper. information (days)
Definition: Rinex3NavData.hpp:149
gnsstk::TrackingCode::E5aI
@ E5aI
Galileo E5a I code.
gnsstk::SatelliteSystem::GPS
@ GPS
gnsstk::TimeSystemCorrection::asString4
std::string asString4() const
Return 4-char string version of CorrType.
Definition: TimeSystemCorr.cpp:270
gnsstk::NavSignalID::obs
ObsID obs
Carrier, tracking code, etc.
Definition: NavSignalID.hpp:95
NewNavToRinex.hpp
gnsstk::Rinex3NavData::PRNID
short PRNID
SV PRN ID.
Definition: Rinex3NavData.hpp:124
gnsstk::Rinex3NavData::datasources
short datasources
Data sources.
Definition: Rinex3NavData.hpp:154
gnsstk::Rinex3NavHeader
Definition: Rinex3NavHeader.hpp:107
gnsstk::Rinex3NavData::vx
RNDouble vx
Definition: Rinex3NavData.hpp:204
gnsstk::Rinex3NavData::codeflgs
short codeflgs
L2 codes.
Definition: Rinex3NavData.hpp:136
gnsstk::NavLibrary
Definition: NavLibrary.hpp:944
gnsstk::Rinex3NavData::freqNum
short freqNum
Frequency number (-7..+12)
Definition: Rinex3NavData.hpp:148
gnsstk::NavValidityType::ValidOnly
@ ValidOnly
Only load/find nav messages that pass validity checks.
gnsstk::IonoCorr::GPSB
@ GPSB
Definition: Rinex3NavHeader.hpp:75
gnsstk::Rinex3NavData::px
RNDouble px
Definition: Rinex3NavData.hpp:203
gnsstk::NavMessageType::Iono
@ Iono
Ionospheric correction data.
gnsstk::Rinex3NavData::MFtime
long MFtime
Message frame time (sec of UTC week) as long.
Definition: Rinex3NavData.hpp:147
gnsstk::Rinex3NavData::af1
RNDouble af1
SV clock drift (sec/sec)
Definition: Rinex3NavData.hpp:169
gnsstk::NewNavToRinex::fillData
static bool fillData(const NavDataPtr &ndp, Rinex3NavData &rnd, HealthGetter &healthGet)
Definition: NewNavToRinex.cpp:220
gnsstk::Rinex3NavHeader::leapDelta
long leapDelta
Change in Leap seconds at ref time.
Definition: Rinex3NavHeader.hpp:191
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::Rinex3NavData::L2Pdata
short L2Pdata
L2 P data flag.
Definition: Rinex3NavData.hpp:137
nl
int nl
Definition: IERS1996NutationData.hpp:44
gnsstk::Rinex3NavData::Tgd
RNDouble Tgd
Group delay diff. (sec) (GPS, BDS:B1/B3 GAL:E5a/E1)
Definition: Rinex3NavData.hpp:171
gnsstk::WeekSecond::sow
double sow
Definition: WeekSecond.hpp:155
gnsstk::TimeSystemCorrection::toTS
TimeSystem toTS
Definition: TimeSystemCorr.hpp:165
gnsstk::NewNavToRinex::fillDataGalINav
static bool fillDataGalINav(const NavDataPtr &ndp, Rinex3NavData &rnd, HealthGetter &healthGet)
Definition: NewNavToRinex.cpp:380
gnsstk::getLegacyFitInterval
short getLegacyFitInterval(const short iodc, const short fiti)
Definition: GNSSconstants.hpp:111
gnsstk::Rinex3NavData::accuracy
RNDouble accuracy
SV accuracy (m)
Definition: Rinex3NavData.hpp:130
gnsstk::ObsID::code
TrackingCode code
Definition: ObsID.hpp:201
example6.valid
valid
Definition: example6.py:20
gnsstk::CarrierBand::L1
@ L1
GPS L1, Galileo E1, SBAS L1, QZSS L1, BeiDou L1.
KlobucharIonoNavData.hpp
gnsstk::IonoCorr::type
CorrType type
type of correction - enum CorrType
Definition: Rinex3NavHeader.hpp:101
gnsstk::Week::week
int week
Full week number.
Definition: Week.hpp:267
gnsstk::Rinex3NavData::pz
RNDouble pz
SV position.
Definition: Rinex3NavData.hpp:203
gnsstk::HealthGetter
Definition: NewNavToRinex.hpp:57
gnsstk::Rinex3NavData::weeknum
short weeknum
Definition: Rinex3NavData.hpp:127
gnsstk::Rinex3NavData::TauN
RNDouble TauN
SV clock bias (sec)
Definition: Rinex3NavData.hpp:144
gnsstk::Rinex3NavData::IODnav
RNDouble IODnav
Index of data-eph.
Definition: Rinex3NavData.hpp:155
gnsstk::NavLibraryHealthGetter::navLib
NavLibrary & navLib
NavLibrary to use for health look-up.
Definition: NewNavToRinex.hpp:88
gnsstk::SatID::system
SatelliteSystem system
System for this satellite.
Definition: SatID.hpp:156
gnsstk::Rinex3NavData::ay
RNDouble ay
Definition: Rinex3NavData.hpp:205
example3.data
data
Definition: example3.py:22
gnsstk::Rinex3NavHeader::leapSeconds
long leapSeconds
Leap seconds.
Definition: Rinex3NavHeader.hpp:190
gnsstk::TimeSystemCorrection::convertTimeSystemToCorrType
static bool convertTimeSystemToCorrType(TimeSystem src, TimeSystem tgt, TimeSystemCorrection::CorrType &ct)
Definition: TimeSystemCorr.cpp:156
gnsstk::NavMessageType::TimeOffset
@ TimeOffset
Message containing information about time system offsets.
gnsstk::Rinex3NavData::af0
RNDouble af0
SV clock error (sec)
Definition: Rinex3NavData.hpp:168
gnsstk::Rinex3NavData::w
RNDouble w
Argument of perigee (rad)
Definition: Rinex3NavData.hpp:194
gnsstk::NewNavToRinex::fillTimeSystemCorrection
static bool fillTimeSystemCorrection(const std::shared_ptr< StdNavTimeOffset > &toffs, TimeSystemCorrection &tsc)
Definition: NewNavToRinex.cpp:644
gnsstk::NavLibraryHealthGetter::xmitHealth
SVHealth xmitHealth
Parameter to NavLibrary::getHealth()
Definition: NewNavToRinex.hpp:89
GPSWeekSecond.hpp
gnsstk::IonoCorr::param
FormattedDouble param[4]
parameters ai0-ai2,0(GAL), alpha0-3 or beta0-3(GPS)
Definition: Rinex3NavHeader.hpp:102
gnsstk::RinexSatID::toString
std::string toString() const noexcept
Definition: RinexSatID.cpp:204
gnsstk::printTime
std::string printTime(const CommonTime &t, const std::string &fmt)
Definition: TimeString.cpp:64
gnsstk::RinexSatID
Definition: RinexSatID.hpp:63
gnsstk::Rinex3NavData::Cus
RNDouble Cus
Sine latitude (rad)
Definition: Rinex3NavData.hpp:178
GalINavEph.hpp
DebugTrace.hpp
std
Definition: Angle.hpp:142
gnsstk::NewNavToRinex::fillDataGPSLNav
static bool fillDataGPSLNav(const NavDataPtr &ndp, Rinex3NavData &rnd)
Definition: NewNavToRinex.cpp:249
gnsstk::SatelliteSystem::Mixed
@ Mixed
gnsstk::TrackingCode::E5bI
@ E5bI
Galileo E5b I code.
gnsstk::NavMessageType::Ephemeris
@ Ephemeris
Precision orbits for the transmitting SV.
GLOFNavEph.hpp
gnsstk::NewNavToRinex::fillDataGalFNav
static bool fillDataGalFNav(const NavDataPtr &ndp, Rinex3NavData &rnd, HealthGetter &healthGet)
Definition: NewNavToRinex.cpp:292
gnsstk::Rinex3NavData::az
RNDouble az
SV acceleration.
Definition: Rinex3NavData.hpp:205
BDSWeekSecond.hpp
gnsstk::IonoCorr::GPSA
@ GPSA
GPS alpha.
Definition: Rinex3NavHeader.hpp:74
gnsstk::NavLibraryHealthGetter::valid
NavValidityType valid
Parameter to NavLibrary::getHealth()
Definition: NewNavToRinex.hpp:90
DEBUGTRACE_FUNCTION
#define DEBUGTRACE_FUNCTION()
Definition: DebugTrace.hpp:117
gnsstk::NavType::BeiDou_D2
@ BeiDou_D2
gnsstk::Rinex3NavData::vy
RNDouble vy
Definition: Rinex3NavData.hpp:204
gnsstk::SatelliteSystem::Glonass
@ Glonass
gnsstk::NavSearchOrder::User
@ User
Return the latest message before the search time.
gnsstk::Rinex3NavHeader::fileSys
std::string fileSys
File system string.
Definition: Rinex3NavHeader.hpp:180
gnsstk::BDSWeekSecond
Definition: BDSWeekSecond.hpp:56
gnsstk::Rinex3NavData::Cis
RNDouble Cis
Sine inclination (rad)
Definition: Rinex3NavData.hpp:182
gnsstk::Rinex3NavData::sat
RinexSatID sat
RinexSatID (from PRNID & satSys)
Definition: Rinex3NavData.hpp:125
gnsstk::Rinex3NavData::xmitTime
long xmitTime
Time of subframe 1-3 (sec of week)
Definition: Rinex3NavData.hpp:126
gnsstk::NewNavToRinex::fillDataBDSD1Nav
static bool fillDataBDSD1Nav(const NavDataPtr &ndp, Rinex3NavData &rnd)
Definition: NewNavToRinex.cpp:458
GPSLNavEph.hpp
gnsstk::NavLibrary::find
bool find(const NavMessageID &nmid, const CommonTime &when, NavDataPtr &navOut, SVHealth xmitHealth, NavValidityType valid, NavSearchOrder order)
Definition: NavLibrary.cpp:390
gnsstk::TimeSystemCorrection::frTS
TimeSystem frTS
Definition: TimeSystemCorr.hpp:165
gnsstk::Rinex3NavData::GammaN
RNDouble GammaN
SV relative frequency bias.
Definition: Rinex3NavData.hpp:145
gnsstk::TimeSystemCorrection::geoProvider
std::string geoProvider
string 'EGNOS' 'WAAS' or 'MSAS'
Definition: TimeSystemCorr.hpp:168
gnsstk::Rinex3NavHeader::mapTimeCorr
std::map< std::string, TimeSystemCorrection > mapTimeCorr
map of label: GAUT, GPUT, etc, and TimeCorr
Definition: Rinex3NavHeader.hpp:187
BDSD1NavEph.hpp
gnsstk::Rinex3NavData::idot
RNDouble idot
Rate of inclination angle (rad/sec)
Definition: Rinex3NavData.hpp:196
gnsstk::Rinex3NavHeader::validIonoCorrGal
@ validIonoCorrGal
Set if Gal Iono Correction data is valid.
Definition: Rinex3NavHeader.hpp:162
gnsstk::NewNavToRinex::fillDataBDSD2Nav
static bool fillDataBDSD2Nav(const NavDataPtr &ndp, Rinex3NavData &rnd)
Definition: NewNavToRinex.cpp:506
TimeString.hpp
gnsstk::SatelliteSystem::Galileo
@ Galileo
gnsstk::RinexSatID::systemChar
char systemChar() const noexcept
Definition: RinexSatID.cpp:62
gnsstk::NewNavToRinex::fillHeader
static bool fillHeader(const NavDataPtr &ndp, Rinex3NavHeader &h)
Definition: NewNavToRinex.cpp:131
gnsstk::Rinex3NavData::M0
RNDouble M0
Mean anomaly (rad)
Definition: Rinex3NavData.hpp:188
gnsstk::NavType::GalFNAV
@ GalFNAV
gnsstk::CarrierBand::L5
@ L5
GPS L5, Galileo E5a, SBAS L5, QZSS L5, BeiDou B2a, NavIC L5.
RinexNavDataFactory.hpp
gnsstk::Rinex3NavHeader::leapDay
long leapDay
Day of week of ref time.
Definition: Rinex3NavHeader.hpp:193


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40