RinexNavDataFactory.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 //
28 // This software was developed by Applied Research Laboratories at the
29 // University of Texas at Austin, under contract to an agency or agencies
30 // within the U.S. Department of Defense. The U.S. Government retains all
31 // rights to use, duplicate, distribute, disclose, or release this software.
32 //
33 // Pursuant to DoD Directive 523024
34 //
35 // DISTRIBUTION STATEMENT A: This software has been approved for public
36 // release, distribution is unlimited.
37 //
38 //==============================================================================
39 #include "RinexNavDataFactory.hpp"
40 #include "Rinex3NavStream.hpp"
41 #include "Rinex3NavHeader.hpp"
42 #include "GPSLNavHealth.hpp"
43 #include "GPSLNavIono.hpp"
44 #include "GPSLNavISC.hpp"
45 #include "GalINavEph.hpp"
46 #include "GalINavIono.hpp"
47 #include "GalINavISC.hpp"
48 #include "GalFNavEph.hpp"
49 #include "GalINavHealth.hpp"
50 #include "GalFNavHealth.hpp"
51 #include "BDSD1NavEph.hpp"
52 #include "BDSD1NavHealth.hpp"
53 #include "BDSD1NavIono.hpp"
54 #include "BDSD1NavISC.hpp"
55 #include "BDSD2NavEph.hpp"
56 #include "BDSD2NavHealth.hpp"
57 #include "BDSD2NavISC.hpp"
58 #include "BDSWeekSecond.hpp"
59 #include "GLOFNavEph.hpp"
60 #include "GLOFNavHealth.hpp"
61 #include "GLOFNavISC.hpp"
62 #include "RinexTimeOffset.hpp"
63 #include "TimeString.hpp"
65 
66 using namespace std;
67 
68 static const std::string dts("%Y/%03j/%02H:%02M:%02S %P");
69 
70 namespace gnsstk
71 {
72  RinexNavDataFactory ::
73  RinexNavDataFactory()
74  {
75  supportedSignals.insert(NavSignalID(SatelliteSystem::GPS,
77  TrackingCode::CA,
78  NavType::GPSLNAV));
79  supportedSignals.insert(NavSignalID(SatelliteSystem::QZSS,
81  TrackingCode::CA,
82  NavType::GPSLNAV));
83  supportedSignals.insert(NavSignalID(SatelliteSystem::Galileo,
85  TrackingCode::E1B,
86  NavType::GalINAV));
87  supportedSignals.insert(NavSignalID(SatelliteSystem::Galileo,
88  CarrierBand::E5b,
89  TrackingCode::E5bI,
90  NavType::GalINAV));
91  supportedSignals.insert(NavSignalID(SatelliteSystem::Galileo,
92  CarrierBand::L5,
93  TrackingCode::E5aI,
94  NavType::GalFNAV));
95  supportedSignals.insert(NavSignalID(SatelliteSystem::BeiDou,
96  CarrierBand::B1,
97  TrackingCode::B1I,
98  NavType::BeiDou_D1));
99  supportedSignals.insert(NavSignalID(SatelliteSystem::BeiDou,
100  CarrierBand::B1,
101  TrackingCode::B1I,
102  NavType::BeiDou_D2));
103  }
104 
105 
106  bool RinexNavDataFactory ::
107  loadIntoMap(const std::string& filename, NavMessageMap& navMap,
108  NavNearMessageMap& navNearMap, OffsetCvtMap& ofsMap)
109  {
110  gnsstk::NavDataFactoryStoreCallback cb(this, navMap, navNearMap, ofsMap);
111  return process(filename, cb);
112  }
113 
114 
115  bool RinexNavDataFactory ::
116  process(const std::string& filename,
118  {
119  bool rv = true;
120  bool processEph = (procNavTypes.count(NavMessageType::Ephemeris) > 0);
121  bool processHea = (procNavTypes.count(NavMessageType::Health) > 0);
122  bool processTim = (procNavTypes.count(NavMessageType::TimeOffset) > 0);
123  bool processIono = (procNavTypes.count(NavMessageType::Iono) > 0);
124  bool processISC = (procNavTypes.count(NavMessageType::ISC) > 0);
125  bool ionoProcessed = false;
126  // check the validity
127  bool check = false;
128  bool expect = false;
129  switch (navValidity)
130  {
131  case NavValidityType::ValidOnly:
132  check = true;
133  expect = true;
134  break;
135  case NavValidityType::InvalidOnly:
136  check = true;
137  expect = false;
138  break;
139  // Just treat everything else like All, which is to
140  // say, no checks.
141  default:
142  break;
143  }
144  try
145  {
146  Rinex3NavStream is(filename.c_str(), ios::in);
147  Rinex3NavHeader head;
149  if (!is)
150  return false;
151  is >> head;
152  if (processTim)
153  {
154  // time offset information only exists in RINEX headers.
156  NavDataPtrList navOut;
157  if (!convertToOffset(head, navOut))
158  {
159  return false;
160  }
161  for (auto& i : navOut)
162  {
163  if (check)
164  {
165  if (i->validate() == expect)
166  {
167  if (!cb.process(i))
168  return false;
169  }
170  }
171  else
172  {
173  if (!cb.process(i))
174  return false;
175  }
176  }
177  }
178  if (!is)
179  return false;
180  while (is)
181  {
182  is >> data;
183  if (processIono && !ionoProcessed)
184  {
185  // We have to delay processing of iono data until we
186  // get a data record with a timestamp so we can have
187  // some sort of reasonable time stamp on the iono
188  // data.
189  ionoProcessed = true;
190  NavDataPtrList ionoList;
191  // iono correction information only exists in RINEX headers.
193  if (!convertToIono(data.time, head, ionoList))
194  {
195  return false;
196  }
197  for (auto& i : ionoList)
198  {
199  if (check)
200  {
201  if (i->validate() == expect)
202  {
203  if (!cb.process(i))
204  return false;
205  }
206  }
207  else
208  {
209  if (!cb.process(i))
210  return false;
211  }
212  }
213  }
214  if (!is)
215  {
216  if (is.eof())
217  break;
218  else
219  return false; // some other error
220  }
221  NavDataPtr eph, isc;
222  NavDataPtrList health;
223  if (processEph)
224  {
225  if (!convertToOrbit(data, eph))
226  return false;
227  }
228  if (processHea)
229  {
230  if (!convertToHealth(data, health))
231  return false;
232  }
233  if (processISC)
234  {
235  if (!convertToISC(data, isc))
236  return false;
237  }
238  if (check)
239  {
240  if (processEph)
241  {
242  if (eph->validate() == expect)
243  {
244  if (!cb.process(eph))
245  return false;
246  }
247  }
248  if (processHea)
249  {
250  for (const auto& hp : health)
251  {
252  if (hp->validate() == expect)
253  {
254  if (!cb.process(hp))
255  return false;
256  }
257  }
258  }
259  if (processISC && (isc != nullptr))
260  {
261  if (isc->validate() == expect)
262  {
263  if (!cb.process(isc))
264  return false;
265  }
266  }
267  }
268  else
269  {
270  if (processEph)
271  {
272  if (!cb.process(eph))
273  return false;
274  }
275  if (processHea)
276  {
277  for (const auto& hp : health)
278  {
279  if (!cb.process(hp))
280  return false;
281  }
282  }
283  if (processISC && (isc != nullptr))
284  {
285  if (!cb.process(isc))
286  return false;
287  }
288  }
289  }
290  }
291  catch (gnsstk::Exception& exc)
292  {
293  rv = false;
294  cerr << exc << endl;
295  }
296  catch (std::exception& exc)
297  {
298  rv = false;
299  cerr << exc.what() << endl;
300  }
301  catch (...)
302  {
303  rv = false;
304  cerr << "Unknown exception" << endl;
305  }
306  return rv;
307  }
308 
309 
310  std::string RinexNavDataFactory ::
311  getFactoryFormats() const
312  {
313  if (procNavTypes.empty() ||
314  (procNavTypes.count(NavMessageType::Ephemeris) > 0) ||
315  (procNavTypes.count(NavMessageType::Health) > 0) ||
316  (procNavTypes.count(NavMessageType::Iono) > 0) ||
317  (procNavTypes.count(NavMessageType::TimeOffset) > 0))
318  {
319  return "RINEX2, RINEX3";
320  }
321  return "";
322  }
323 
324 
325  bool RinexNavDataFactory ::
326  convertToOrbit(const Rinex3NavData& navIn, NavDataPtr& navOut)
327  {
328  bool rv = true;
329  GPSLNavEph *gps;
330  GalINavEph *galINav;
331  GalFNavEph *galFNav;
332  BDSD1NavEph *bdsD1Nav;
333  BDSD2NavEph *bdsD2Nav;
334  GLOFNavEph *glo;
335  switch (navIn.sat.system)
336  {
337  case SatelliteSystem::GPS:
338  case SatelliteSystem::QZSS:
339  navOut = std::make_shared<GPSLNavEph>();
340  gps = dynamic_cast<GPSLNavEph*>(navOut.get());
341  // NavData
342  fillNavData(navIn, navOut);
343  // OrbitDataKepler
344  fixTimeGPS(navIn, *gps);
345  gps->health = ((navIn.health == 0) ? SVHealth::Healthy :
346  SVHealth::Unhealthy);
347  convertToOrbitDataKepler(navIn, gps);
348  // tlm not available in RINEX NAV
349  // GPSLNavEph
350  gps->iodc = navIn.IODC;
351  gps->iode = navIn.IODE;
352  gps->fitIntFlag = (navIn.fitint <= 4 ? 0 : 1);
353  gps->healthBits = navIn.health;
354  gps->uraIndex = accuracy2ura(navIn.accuracy);
355  gps->tgd = navIn.Tgd;
356  // We don't have the A-S flag in rinex nav, so just
357  // assume it's on for GPS and off for QZSS, as it more
358  // than likely is. Also assume alert is off. Maybe at
359  // some future point the data and dump method will be
360  // changed to know that the data is an unknown value.
361  if (navIn.sat.system == SatelliteSystem::GPS)
362  {
363  gps->asFlag = gps->asFlag2 = gps->asFlag3 = true;
364  }
365  else
366  {
367  gps->asFlag = gps->asFlag2 = gps->asFlag3 = false;
368  }
369  gps->alert = gps->alert2 = gps->alert3 = false;
370  gps->codesL2 = (GPSLNavL2Codes)navIn.codeflgs;
371  gps->L2Pdata = (navIn.L2Pdata > 0);
372  gps->fixFit();
373  break;
374  case SatelliteSystem::Galileo:
375  if (((navIn.datasources & 0x01) == 0x01) ||
376  ((navIn.datasources & 0x04) == 0x04))
377  {
378  navOut = std::make_shared<GalINavEph>();
379  galINav = dynamic_cast<GalINavEph*>(navOut.get());
380  // NavData
381  fillNavData(navIn, navOut);
382  // OrbitDataKepler
383  fixTimeGalileo(navIn, *galINav);
384  // RINEX 3.04 Table A8 note 4 says the GAL week number
385  // is identical to the GPS week number. ergo, it's not
386  // really a Galileo week number.
387  galINav->Toe = GPSWeekSecond(navIn.weeknum, navIn.Toe);
388  //galINav->Toe.setTimeSystem(TimeSystem::GAL);
389  convertToOrbitDataKepler(navIn, galINav);
390  galINav->bgdE5aE1 = navIn.Tgd;
391  galINav->bgdE5bE1 = navIn.Tgd2;
392  galINav->sisaIndex = decodeSISA(navIn.accuracy);
393  galINav->svid = navIn.sat.id;
394  galINav->xmit2 = galINav->xmitTime + galINav->msgLenSec;
395  galINav->xmit3 = galINav->xmit2 + galINav->msgLenSec;
396  galINav->xmit4 = galINav->xmit3 + galINav->msgLenSec;
397  galINav->xmit5 = galINav->xmit4 + galINav->msgLenSec;
398  galINav->iodnav1 = galINav->iodnav2 = galINav->iodnav3 =
399  galINav->iodnav4 = navIn.IODnav;
400  galINav->dvsE1B = static_cast<GalDataValid>(
401  navIn.health & 0x01);
402  galINav->hsE1B = static_cast<GalHealthStatus>(
403  (navIn.health >> 1) & 0x03);
408  galINav->dvsE5b = static_cast<GalDataValid>(
409  (navIn.health >> 6) & 0x01);
410  galINav->hsE5b = static_cast<GalHealthStatus>(
411  (navIn.health >> 7) & 0x03);
414  if ((navIn.datasources & 0x01) == 0x01)
415  {
416  galINav->health = GalINavHealth::galHealth(
417  galINav->hsE1B, galINav->dvsE1B, galINav->sisaIndex);
418  }
419  else
420  {
421  galINav->health = GalINavHealth::galHealth(
422  galINav->hsE5b, galINav->dvsE5b, galINav->sisaIndex);
423  }
424  galINav->fixFit();
425  }
426  else if (navIn.datasources & 0x02)
427  {
428  navOut = std::make_shared<GalFNavEph>();
429  galFNav = dynamic_cast<GalFNavEph*>(navOut.get());
430  // NavData
431  fillNavData(navIn, navOut);
432  // OrbitDataKepler
433  fixTimeGalileo(navIn, *galFNav);
434  // RINEX 3.04 Table A8 note 4 says the GAL week number
435  // is identical to the GPS week number. ergo, it's not
436  // really a Galileo week number.
437  galFNav->Toe = GPSWeekSecond(navIn.weeknum, navIn.Toe);
438  //galFNav->Toe.setTimeSystem(TimeSystem::GAL);
440  // galFNav->health = ((navIn.health == 0) ? SVHealth::Healthy :
441  // SVHealth::Unhealthy);
442  convertToOrbitDataKepler(navIn, galFNav);
443  galFNav->bgdE5aE1 = navIn.Tgd;
444  galFNav->sisaIndex = decodeSISA(navIn.accuracy);
445  galFNav->svid = navIn.sat.id;
446  galFNav->xmit2 = galFNav->xmitTime + galFNav->msgLenSec;
447  galFNav->xmit3 = galFNav->xmit2 + galFNav->msgLenSec;
448  galFNav->xmit4 = galFNav->xmit3 + galFNav->msgLenSec;
449  galFNav->iodnav1 = galFNav->iodnav2 = galFNav->iodnav3 =
450  galFNav->iodnav4 = navIn.IODnav;
455  galFNav->dvsE5a = static_cast<GalDataValid>(
456  (navIn.health >> 3) & 0x01);
457  galFNav->hsE5a = static_cast<GalHealthStatus>(
458  (navIn.health >> 4) & 0x03);
459  galFNav->health = GalINavHealth::galHealth(
460  galFNav->hsE5a, galFNav->dvsE5a, galFNav->sisaIndex);
461  galFNav->fixFit();
462  }
463  else
464  {
465  // don't know what to do with this.
466  rv = false;
467  }
468  break;
469  case SatelliteSystem::BeiDou:
470  if (isBeiDouGEO(navIn.sat))
471  {
472  navOut = std::make_shared<BDSD2NavEph>();
473  bdsD2Nav = dynamic_cast<BDSD2NavEph*>(navOut.get());
474  // NavData
475  fillNavData(navIn, navOut);
476  // OrbitDataKepler
477  fixTimeBeiDou(navIn, *bdsD2Nav);
478  bdsD2Nav->Toe = BDSWeekSecond(navIn.weeknum, navIn.Toe);
479  bdsD2Nav->health = ((navIn.health == 0) ? SVHealth::Healthy :
480  SVHealth::Unhealthy);
481  convertToOrbitDataKepler(navIn, bdsD2Nav);
482  // BDSD2NavEph
483  bdsD2Nav->satH1 = navIn.health;
484  bdsD2Nav->aodc = navIn.IODC;
485  bdsD2Nav->aode = navIn.IODE;
486  // Table 5-4 of ICD-B1I-v3.0 is the same as what GPS uses
487  if (navIn.accuracy > 6144)
488  {
489  bdsD2Nav->uraIndex = 15;
490  }
491  else
492  {
493  bdsD2Nav->uraIndex = accuracy2ura(navIn.accuracy);
494  }
495  bdsD2Nav->sow = BDSWeekSecond(bdsD2Nav->xmitTime).sow;
496  bdsD2Nav->tgd1 = navIn.Tgd;
497  bdsD2Nav->tgd2 = navIn.Tgd2;
498  bdsD2Nav->fixFit();
499  }
500  else
501  {
502  navOut = std::make_shared<BDSD1NavEph>();
503  bdsD1Nav = dynamic_cast<BDSD1NavEph*>(navOut.get());
504  // NavData
505  fillNavData(navIn, navOut);
506  // OrbitDataKepler
507  fixTimeBeiDou(navIn, *bdsD1Nav);
508  bdsD1Nav->Toe = BDSWeekSecond(navIn.weeknum, navIn.Toe);
509  bdsD1Nav->health = ((navIn.health == 0) ? SVHealth::Healthy :
510  SVHealth::Unhealthy);
511  convertToOrbitDataKepler(navIn, bdsD1Nav);
512  // BDSD1NavEph
513  bdsD1Nav->satH1 = navIn.health;
514  bdsD1Nav->aodc = navIn.IODC;
515  bdsD1Nav->aode = navIn.IODE;
516  // Table 5-4 of ICD-B1I-v3.0 is the same as what GPS uses
517  if (navIn.accuracy > 6144)
518  {
519  bdsD1Nav->uraIndex = 15;
520  }
521  else
522  {
523  bdsD1Nav->uraIndex = accuracy2ura(navIn.accuracy);
524  }
525  bdsD1Nav->xmit2 = bdsD1Nav->xmitTime + bdsD1Nav->msgLenSec;
526  bdsD1Nav->xmit3 = bdsD1Nav->xmit2 + bdsD1Nav->msgLenSec;
527  bdsD1Nav->sow = BDSWeekSecond(bdsD1Nav->xmitTime).sow;
528  bdsD1Nav->sow2 = BDSWeekSecond(bdsD1Nav->xmit2).sow;
529  bdsD1Nav->sow3 = BDSWeekSecond(bdsD1Nav->xmit3).sow;
530  bdsD1Nav->tgd1 = navIn.Tgd;
531  bdsD1Nav->tgd2 = navIn.Tgd2;
532  bdsD1Nav->fixFit();
533  }
534  break;
535  case SatelliteSystem::Glonass:
536  navOut = std::make_shared<GLOFNavEph>();
537  glo = dynamic_cast<GLOFNavEph*>(navOut.get());
538  // NavData
539  fillNavData(navIn, navOut);
540  // GLOFNavData
541  //glo->satType not in RINEX, default to unknown
542  glo->slot = navIn.PRNID;
543  // The l_n health bits are absent from RINEX, set to
544  // healthy so the determination of health is only
545  // related to B_n.
546  glo->lhealth = false;
547  glo->health= navIn.health ? SVHealth::Unhealthy : SVHealth::Healthy;
548  // GLOFNavEph
549  glo->ref = glo->timeStamp;
550  // Set transmit time stamps to a best-guess, as they
551  // are needed for getUserTime().
552  glo->xmit2 = glo->ref + 2.0;
553  glo->xmit3 = glo->ref + 4.0;
554  glo->xmit4 = glo->ref + 6.0;
555  glo->pos[0] = navIn.px;
556  glo->pos[1] = navIn.py;
557  glo->pos[2] = navIn.pz;
558  glo->vel[0] = navIn.vx;
559  glo->vel[1] = navIn.vy;
560  glo->vel[2] = navIn.vz;
561  glo->acc[0] = navIn.ax;
562  glo->acc[1] = navIn.ay;
563  glo->acc[2] = navIn.az;
564  glo->clkBias = -navIn.TauN;
565  glo->freqBias = navIn.GammaN;
566  glo->healthBits = navIn.health << 2;
567  //glo->tb not in RINEX. Used to compute Toe which is given
568  //glo->P1 not in RINEX. Used to determine interval.
569  //glo->P2 not in RINEX
570  //glo->P3 not in RINEX
571  //glo->P4 not in RINEX
572  // interval is not in RINEX. It's used to compute Toe
573  // which is given, but it's also used in computing the
574  // fit interval. We set it to 0 which is the narrowest
575  // fit interval we can use. This could lead to gaps in
576  // position solutions, but I'm not sure how best to
577  // handle this.
578  glo->interval = 0;
579  //glo->opStatus not in RINEX, default to Unknown
580  //glo->tauDelta not in RINEX, default to NaN
581  glo->aod = navIn.ageOfInfo;
582  //glo->accIndex not in RINEX
583  //glo->dayCount not in RINEX
584  glo->Toe = navIn.time;
585  //glo->step is algorithm configuration
586  glo->fixFit();
587  break;
588  default:
590  rv = false;
591  break;
592  }
593  return rv;
594  }
595 
596 
597  void RinexNavDataFactory ::
598  convertToOrbitDataKepler(const Rinex3NavData& navIn, OrbitDataKepler* navOut)
599  {
600  // OrbitDataKepler
601  navOut->Toc = navIn.time;
602  // navOut->health is signal-specific
603  navOut->Cuc = navIn.Cuc;
604  navOut->Cus = navIn.Cus;
605  navOut->Crc = navIn.Crc;
606  navOut->Crs = navIn.Crs;
607  navOut->Cic = navIn.Cic;
608  navOut->Cis = navIn.Cis;
609  navOut->M0 = navIn.M0;
610  navOut->dn = navIn.dn;
611  // no dndot in RINEX 3
612  navOut->ecc = navIn.ecc;
613  navOut->Ahalf = navIn.Ahalf;
614  navOut->A = navIn.Ahalf * navIn.Ahalf;
615  // no Adot in RINEX 3
616  navOut->OMEGA0 = navIn.OMEGA0;
617  navOut->i0 = navIn.i0;
618  navOut->w = navIn.w;
619  navOut->OMEGAdot = navIn.OMEGAdot;
620  navOut->idot = navIn.idot;
621  navOut->af0 = navIn.af0;
622  navOut->af1 = navIn.af1;
623  navOut->af2 = navIn.af2;
624  }
625 
626 
627  bool RinexNavDataFactory ::
628  convertToHealth(const Rinex3NavData& navIn,
629  NavDataPtrList& healthOut)
630  {
631  bool rv = true;
632  gnsstk::NavDataPtr health;
633  GPSLNavHealth *gps;
634  GalINavHealth *galNav;
635  BDSD1NavHealth *bdsD1Nav;
636  BDSD2NavHealth *bdsD2Nav;
637  GLOFNavHealth *glo;
638  unsigned healthBits = 0;
639  switch (navIn.sat.system)
640  {
641  case SatelliteSystem::GPS:
642  case SatelliteSystem::QZSS:
643  health = std::make_shared<GPSLNavHealth>();
644  gps = dynamic_cast<GPSLNavHealth*>(health.get());
645  // NavData
646  fillNavData(navIn, health);
647  // GPSLNavHealth
648  gps->svHealth = navIn.health;
649  healthOut.push_back(health);
650  break;
651  case SatelliteSystem::Galileo:
652  DEBUGTRACE("Galileo health conversion, health=" << navIn.health);
653  DEBUGTRACE("E1B DVS=" << (navIn.health & 0x01));
654  DEBUGTRACE("E1B HS =" << ((navIn.health >> 1) & 0x03));
655  DEBUGTRACE("E5a DVS=" << ((navIn.health >> 3) & 0x01));
656  DEBUGTRACE("E5a HS =" << ((navIn.health >> 4) & 0x03));
657  DEBUGTRACE("E5b DVS=" << ((navIn.health >> 6) & 0x01));
658  DEBUGTRACE("E5b HS =" << ((navIn.health >> 7) & 0x03));
659  convertToHealthE1B(navIn, healthOut);
660  convertToHealthE5a(navIn, healthOut);
661  convertToHealthE5b(navIn, healthOut);
662  break;
663  case SatelliteSystem::BeiDou:
664  if (isBeiDouGEO(navIn.sat))
665  {
666  health = std::make_shared<BDSD2NavHealth>();
667  bdsD2Nav = dynamic_cast<BDSD2NavHealth*>(health.get());
668  // NavData
669  fillNavData(navIn, health);
670  // BDSD2NavHealth
671  bdsD2Nav->isAlmHealth = false;
672  bdsD2Nav->satH1 = navIn.health;
673  healthOut.push_back(health);
674  }
675  else
676  {
677  health = std::make_shared<BDSD1NavHealth>();
678  bdsD1Nav = dynamic_cast<BDSD1NavHealth*>(health.get());
679  // NavData
680  fillNavData(navIn, health);
681  // BDSD1NavHealth
682  bdsD1Nav->isAlmHealth = false;
683  bdsD1Nav->satH1 = navIn.health;
684  healthOut.push_back(health);
685  }
686  break;
687  case SatelliteSystem::Glonass:
688  health = std::make_shared<GLOFNavHealth>();
689  glo = dynamic_cast<GLOFNavHealth*>(health.get());
690  // NavData
691  fillNavData(navIn, health);
692  // GLOFNavHealth
693  glo->healthBits = navIn.health << 2;
694  healthOut.push_back(health);
695  break;
696  default:
698  rv = false;
699  break;
700  }
701  return rv;
702  }
703 
704 
705  void RinexNavDataFactory ::
706  convertToHealthE1B(const Rinex3NavData& navIn,
707  NavDataPtrList& healthOut)
708  {
709  // Make an I/NAV health for E1B if it's selected as a data
710  // source, or if neither of the I/NAV signals are selected as
711  // a data source (i.e. in the case where the ephemeris
712  // originated from F/NAV but we still have the I/NAV signal
713  // health info).
715  DEBUGTRACE("E1B=" << (navIn.datasources & 0x01)
716  << " E5a=" << (navIn.datasources & 0x02)
717  << " E5b=" << (navIn.datasources & 0x04));
718  if ((navIn.datasources & 0x01) ||
719  ((navIn.datasources & 0x04) == 0))
720  {
721  NavDataPtr health = std::make_shared<GalINavHealth>();
722  GalINavHealth *galNav = dynamic_cast<GalINavHealth*>(health.get());
723  // NavData
724  fillNavData(navIn, health);
725  // GalINavHealth
726  // start with original health bits from RINEX, decode and shift.
727  galNav->dataValidityStatus = static_cast<GalDataValid>(
728  navIn.health & 0x01);
729  galNav->sigHealthStatus = static_cast<GalHealthStatus>(
730  (navIn.health >> 1) & 0x03);
731  galNav->signal.obs.band = CarrierBand::L1;
732  galNav->signal.obs.code = TrackingCode::E1B;
733  galNav->signal.nav = NavType::GalINAV;
737  DEBUGTRACE("added E1B health");
738  healthOut.push_back(health);
739  }
740  }
741 
742 
743  void RinexNavDataFactory ::
744  convertToHealthE5a(const Rinex3NavData& navIn,
745  NavDataPtrList& healthOut)
746  {
748  // Always output F/NAV health.
749  NavDataPtr health = std::make_shared<GalFNavHealth>();
750  GalFNavHealth *galNav = dynamic_cast<GalFNavHealth*>(health.get());
751  // NavData
752  fillNavData(navIn, health);
753  // GalFNavHealth
754  // start with original health bits from RINEX, decode and shift.
755  galNav->dataValidityStatus = static_cast<GalDataValid>(
756  (navIn.health >> 3) & 0x01);
757  galNav->sigHealthStatus = static_cast<GalHealthStatus>(
758  (navIn.health >> 4) & 0x03);
759  galNav->signal.obs.band = CarrierBand::L5;
760  galNav->signal.obs.code = TrackingCode::E5aI;
761  galNav->signal.nav = NavType::GalFNAV;
762  // check if SISA (accuracy) is for E5a
763  if (navIn.datasources & 0x0100)
764  {
765  // The current implementation of Rinex3NavData
766  // doesn't do detailed conversion from accuracy to
767  // SISA index.
768  galNav->sisaIndex = decodeSISA(navIn.accuracy);
769  }
770  DEBUGTRACE("signal=" << health->signal);
771  DEBUGTRACE("added E5a health");
772  healthOut.push_back(health);
773  }
774 
775 
776  void RinexNavDataFactory ::
777  convertToHealthE5b(const Rinex3NavData& navIn,
778  NavDataPtrList& healthOut)
779  {
781  if (navIn.datasources & 0x04)
782  {
783  NavDataPtr health = std::make_shared<GalINavHealth>();
784  GalINavHealth *galNav = dynamic_cast<GalINavHealth*>(health.get());
785  // NavData
786  fillNavData(navIn, health);
787  // GalINavHealth
788  // start with original health bits from RINEX, decode and shift.
789  galNav->dataValidityStatus = static_cast<GalDataValid>(
790  (navIn.health >> 6) & 0x01);
791  galNav->sigHealthStatus = static_cast<GalHealthStatus>(
792  (navIn.health >> 7) & 0x03);
793  galNav->signal.obs.band = CarrierBand::L5;
794  galNav->signal.obs.code = TrackingCode::E5bI;
795  galNav->signal.nav = NavType::GalINAV;
796  // check if SISA (accuracy) is for E5b
797  if (navIn.datasources & 0x0200)
798  {
799  // The current implementation of Rinex3NavData
800  // doesn't do detailed conversion from accuracy to
801  // SISA index.
802  galNav->sisaIndex = decodeSISA(navIn.accuracy);
803  }
804  DEBUGTRACE("added E5b health");
805  healthOut.push_back(health);
806  }
807  }
808 
809 
810  bool RinexNavDataFactory ::
811  convertToOffset(const Rinex3NavHeader& navIn, NavDataPtrList& navOut)
812  {
813  for (const auto& mti : navIn.mapTimeCorr)
814  {
815  std::shared_ptr<RinexTimeOffset> rto =
816  std::make_shared<RinexTimeOffset>(mti.second, navIn.leapSeconds);
817  // We have no idea what the signal was, but that doesn't
818  // matter for TimeOffset.
819  // We use the reference time as our timeStamp because we
820  // have nothing else available.
825  rto->timeStamp = mti.second.refTime;
826  // Kludge because RINEX. Makes sure the RINEX time
827  // offsets are in different map entries in
828  // navMap/navNearMap, without which exceptions would be
829  // thrown because of time system mismatches.
830  switch (rto->timeStamp.getTimeSystem())
831  {
832  case TimeSystem::GPS:
833  rto->signal.system = SatelliteSystem::GPS;
834  break;
835  case TimeSystem::GLO:
836  rto->signal.system = SatelliteSystem::Glonass;
837  break;
838  case TimeSystem::GAL:
839  rto->signal.system = SatelliteSystem::Galileo;
840  break;
841  case TimeSystem::QZS:
842  rto->signal.system = SatelliteSystem::QZSS;
843  break;
844  case TimeSystem::BDT:
845  rto->signal.system = SatelliteSystem::BeiDou;
846  break;
847  case TimeSystem::IRN:
848  rto->signal.system = SatelliteSystem::IRNSS;
849  break;
850  default:
851  rto->signal.system = SatelliteSystem::Unknown;
852  break;
853  }
854  navOut.push_back(rto);
855  }
856  return true;
857  }
858 
859 
860  bool RinexNavDataFactory ::
861  convertToIono(const CommonTime& when, const Rinex3NavHeader& navIn,
862  NavDataPtrList& navOut)
863  {
864  std::map<std::string,IonoCorr>::const_iterator ai, bi;
865  if (((ai = navIn.mapIonoCorr.find("GPSA")) != navIn.mapIonoCorr.end()) &&
866  ((bi = navIn.mapIonoCorr.find("GPSB")) != navIn.mapIonoCorr.end()))
867  {
868  // we have the GPS alpha and beta terms.
869  std::shared_ptr<GPSLNavIono> iono(std::make_shared<GPSLNavIono>());
870  iono->timeStamp = when;
871  // We don't know the satellite ID from which the iono data
872  // came from so just set it to 0. If someone is using the
873  // NavLibrary interface for looking up iono data, this
874  // will be irrelevant anyway.
875  iono->signal.sat.id = 0;
876  iono->signal.sat.system = SatelliteSystem::GPS;
877  iono->signal.xmitSat.id = 0;
878  iono->signal.xmitSat.system = SatelliteSystem::GPS;
879  iono->signal.system = SatelliteSystem::GPS;
880  // we can't obtain these from RINEX NAV, so just assume L1 C/A
881  iono->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::L1,
882  TrackingCode::CA);
883  iono->signal.nav = NavType::GPSLNAV;
884  for (unsigned i = 0; i < 4; i++)
885  {
886  iono->alpha[i] = ai->second.param[i];
887  iono->beta[i] = bi->second.param[i];
888  }
889  navOut.push_back(iono);
890  // THIS IS A KLUDGE
891  // RINEX doesn't identify the source of the ionospheric
892  // data in the header, and as such we set the satellite ID
893  // to 0 as noted above. This presents additional problems
894  // as the NavLibrary::getIonoCorr method specifically
895  // looks for iono data from healthy satellites, so we have
896  // to make the invalid assumption that the iono data in
897  // the RINEX header came from a healthy satellite, and
898  // stuff a fake satellite 0 health record in the data.
899  std::shared_ptr<GPSLNavHealth> health(
900  std::make_shared<GPSLNavHealth>());
901  // NavData
902  // further kludge to set fake health time stamp to beginning of day
903  YDSTime bod(when);
904  bod.sod = 0;
905  health->timeStamp = bod;
906  health->signal.sat.id = 0;
907  health->signal.sat.system = SatelliteSystem::GPS;
908  health->signal.xmitSat.id = 0;
909  health->signal.xmitSat.system = SatelliteSystem::GPS;
910  health->signal.system = SatelliteSystem::GPS;
911  // we can't obtain these from RINEX NAV, so just assume L1 C/A
912  health->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::L1,
913  TrackingCode::CA);
914  health->signal.nav = NavType::GPSLNAV;
915  // GPSLNavHealth
916  health->svHealth = 0; // force "PRN 0" to be healthy
917  navOut.push_back(health);
918  }
919  if ((ai = navIn.mapIonoCorr.find("GAL")) != navIn.mapIonoCorr.end())
920  {
921  // we have the Galileo (NeQuickG) ai terms.
927  std::shared_ptr<GalINavIono> iono(std::make_shared<GalINavIono>());
928  iono->timeStamp = when;
929  // We don't know the satellite ID from which the iono data
930  // came from so just set it to 0. If someone is using the
931  // NavLibrary interface for looking up iono data, this
932  // will be irrelevant anyway.
933  iono->signal.sat.id = 0;
934  iono->signal.sat.system = SatelliteSystem::Galileo;
935  iono->signal.xmitSat.id = 0;
936  iono->signal.xmitSat.system = SatelliteSystem::Galileo;
937  iono->signal.system = SatelliteSystem::Galileo;
938  // we can't obtain these from RINEX NAV, so just assume L1 E1B
939  iono->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::L1,
940  TrackingCode::E1B);
941  iono->signal.nav = NavType::GalINAV;
942  for (unsigned i = 0; i < 3; i++)
943  {
944  iono->ai[i] = ai->second.param[i];
945  }
946  navOut.push_back(iono);
947  // THIS IS A KLUDGE, see full explanation in GPS section
948  std::shared_ptr<GalINavHealth> health(
949  std::make_shared<GalINavHealth>());
950  // NavData
951  // further kludge to set fake health time stamp to beginning of day
952  YDSTime bod(when);
953  bod.sod = 0;
954  health->timeStamp = bod;
955  health->signal.sat.id = 0;
956  health->signal.sat.system = SatelliteSystem::Galileo;
957  health->signal.xmitSat.id = 0;
958  health->signal.xmitSat.system = SatelliteSystem::Galileo;
959  health->signal.system = SatelliteSystem::Galileo;
960  // we can't obtain these from RINEX NAV, so just assume L1 E1B
961  health->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::L1,
962  TrackingCode::E1B);
963  health->signal.nav = NavType::GalINAV;
964  // GalINavHealth
965  // force "PRN 0" to be healthy
966  health->sigHealthStatus = GalHealthStatus::OK;
967  health->dataValidityStatus = GalDataValid::Valid;
968  health->sisaIndex = 0;
969  navOut.push_back(health);
970  }
971  if (((ai = navIn.mapIonoCorr.find("BDSA")) != navIn.mapIonoCorr.end()) &&
972  ((bi = navIn.mapIonoCorr.find("BDSB")) != navIn.mapIonoCorr.end()))
973  {
974  // we have the BDS alpha and beta terms.
975  // we *don't* have any idea if these came from D1 or D2, so assume.
976  std::shared_ptr<BDSD1NavIono> iono(std::make_shared<BDSD1NavIono>());
977  iono->timeStamp = when;
978  // We don't know the satellite ID from which the iono data
979  // came from so just set it to 0. If someone is using the
980  // NavLibrary interface for looking up iono data, this
981  // will be irrelevant anyway.
982  iono->signal.sat.id = 0;
983  iono->signal.sat.system = SatelliteSystem::BeiDou;
984  iono->signal.xmitSat.id = 0;
985  iono->signal.xmitSat.system = SatelliteSystem::BeiDou;
986  iono->signal.system = SatelliteSystem::BeiDou;
987  // we can't obtain these from RINEX NAV, so just assume B1 B1I
988  iono->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::B1,
989  TrackingCode::B1I);
990  iono->signal.nav = NavType::BeiDou_D1;
991  for (unsigned i = 0; i < 4; i++)
992  {
993  iono->alpha[i] = ai->second.param[i];
994  iono->beta[i] = bi->second.param[i];
995  }
996  navOut.push_back(iono);
997  // THIS IS A KLUDGE
998  // RINEX doesn't identify the source of the ionospheric
999  // data in the header, and as such we set the satellite ID
1000  // to 0 as noted above. This presents additional problems
1001  // as the NavLibrary::getIonoCorr method specifically
1002  // looks for iono data from healthy satellites, so we have
1003  // to make the invalid assumption that the iono data in
1004  // the RINEX header came from a healthy satellite, and
1005  // stuff a fake satellite 0 health record in the data.
1006  std::shared_ptr<BDSD1NavHealth> health(
1007  std::make_shared<BDSD1NavHealth>());
1008  // NavData
1009  // further kludge to set fake health time stamp to beginning of day
1010  YDSTime bod(when);
1011  bod.sod = 0;
1012  health->timeStamp = bod;
1013  health->signal.sat.id = 0;
1014  health->signal.sat.system = SatelliteSystem::BeiDou;
1015  health->signal.xmitSat.id = 0;
1016  health->signal.xmitSat.system = SatelliteSystem::BeiDou;
1017  health->signal.system = SatelliteSystem::BeiDou;
1018  // we can't obtain these from RINEX NAV, so just assume B1 B1I
1019  health->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::B1,
1020  TrackingCode::B1I);
1021  health->signal.nav = NavType::BeiDou_D1;
1022  // BDSD1NavHealth
1023  health->isAlmHealth = false;
1024  health->satH1 = false; // force "PRN 0" to be healthy
1025  navOut.push_back(health);
1026  }
1027  return true;
1028  }
1029 
1030 
1031  bool RinexNavDataFactory ::
1032  convertToISC(const Rinex3NavData& navIn, NavDataPtr& navOut)
1033  {
1034  bool rv = true;
1035  GPSLNavISC *gps;
1036  GalINavISC *galI;
1037  BDSD1NavISC *bdsD1;
1038  BDSD2NavISC *bdsD2;
1039  switch (navIn.sat.system)
1040  {
1041  case SatelliteSystem::GPS:
1042  case SatelliteSystem::QZSS:
1043  navOut = std::make_shared<GPSLNavISC>();
1044  gps = dynamic_cast<GPSLNavISC*>(navOut.get());
1045  // NavData
1046  fillNavData(navIn, navOut);
1047  // InterSigCorr
1048  gps->isc = navIn.Tgd;
1049  // GPSLNavISC
1050  // We don't have the A-S flag in rinex nav, so just
1051  // assume it's on for GPS and off for QZSS, as it more
1052  // than likely is. Also assume alert is off. Maybe at
1053  // some future point the data and dump method will be
1054  // changed to know that the data is an unknown value.
1055  if (navIn.sat.system == SatelliteSystem::GPS)
1056  {
1057  gps->asFlag = true;
1058  }
1059  else
1060  {
1061  gps->asFlag = false;
1062  }
1063  gps->alert = false;
1064  break;
1065  case SatelliteSystem::Galileo:
1070  navOut = std::make_shared<GalINavISC>();
1071  galI = dynamic_cast<GalINavISC*>(navOut.get());
1072  // NavData
1073  fillNavData(navIn, navOut);
1074  // InterSigCorr - we don't use this data for Galileo
1075  // GalINavISC
1076  galI->bgdE1E5a = navIn.Tgd;
1077  galI->bgdE1E5b = navIn.Tgd2;
1078  break;
1079  case SatelliteSystem::BeiDou:
1080  if (isBeiDouGEO(navIn.sat))
1081  {
1082  navOut = std::make_shared<BDSD2NavISC>();
1083  bdsD2 = dynamic_cast<BDSD2NavISC*>(navOut.get());
1084  // NavData
1085  fillNavData(navIn, navOut);
1086  bdsD2->sow = navIn.xmitTime;
1087  bdsD2->tgd1 = navIn.Tgd;
1088  bdsD2->tgd2 = navIn.Tgd2;
1089  }
1090  else
1091  {
1092  navOut = std::make_shared<BDSD1NavISC>();
1093  bdsD1 = dynamic_cast<BDSD1NavISC*>(navOut.get());
1094  // NavData
1095  fillNavData(navIn, navOut);
1096  bdsD1->sow = navIn.xmitTime;
1097  bdsD1->tgd1 = navIn.Tgd;
1098  bdsD1->tgd2 = navIn.Tgd2;
1099  }
1100  break;
1101  case SatelliteSystem::Glonass:
1102  // Delta tau_n is not stored in RINEX.
1103  break;
1104  default:
1105  // Return true to ignore unsupported/unknown codes
1106  // rather than returing false to indicate an error.
1107  rv = true;
1108  break;
1109  }
1110  return rv;
1111  }
1112 
1113 
1114  void RinexNavDataFactory ::
1115  fillNavData(const Rinex3NavData& navIn, NavDataPtr& navOut)
1116  {
1117  switch (navIn.sat.system)
1118  {
1119  case SatelliteSystem::GPS:
1120  case SatelliteSystem::QZSS:
1121  // NavData
1122  navOut->timeStamp =
1123  gnsstk::GPSWeekSecond(navIn.weeknum,navIn.xmitTime);
1124  if (navIn.sat.system == SatelliteSystem::QZSS)
1125  navOut->timeStamp.setTimeSystem(TimeSystem::QZS);
1126  // sat and xmitSat are always the same for ephemeris
1127  navOut->signal.sat = navIn.sat;
1128  navOut->signal.xmitSat = navIn.sat;
1129  navOut->signal.system = navIn.sat.system;
1130  // we can't obtain these from RINEX NAV, so just assume L1 C/A
1131  navOut->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::L1,
1132  TrackingCode::CA);
1133  navOut->signal.nav = NavType::GPSLNAV;
1134  break;
1135  case SatelliteSystem::Galileo:
1136  // NavData
1137  // RINEX 3.04 Table A8 note 4 says the GAL week number
1138  // is identical to the GPS week number. ergo, it's not
1139  // really a Galileo week number.
1140  navOut->timeStamp = GPSWeekSecond(navIn.weeknum, navIn.xmitTime);
1141  //navOut->timeStamp.setTimeSystem(TimeSystem::GAL);
1142  // sat and xmitSat are always the same for ephemeris
1143  navOut->signal.sat = navIn.sat;
1144  navOut->signal.xmitSat = navIn.sat;
1145  navOut->signal.system = navIn.sat.system;
1146  // The magic numbers here are defined in the RINEX 3
1147  // standard, table A8.
1150  if (navIn.datasources & 0x01)
1151  {
1152  navOut->signal.obs = ObsID(ObservationType::NavMsg,
1154  TrackingCode::E1B);
1155  navOut->signal.nav = NavType::GalINAV;
1156  }
1157  else if (navIn.datasources & 0x02)
1158  {
1159  navOut->signal.obs = ObsID(ObservationType::NavMsg,
1160  CarrierBand::L5,
1161  TrackingCode::E5aI);
1162  navOut->signal.nav = NavType::GalFNAV;
1163  }
1164  else if (navIn.datasources & 0x04)
1165  {
1166  navOut->signal.obs = ObsID(ObservationType::NavMsg,
1167  CarrierBand::E5b,
1168  TrackingCode::E5bI);
1169  navOut->signal.nav = NavType::GalINAV;
1170  }
1171  break;
1172  case SatelliteSystem::BeiDou:
1173  // NavData
1174  navOut->timeStamp =
1175  gnsstk::BDSWeekSecond(navIn.weeknum,navIn.xmitTime);
1176  // sat and xmitSat are always the same for ephemeris
1177  navOut->signal.sat = navIn.sat;
1178  navOut->signal.xmitSat = navIn.sat;
1179  navOut->signal.system = navIn.sat.system;
1180  // we can't obtain these from RINEX NAV, so just assume B1 B1I
1181  navOut->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::B1,
1182  TrackingCode::B1I);
1183  // Make a reasonable guess about the nav signal type
1184  // based on the PRN...
1185  if (isBeiDouGEO(navIn.sat))
1186  {
1187  navOut->signal.nav = NavType::BeiDou_D2;
1188  }
1189  else
1190  {
1191  navOut->signal.nav = NavType::BeiDou_D1;
1192  }
1193  break;
1194  case SatelliteSystem::Glonass:
1195  {
1196  // NavData
1197  YDSTime tmp(navIn.time);
1198  unsigned tkSOD = navIn.MFtime % 86400;
1199  tmp.sod = tkSOD;
1200  navOut->timeStamp = tmp;
1201  // sat and xmitSat are always the same for ephemeris
1202  navOut->signal.sat = navIn.sat;
1203  navOut->signal.xmitSat = navIn.sat;
1204  navOut->signal.system = navIn.sat.system;
1205  // we can't obtain these from RINEX NAV, so just assume G1 Std
1206  navOut->signal.obs = ObsID(ObservationType::NavMsg, CarrierBand::G1,
1207  TrackingCode::Standard, navIn.freqNum);
1208  navOut->signal.nav = NavType::GloCivilF;
1209  break;
1210  }
1211  default:
1213  break;
1214  }
1215  }
1216 
1217 
1218  void RinexNavDataFactory ::
1219  fixTimeGPS(const Rinex3NavData& navIn, GPSLNavEph& navOut)
1220  {
1221  long longToc = (long) navIn.Toc;
1222  long fullXmitWeekNum = navIn.weeknum;
1223  TimeSystem ts = (navIn.sat.system == SatelliteSystem::QZSS)
1224  ? TimeSystem::QZS
1225  : TimeSystem::GPS;
1226 
1227  // Case 3 check
1228  long adjHOWtime = navIn.xmitTime;
1229  if (((longToc % SEC_PER_DAY) == 0) &&
1230  ((navIn.xmitTime % SEC_PER_DAY) == 0) &&
1231  (longToc == navIn.xmitTime))
1232  {
1233  adjHOWtime = navIn.xmitTime - 30;
1234  if (adjHOWtime<0)
1235  {
1236  adjHOWtime += FULLWEEK;
1237  fullXmitWeekNum--;
1238  }
1239  }
1240 
1241  // Determine Transmit Time
1242  // Transmit time is the actual time this
1243  // SF 1/2/3 sample was collected
1244  long xmit = adjHOWtime - (adjHOWtime % 30);
1245  double xmitSOW = (double) xmit;
1246  navOut.xmitTime = GPSWeekSecond(fullXmitWeekNum, (double)xmit, ts);
1247  // We don't really know this, but we need to make an assumption.
1248  navOut.xmit2 = navOut.xmitTime + 6;
1249  navOut.xmit3 = navOut.xmitTime + 12;
1250 
1251  // Fully qualified Toe and Toc
1252  // As broadcast, Toe and Toc are in GPS SOW and do not include
1253  // the GPS week number. OrbElem (rightly) insists on having a
1254  // Toe and Toc in CommonTime objects which implies determining
1255  // the week number.
1256  double timeDiff = navIn.Toe - xmitSOW;
1257  short epochWeek = fullXmitWeekNum;
1258  if (timeDiff < -HALFWEEK)
1259  {
1260  epochWeek++;
1261  }
1262  else if (timeDiff > HALFWEEK)
1263  {
1264  epochWeek--;
1265  }
1266 
1267  navOut.Toc = GPSWeekSecond(epochWeek, navIn.Toc, ts);
1268  navOut.Toe = GPSWeekSecond(epochWeek, navIn.Toe, ts);
1269  }
1270 
1271 
1272  void RinexNavDataFactory ::
1273  fixTimeGalileo(const Rinex3NavData& navIn, OrbitDataKepler& navOut)
1274  {
1276  // RINEX 3.04 Table A8 note 4 says the GAL week number
1277  // is identical to the GPS week number. ergo, it's not
1278  // really a Galileo week number.
1279  navOut.xmitTime = GPSWeekSecond(navIn.weeknum, navIn.xmitTime);
1280  //navOut.xmitTime.setTimeSystem(TimeSystem::GAL);
1281  }
1282 
1283 
1284  void RinexNavDataFactory ::
1285  fixTimeBeiDou(const Rinex3NavData& navIn, OrbitDataKepler& navOut)
1286  {
1288  navOut.xmitTime = BDSWeekSecond(navIn.weeknum, navIn.xmitTime);
1289  }
1290 
1291 
1292  uint8_t RinexNavDataFactory ::
1293  decodeSISA(double accuracy)
1294  {
1295  // Implementation of Galileo-OS-SIS-ICD section 5.1.11
1296  // (Signal-In-Space Accuracy (SISA))
1297  // accuracy = -1 (or less than zero anyway)
1298  // Adding 0.5 to resolve IEE-754 floating point representation issues.
1299  if (accuracy < 0)
1300  return 255;
1301  // 0-0.49m => 0-49
1302  if (accuracy < 0.5)
1303  return (uint8_t)(accuracy*100.0+0.5);
1304  // .5m-.98m => 50-74
1305  if (accuracy < 1)
1306  return (uint8_t)(((accuracy+0.5)*50)+0.5);
1307  // 1m-1.96m => 75-99
1308  if (accuracy < 2)
1309  return (uint8_t)(((accuracy+2)*25)+0.5);
1310  // 2m-5.84m => 100-125
1311  if (accuracy <= 6)
1312  return (uint8_t)((100+(accuracy-2)/0.16)+0.5);
1313  return 255;
1314  }
1315 
1316 
1317  double RinexNavDataFactory ::
1318  encodeSISA(uint8_t sisa)
1319  {
1320  // Implementation of Galileo-OS-SIS-ICD section 5.1.11
1321  // (Signal-In-Space Accuracy (SISA))
1322  // accuracy = -1 (or less than zero anyway)
1323  if (sisa == 255)
1324  {
1325  return -1;
1326  }
1327  else if (sisa < 50)
1328  {
1329  return sisa / 100.0;
1330  }
1331  else if (sisa < 75)
1332  {
1333  return ((sisa-50)*0.02) + 0.5;
1334  }
1335  else if (sisa < 100)
1336  {
1337  return ((sisa-75)*0.04) + 1.0;
1338  }
1339  else if (sisa < 126)
1340  {
1341  return ((sisa-100)*0.16) + 2.0;
1342  }
1343  return -1;
1344  }
1345 }
gnsstk::NavDataPtr
std::shared_ptr< NavData > NavDataPtr
Factories instantiate these in response to find() requests.
Definition: NavData.hpp:62
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::GPSLNavEph::codesL2
GPSLNavL2Codes codesL2
Code on L2 in-phase component.
Definition: GPSLNavEph.hpp:108
gnsstk::GPSLNavEph::alert2
bool alert2
Alert flag from SF2 HOW.
Definition: GPSLNavEph.hpp:104
gnsstk::OrbitDataKepler::idot
double idot
Rate of inclination angle (rad/sec)
Definition: OrbitDataKepler.hpp:193
gnsstk::GalFNavEph::iodnav2
uint16_t iodnav2
IODnav for page type 2.
Definition: GalFNavEph.hpp:92
Rinex3NavHeader.hpp
gnsstk::GalINavHealth::sisaIndex
uint8_t sisaIndex
Signal in space accuracy index (OS-SIS-ICD tbl 76)
Definition: GalINavHealth.hpp:97
gnsstk::Rinex3NavData::Ahalf
RNDouble Ahalf
SQRT of semi-major axis (m**1/2)
Definition: Rinex3NavData.hpp:191
gnsstk::Rinex3NavData::vz
RNDouble vz
SV velocity.
Definition: Rinex3NavData.hpp:204
gnsstk::NavData::msgLenSec
double msgLenSec
Definition: NavData.hpp:199
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::GPSLNavEph::xmit3
CommonTime xmit3
Transmit time for subframe 3.
Definition: GPSLNavEph.hpp:91
gnsstk::GalDataValid
GalDataValid
Identify Galileo Data Validity Status (DVS) states.
Definition: GalDataValid.hpp:51
gnsstk::GPSLNavHealth::svHealth
uint8_t svHealth
6-bit or 8-bit health.
Definition: GPSLNavHealth.hpp:80
gnsstk::GLOFNavEph::xmit3
CommonTime xmit3
Transmit time for string 3.
Definition: GLOFNavEph.hpp:113
gnsstk::SatID::id
int id
Satellite identifier, e.g. PRN.
Definition: SatID.hpp:154
gnsstk::HALFWEEK
const long HALFWEEK
Seconds per half week.
Definition: TimeConstants.hpp:58
gnsstk::BDSD1NavEph::satH1
bool satH1
Autonomous satellite health flag.
Definition: BDSD1NavEph.hpp:103
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::Rinex3NavStream
Definition: Rinex3NavStream.hpp:62
gnsstk::NavDataFactoryCallback::process
virtual bool process(const NavDataPtr &navOut)
Definition: NavDataFactoryCallback.hpp:60
BDSD2NavEph.hpp
gnsstk::OrbitDataKepler::Cis
double Cis
Sine inclination (rad)
Definition: OrbitDataKepler.hpp:180
gnsstk::OrbitDataKepler::A
double A
Semi-major axis (m)
Definition: OrbitDataKepler.hpp:186
gnsstk::GLOFNavEph
Definition: GLOFNavEph.hpp:51
L1
gnsstk::Matrix< double > L1
Definition: Matrix_LUDecomp_T.cpp:46
gnsstk::BDSD1NavEph::xmit3
CommonTime xmit3
Transmit time for subframe 3.
Definition: BDSD1NavEph.hpp:112
gnsstk::GalFNavEph::bgdE5aE1
double bgdE5aE1
Group delay in seconds between E5a and E1.
Definition: GalFNavEph.hpp:85
gnsstk::Rinex3NavData
Definition: Rinex3NavData.hpp:69
gnsstk::OrbitDataKepler::af2
double af2
SV clock drift rate (sec/sec**2)
Definition: OrbitDataKepler.hpp:197
gnsstk::GalFNavHealth::sigHealthStatus
GalHealthStatus sigHealthStatus
Signal health status (SHS)
Definition: GalFNavHealth.hpp:81
gnsstk::GLOFNavData::health
SVHealth health
SV health status.
Definition: GLOFNavData.hpp:71
gnsstk::Rinex3NavData::time
CommonTime time
Time according to the sat/epoch record (TOC)
Definition: Rinex3NavData.hpp:122
gnsstk::BDSD1NavEph
Definition: BDSD1NavEph.hpp:52
gnsstk::SEC_PER_DAY
const long SEC_PER_DAY
Seconds per day.
Definition: TimeConstants.hpp:63
gnsstk::Rinex3NavData::Cic
RNDouble Cic
Cosine inclination (rad)
Definition: Rinex3NavData.hpp:181
gnsstk::GalFNavHealth
Definition: GalFNavHealth.hpp:53
gnsstk::GalFNavEph::dvsE5a
GalDataValid dvsE5a
Data validity status for E5a.
Definition: GalFNavEph.hpp:96
gnsstk::YDSTime
Definition: YDSTime.hpp:58
gnsstk::NavDataFactoryWithStore::OffsetCvtMap
std::map< TimeCvtKey, OffsetEpochMap > OffsetCvtMap
Map from the time system conversion pair to the conversion objects.
Definition: NavDataFactoryWithStore.hpp:74
gnsstk::NavMessageMap
std::map< NavMessageType, NavSatMap > NavMessageMap
Map nav message type to the rest of the storage.
Definition: NavData.hpp:71
gnsstk::GalINavEph::bgdE5aE1
double bgdE5aE1
Group delay in seconds between E5a and E1.
Definition: GalINavEph.hpp:85
gnsstk::OrbitDataKepler::ecc
double ecc
Eccentricity.
Definition: OrbitDataKepler.hpp:185
dts
static const std::string dts("%Y/%03j/%02H:%02M:%02S %P")
gnsstk::BDSD1NavISC::tgd1
double tgd1
Group delay differential on B1I.
Definition: BDSD1NavISC.hpp:99
gnsstk::GLOFNavData::slot
unsigned slot
Slot number (n).
Definition: GLOFNavData.hpp:69
gnsstk::GPSLNavData::asFlag
bool asFlag
Anti-spoof flag from HOW.
Definition: GPSLNavData.hpp:84
gnsstk::Rinex3NavData::ax
RNDouble ax
Definition: Rinex3NavData.hpp:205
NavDataFactoryStoreCallback.hpp
gnsstk::FULLWEEK
const long FULLWEEK
Seconds per whole week.
Definition: TimeConstants.hpp:60
gnsstk::Rinex3NavData::Toe
RNDouble Toe
Ephemeris epoch (sec of week)
Definition: Rinex3NavData.hpp:187
gnsstk::BDSD1NavEph::uraIndex
uint8_t uraIndex
4-bit URA index from subframe 1.
Definition: BDSD1NavEph.hpp:110
BDSD1NavIono.hpp
gnsstk::Rinex3NavData::ecc
RNDouble ecc
Eccentricity.
Definition: Rinex3NavData.hpp:190
gnsstk::GPSLNavEph::fitIntFlag
uint8_t fitIntFlag
Fit interval flag from subframe 2.
Definition: GPSLNavEph.hpp:100
DEBUGTRACE
#define DEBUGTRACE(EXPR)
Definition: DebugTrace.hpp:119
gnsstk::Rinex3NavData::IODC
RNDouble IODC
Index of data-clock.
Definition: Rinex3NavData.hpp:138
gnsstk::Rinex3NavData::af2
RNDouble af2
SV clock drift rate (sec/sec**2)
Definition: Rinex3NavData.hpp:170
gnsstk::BDSD2NavHealth::satH1
bool satH1
Ephemeris health (autonomous satellite health flag).
Definition: BDSD2NavHealth.hpp:101
gnsstk::GLOFNavEph::Toe
CommonTime Toe
Definition: GLOFNavEph.hpp:132
gnsstk::OrbitDataKepler::OMEGAdot
double OMEGAdot
Rate of Rt ascension (rad/sec)
Definition: OrbitDataKepler.hpp:192
gnsstk::Exception::what
std::string what() const
Dump to a string.
Definition: Exception.cpp:193
gnsstk::GalINavHealth::sigHealthStatus
GalHealthStatus sigHealthStatus
Signal health status (SHS)
Definition: GalINavHealth.hpp:93
gnsstk::Rinex3NavData::health
short health
SV health.
Definition: Rinex3NavData.hpp:131
gnsstk::BDSD2NavEph::satH1
bool satH1
Autonomous satellite health flag.
Definition: BDSD2NavEph.hpp:115
gnsstk::BDSD2NavEph::aodc
uint8_t aodc
Age of data - clock.
Definition: BDSD2NavEph.hpp:116
gnsstk::Rinex3NavData::i0
RNDouble i0
Inclination (rad)
Definition: Rinex3NavData.hpp:193
gnsstk::GLOFNavEph::pos
Triple pos
Satellite position at tb in km.
Definition: GLOFNavEph.hpp:115
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::GalFNavEph::sisaIndex
uint8_t sisaIndex
Signal in space accuracy index (OS-SIS-ICD tbl 76)
Definition: GalFNavEph.hpp:86
GalINavHealth.hpp
GPSLNavIono.hpp
gnsstk::OrbitDataKepler::Cuc
double Cuc
Cosine latitude (rad)
Definition: OrbitDataKepler.hpp:175
gnsstk::GPSLNavEph::L2Pdata
bool L2Pdata
Definition: GPSLNavEph.hpp:114
GPSLNavHealth.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::GalINavEph::fixFit
void fixFit()
Definition: GalINavEph.cpp:111
gnsstk::BDSD1NavEph::aodc
uint8_t aodc
Age of data - clock.
Definition: BDSD1NavEph.hpp:104
gnsstk::BDSD1NavEph::fixFit
void fixFit()
Definition: BDSD1NavEph.cpp:87
gnsstk::BDSD2NavHealth::isAlmHealth
bool isAlmHealth
If true, svHealth is representative, otherwise satH1 is.
Definition: BDSD2NavHealth.hpp:99
gnsstk::OrbitDataKepler::w
double w
Argument of perigee (rad)
Definition: OrbitDataKepler.hpp:191
GalFNavEph.hpp
gnsstk::GalFNavEph::iodnav4
uint16_t iodnav4
IODnav for page type 4.
Definition: GalFNavEph.hpp:94
gnsstk::GPSLNavEph::asFlag2
bool asFlag2
Anti-spoof flag from SF2 HOW.
Definition: GPSLNavEph.hpp:106
gnsstk::BDSD1NavHealth::isAlmHealth
bool isAlmHealth
If true, svHealth is representative, otherwise satH1 is.
Definition: BDSD1NavHealth.hpp:99
gnsstk::GalFNavEph::xmit2
CommonTime xmit2
Transmit time for page type 2.
Definition: GalFNavEph.hpp:88
gnsstk::OrbitDataKepler::Toe
CommonTime Toe
Orbit epoch.
Definition: OrbitDataKepler.hpp:171
gnsstk::OrbitDataKepler::Crs
double Crs
Sine radius (m)
Definition: OrbitDataKepler.hpp:178
gnsstk::GalINavEph::dvsE5b
GalDataValid dvsE5b
Data validity status for E5b.
Definition: GalINavEph.hpp:99
gnsstk::NavData::signal
NavMessageID signal
Source signal identification for this navigation message data.
Definition: NavData.hpp:175
gnsstk::Rinex3NavData::OMEGAdot
RNDouble OMEGAdot
Rate of Rt ascension (rad/sec)
Definition: Rinex3NavData.hpp:195
gnsstk::GPSLNavEph::uraIndex
uint8_t uraIndex
4-bit URA index from subframe 1, word 3.
Definition: GPSLNavEph.hpp:102
gnsstk::GalFNavEph::svid
uint8_t svid
Definition: GalFNavEph.hpp:87
gnsstk::GLOFNavEph::xmit4
CommonTime xmit4
Transmit time for string 4.
Definition: GLOFNavEph.hpp:114
gnsstk::GLOFNavHealth
Definition: GLOFNavHealth.hpp:52
gnsstk::Rinex3NavData::IODE
RNDouble IODE
Index of data-eph.
Definition: Rinex3NavData.hpp:139
gnsstk::Rinex3NavData::dn
RNDouble dn
Correction to mean motion (rad/sec)
Definition: Rinex3NavData.hpp:189
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
Rinex3NavStream.hpp
gnsstk::isBeiDouGEO
bool isBeiDouGEO(const SatID &sat)
Return true if the given SatID is BeiDou GEO (expecting D2 nav).
Definition: GNSSconstants.hpp:222
gnsstk::InterSigCorr::isc
double isc
Definition: InterSigCorr.hpp:171
gnsstk::GalFNavHealth::sisaIndex
uint8_t sisaIndex
Signal in space accuracy index (OS-SIS-ICD tbl 76)
Definition: GalFNavHealth.hpp:85
gnsstk::GalINavHealth::dataValidityStatus
GalDataValid dataValidityStatus
Data Validity Status (DVS)
Definition: GalINavHealth.hpp:95
gnsstk::GPSWeekSecond
Definition: GPSWeekSecond.hpp:56
gnsstk::GalINavEph::iodnav3
uint16_t iodnav3
IODnav for word type 3.
Definition: GalINavEph.hpp:95
gnsstk::GalFNavEph::xmit3
CommonTime xmit3
Transmit time for page type 3.
Definition: GalFNavEph.hpp:89
gnsstk::Rinex3NavData::Crc
RNDouble Crc
Cosine radius (m)
Definition: Rinex3NavData.hpp:179
gnsstk::OrbitDataKepler::xmitTime
CommonTime xmitTime
Time of transmission of the start of the data.
Definition: OrbitDataKepler.hpp:170
gnsstk::NavData::timeStamp
CommonTime timeStamp
Definition: NavData.hpp:173
gnsstk::BDSD2NavEph::tgd2
double tgd2
Group delay differential on B2I.
Definition: BDSD2NavEph.hpp:124
gnsstk::GLOFNavEph::vel
Triple vel
Satellite velocity at tb in km/s.
Definition: GLOFNavEph.hpp:116
gnsstk::BDSD2NavISC::tgd1
double tgd1
Group delay differential on B1I.
Definition: BDSD2NavISC.hpp:99
gnsstk::NavDataFactoryCallback
Definition: NavDataFactoryCallback.hpp:54
gnsstk::Rinex3NavData::ageOfInfo
RNDouble ageOfInfo
Age of oper. information (days)
Definition: Rinex3NavData.hpp:149
gnsstk::OrbitDataKepler::M0
double M0
Mean anomaly (rad)
Definition: OrbitDataKepler.hpp:182
gnsstk::Exception
Definition: Exception.hpp:151
gnsstk::GalINavEph
Class containing data elements unique to GPS LNav ephemerides.
Definition: GalINavEph.hpp:52
gnsstk::GPSLNavL2Codes
GPSLNavL2Codes
Codes on L2 channel, per IS-GPS-200 20.3.3.3.1.2.
Definition: GPSLNavL2Codes.hpp:51
gnsstk::NavSignalID::obs
ObsID obs
Carrier, tracking code, etc.
Definition: NavSignalID.hpp:95
GalINavISC.hpp
gnsstk::GalFNavEph::hsE5a
GalHealthStatus hsE5a
Health status for E5a.
Definition: GalFNavEph.hpp:95
gnsstk::GalINavEph::iodnav4
uint16_t iodnav4
IODnav for word type 4.
Definition: GalINavEph.hpp:96
gnsstk::Rinex3NavData::PRNID
short PRNID
SV PRN ID.
Definition: Rinex3NavData.hpp:124
gnsstk::NavDataFactoryStoreCallback
Definition: NavDataFactoryStoreCallback.hpp:52
gnsstk::GPSLNavData::alert
bool alert
Alert flag from HOW.
Definition: GPSLNavData.hpp:83
gnsstk::Rinex3NavData::datasources
short datasources
Data sources.
Definition: Rinex3NavData.hpp:154
gnsstk::Rinex3NavHeader
Definition: Rinex3NavHeader.hpp:107
gnsstk::BDSD1NavISC::sow
uint32_t sow
Seconds of week from word 1-2 of the subframe.
Definition: BDSD1NavISC.hpp:98
gnsstk::Rinex3NavData::vx
RNDouble vx
Definition: Rinex3NavData.hpp:204
gnsstk::GalFNavEph::xmit4
CommonTime xmit4
Transmit time for page type 4.
Definition: GalFNavEph.hpp:90
RinexTimeOffset.hpp
gnsstk::OrbitDataKepler::Cus
double Cus
Sine latitude (rad)
Definition: OrbitDataKepler.hpp:176
gnsstk::Rinex3NavData::codeflgs
short codeflgs
L2 codes.
Definition: Rinex3NavData.hpp:136
gnsstk::GPSLNavEph::healthBits
uint8_t healthBits
6 SV health bits from subframe 1, word 3.
Definition: GPSLNavEph.hpp:101
gnsstk::Rinex3NavData::freqNum
short freqNum
Frequency number (-7..+12)
Definition: Rinex3NavData.hpp:148
gnsstk::BDSD2NavISC::sow
uint32_t sow
Seconds of week from word 1-2 of the subframe.
Definition: BDSD2NavISC.hpp:98
gnsstk::GLOFNavEph::aod
unsigned aod
Age of data in days (E_n).
Definition: GLOFNavEph.hpp:129
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::Rinex3NavData::px
RNDouble px
Definition: Rinex3NavData.hpp:203
GalINavIono.hpp
gnsstk::GalINavEph::hsE5b
GalHealthStatus hsE5b
Health status for E5b.
Definition: GalINavEph.hpp:97
gnsstk::OrbitDataKepler::Ahalf
double Ahalf
Square Root of semi-major axis (m**.5)
Definition: OrbitDataKepler.hpp:187
gnsstk::Rinex3NavData::MFtime
long MFtime
Message frame time (sec of UTC week) as long.
Definition: Rinex3NavData.hpp:147
gnsstk::BDSD2NavHealth
Definition: BDSD2NavHealth.hpp:51
gnsstk::GLOFNavHealth::healthBits
ValidType< uint8_t > healthBits
The 3-bit B_n value.
Definition: GLOFNavHealth.hpp:80
gnsstk::Rinex3NavData::af1
RNDouble af1
SV clock drift (sec/sec)
Definition: Rinex3NavData.hpp:169
gnsstk::GalINavISC::bgdE1E5a
double bgdE1E5a
Broadcast group delay for the E1,E5a pair.
Definition: GalINavISC.hpp:99
gnsstk::GPSLNavEph::xmit2
CommonTime xmit2
Transmit time for subframe 2.
Definition: GPSLNavEph.hpp:90
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::Rinex3NavData::L2Pdata
short L2Pdata
L2 P data flag.
Definition: Rinex3NavData.hpp:137
gnsstk::BDSD1NavEph::sow2
uint32_t sow2
Seconds of week from word 1-2 of subframe 2.
Definition: BDSD1NavEph.hpp:100
gnsstk::GalINavEph::iodnav2
uint16_t iodnav2
IODnav for word type 2.
Definition: GalINavEph.hpp:94
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::OrbitDataKepler::Toc
CommonTime Toc
Clock epoch.
Definition: OrbitDataKepler.hpp:172
gnsstk::GalINavISC::bgdE1E5b
double bgdE1E5b
Broadcast group delay for the E1,E5b pair.
Definition: GalINavISC.hpp:100
gnsstk::GalFNavEph::fixFit
void fixFit()
Definition: GalFNavEph.cpp:103
gnsstk::GPSLNavEph::iode
uint16_t iode
Issue Of Data-Ephemeris.
Definition: GPSLNavEph.hpp:99
gnsstk::GPSLNavEph::fixFit
void fixFit()
Definition: GPSLNavEph.cpp:92
gnsstk::Rinex3NavData::accuracy
RNDouble accuracy
SV accuracy (m)
Definition: Rinex3NavData.hpp:130
gnsstk::TimeSystem
TimeSystem
Definition of various time systems.
Definition: TimeSystem.hpp:51
gnsstk::BDSD2NavEph
Definition: BDSD2NavEph.hpp:57
gnsstk::ObsID::code
TrackingCode code
Definition: ObsID.hpp:201
gnsstk::GalINavEph::xmit5
CommonTime xmit5
Transmit time for word type 5.
Definition: GalINavEph.hpp:92
gnsstk::GLOFNavData::lhealth
bool lhealth
Health flag? Different from B_n and C_n?
Definition: GLOFNavData.hpp:70
gnsstk::YDSTime::sod
double sod
Definition: YDSTime.hpp:186
gnsstk::BDSD1NavEph::tgd1
double tgd1
Group delay differential on B1I.
Definition: BDSD1NavEph.hpp:113
gnsstk::Rinex3NavData::pz
RNDouble pz
SV position.
Definition: Rinex3NavData.hpp:203
gnsstk::Rinex3NavData::weeknum
short weeknum
Definition: Rinex3NavData.hpp:127
gnsstk::Rinex3NavData::TauN
RNDouble TauN
SV clock bias (sec)
Definition: Rinex3NavData.hpp:144
gnsstk::GalINavEph::hsE1B
GalHealthStatus hsE1B
Health status for E1B.
Definition: GalINavEph.hpp:98
gnsstk::Rinex3NavData::IODnav
RNDouble IODnav
Index of data-eph.
Definition: Rinex3NavData.hpp:155
gnsstk::GLOFNavData::xmit2
CommonTime xmit2
Transmit time for string 2 (eph) or odd string.
Definition: GLOFNavData.hpp:67
gnsstk::SatID::system
SatelliteSystem system
System for this satellite.
Definition: SatID.hpp:156
gnsstk::GalINavHealth
Definition: GalINavHealth.hpp:53
gnsstk::OrbitDataKepler::i0
double i0
Inclination (rad)
Definition: OrbitDataKepler.hpp:190
gnsstk::Rinex3NavData::ay
RNDouble ay
Definition: Rinex3NavData.hpp:205
gnsstk::BDSD1NavHealth::satH1
bool satH1
Ephemeris health (autonomous satellite health flag).
Definition: BDSD1NavHealth.hpp:101
example3.data
data
Definition: example3.py:22
BDSD1NavHealth.hpp
gnsstk::GalINavEph::iodnav1
uint16_t iodnav1
IODnav for word type 1.
Definition: GalINavEph.hpp:93
BDSD2NavHealth.hpp
gnsstk::OrbitDataKepler::Cic
double Cic
Cosine inclination (rad)
Definition: OrbitDataKepler.hpp:179
gnsstk::Rinex3NavHeader::leapSeconds
long leapSeconds
Leap seconds.
Definition: Rinex3NavHeader.hpp:190
gnsstk::GalFNavEph::iodnav1
uint16_t iodnav1
IODnav for page type 1.
Definition: GalFNavEph.hpp:91
gnsstk::GPSLNavISC::asFlag
bool asFlag
Anti-spoof flag from HOW.
Definition: GPSLNavISC.hpp:72
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::GLOFNavEph::ref
CommonTime ref
Reference time (t_k) for this ephemeris.
Definition: GLOFNavEph.hpp:112
gnsstk::OrbitDataKepler::Crc
double Crc
Cosine radius (m)
Definition: OrbitDataKepler.hpp:177
gnsstk::NavSignalID
Class used to identify navigation data signal types.
Definition: NavSignalID.hpp:54
gnsstk::BDSD2NavEph::tgd1
double tgd1
Group delay differential on B1I.
Definition: BDSD2NavEph.hpp:123
gnsstk::GLOFNavEph::clkBias
double clkBias
Satellite clock bias in sec (tau_n).
Definition: GLOFNavEph.hpp:118
gnsstk::GLOFNavEph::fixFit
void fixFit()
Definition: GLOFNavEph.cpp:185
GLOFNavHealth.hpp
gnsstk::BDSD1NavEph::aode
uint8_t aode
Age of data - ephemeris.
Definition: BDSD1NavEph.hpp:105
gnsstk::GPSLNavISC::alert
bool alert
Alert flag from HOW.
Definition: GPSLNavISC.hpp:71
gnsstk::GalINavEph::bgdE5bE1
double bgdE5bE1
Group delay in seconds between E5b and E1.
Definition: GalINavEph.hpp:86
gnsstk::GPSLNavEph::asFlag3
bool asFlag3
Anti-spoof flag from SF3 HOW.
Definition: GPSLNavEph.hpp:107
gnsstk::Rinex3NavData::Cus
RNDouble Cus
Sine latitude (rad)
Definition: Rinex3NavData.hpp:178
GalINavEph.hpp
gnsstk::OrbitDataKepler
Base class for orbit information that uses Keplerian parameters.
Definition: OrbitDataKepler.hpp:52
std
Definition: Angle.hpp:142
gnsstk::OrbitDataKepler::af0
double af0
SV clock error (sec)
Definition: OrbitDataKepler.hpp:195
gnsstk::BDSD2NavEph::aode
uint8_t aode
Age of data - ephemeris.
Definition: BDSD2NavEph.hpp:117
gnsstk::GLOFNavEph::interval
unsigned interval
P1 interval (minutes, see PNBGLOFNavDataFactory).
Definition: GLOFNavEph.hpp:126
gnsstk::BDSD1NavISC
Definition: BDSD1NavISC.hpp:51
GLOFNavEph.hpp
gnsstk::Rinex3NavData::az
RNDouble az
SV acceleration.
Definition: Rinex3NavData.hpp:205
gnsstk::GalINavEph::sisaIndex
uint8_t sisaIndex
Signal in space accuracy index (OS-SIS-ICD tbl 76)
Definition: GalINavEph.hpp:87
BDSWeekSecond.hpp
gnsstk::GalFNavHealth::dataValidityStatus
GalDataValid dataValidityStatus
Data Validity Status (DVS)
Definition: GalFNavHealth.hpp:83
gnsstk::GLOFNavEph::acc
Triple acc
Satellite acceleration at tb in km/s**2.
Definition: GLOFNavEph.hpp:117
gnsstk::GPSLNavEph::iodc
uint16_t iodc
Issue Of Data-Clock for the ephemeris.
Definition: GPSLNavEph.hpp:98
DEBUGTRACE_FUNCTION
#define DEBUGTRACE_FUNCTION()
Definition: DebugTrace.hpp:117
gnsstk::GalHealthStatus
GalHealthStatus
Identify different types of SV health states.
Definition: GalHealthStatus.hpp:51
BDSD2NavISC.hpp
gnsstk::Rinex3NavData::vy
RNDouble vy
Definition: Rinex3NavData.hpp:204
gnsstk::BDSD1NavISC::tgd2
double tgd2
Group delay differential on B2I.
Definition: BDSD1NavISC.hpp:100
gnsstk::GalINavEph::xmit4
CommonTime xmit4
Transmit time for word type 4.
Definition: GalINavEph.hpp:91
gnsstk::GalINavEph::xmit2
CommonTime xmit2
Transmit time for word type 2.
Definition: GalINavEph.hpp:89
GPSLNavISC.hpp
gnsstk::GalINavEph::svid
uint8_t svid
SVID field from page type 1 (or PRN if not avail)
Definition: GalINavEph.hpp:88
gnsstk::BDSD1NavEph::tgd2
double tgd2
Group delay differential on B2I.
Definition: BDSD1NavEph.hpp:114
gnsstk::BDSD2NavEph::uraIndex
uint8_t uraIndex
4-bit URA index from subframe 1.
Definition: BDSD2NavEph.hpp:122
gnsstk::GPSLNavEph
Class containing data elements unique to GPS LNav ephemerides.
Definition: GPSLNavEph.hpp:51
gnsstk::BDSD2NavEph::fixFit
void fixFit()
Definition: BDSD2NavEph.cpp:318
gnsstk::GLOFNavEph::healthBits
uint8_t healthBits
The 3-bit B_n value (look at bit 2 not 0 or 1).
Definition: GLOFNavEph.hpp:120
gnsstk::BDSWeekSecond
Definition: BDSWeekSecond.hpp:56
gnsstk::Rinex3NavData::Cis
RNDouble Cis
Sine inclination (rad)
Definition: Rinex3NavData.hpp:182
gnsstk::GLOFNavEph::freqBias
double freqBias
Satellite relative frequency bias (gamma_n).
Definition: GLOFNavEph.hpp:119
gnsstk::GalFNavEph
Class containing data elements unique to Galileo F/NAV ephemerides.
Definition: GalFNavEph.hpp:52
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::OrbitDataKepler::health
SVHealth health
SV health status.
Definition: OrbitDataKepler.hpp:173
gnsstk::GalINavEph::xmit3
CommonTime xmit3
Transmit time for word type 3.
Definition: GalINavEph.hpp:90
gnsstk::NavNearMessageMap
std::map< NavMessageType, NavNearSatMap > NavNearMessageMap
Map nav message type to the rest of the storage.
Definition: NavData.hpp:81
gnsstk::GalINavEph::dvsE1B
GalDataValid dvsE1B
Data validity status for E1B.
Definition: GalINavEph.hpp:100
gnsstk::accuracy2ura
short accuracy2ura(double acc) noexcept
Definition: GPS_URA.hpp:112
gnsstk::BDSD1NavEph::xmit2
CommonTime xmit2
Transmit time for subframe 2.
Definition: BDSD1NavEph.hpp:111
gnsstk::OrbitDataKepler::OMEGA0
double OMEGA0
Longitude of ascending node at weekly epoch (rad)
Definition: OrbitDataKepler.hpp:189
gnsstk::BDSD1NavEph::sow3
uint32_t sow3
Definition: BDSD1NavEph.hpp:101
gnsstk::GalINavISC
Definition: GalINavISC.hpp:51
GLOFNavISC.hpp
gnsstk::Rinex3NavData::GammaN
RNDouble GammaN
SV relative frequency bias.
Definition: Rinex3NavData.hpp:145
gnsstk::BDSD2NavISC::tgd2
double tgd2
Group delay differential on B2I.
Definition: BDSD2NavISC.hpp:100
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::OrbitDataKepler::af1
double af1
SV clock drift (sec/sec)
Definition: OrbitDataKepler.hpp:196
gnsstk::GPSLNavISC
Definition: GPSLNavISC.hpp:53
TimeString.hpp
gnsstk::BDSD2NavISC
Definition: BDSD2NavISC.hpp:51
gnsstk::GPSLNavEph::tgd
double tgd
Ionospheric group delay in seconds.
Definition: GPSLNavEph.hpp:103
gnsstk::BDSD2NavData::sow
uint32_t sow
Seconds of week from word 1-2 of the subframe.
Definition: BDSD2NavData.hpp:71
gnsstk::BDSD1NavHealth
Definition: BDSD1NavHealth.hpp:51
gnsstk::GalFNavEph::iodnav3
uint16_t iodnav3
IODnav for page type 3.
Definition: GalFNavEph.hpp:93
gnsstk::OrbitDataKepler::dn
double dn
Correction to mean motion (rad/sec)
Definition: OrbitDataKepler.hpp:183
gnsstk::Rinex3NavData::M0
RNDouble M0
Mean anomaly (rad)
Definition: Rinex3NavData.hpp:188
BDSD1NavISC.hpp
gnsstk::BDSD1NavData::sow
uint32_t sow
Seconds of week from word 1-2 of the subframe.
Definition: BDSD1NavData.hpp:73
gnsstk::GPSLNavEph::alert3
bool alert3
Alert flag from SF3 HOW.
Definition: GPSLNavEph.hpp:105
RinexNavDataFactory.hpp
gnsstk::GPSLNavHealth
Definition: GPSLNavHealth.hpp:51


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