SatMetaDataStore.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 <fstream>
40 #include <algorithm>
41 #include "SatMetaDataStore.hpp"
42 #include "StringUtils.hpp"
43 #include "YDSTime.hpp"
44 
45 using namespace std;
46 
47 namespace gnsstk
48 {
49  SatMetaDataStore::SVNID ::
50  SVNID()
51  : system(SatelliteSystem::Unknown)
52  {
53  }
54 
55 
57  SVNID(SatelliteSystem sys, const std::string& svn)
58  : system(sys), id(svn)
59  {
60  }
61 
62 
64  operator<(const SVNID& right) const
65  {
66  if (static_cast<int>(system) < static_cast<int>(right.system))
67  {
68  return true;
69  }
70  if (static_cast<int>(system) > static_cast<int>(right.system))
71  {
72  return false;
73  }
74  return id < right.id;
75  }
76 
77 
79  loadData(const std::string& sourceName)
80  {
81  bool rv = true;
82  std::ifstream ins(sourceName);
83  unsigned long lineNo = 0;
84  if (!ins)
85  {
86  // std::cerr << "Couldn't open " << sourceName << std::endl;
87  return false;
88  }
89  while (ins)
90  {
91  std::string txt;
92  std::getline(ins, txt);
93  lineNo++;
94  // skip comments and blank lines
95  if ((txt[0] == '#') || txt.empty())
96  continue;
97  std::vector<std::string> vals = StringUtils::split(txt, ',');
98  try
99  {
100  for (unsigned i = 0; i < vals.size(); i++)
101  {
103  }
104  if (vals.size() == 0)
105  {
106  // this could still happen if there are lines with no commas
107  continue;
108  }
109  string key = gnsstk::StringUtils::upperCase(vals[0]);
110  if (key == "SAT")
111  {
112  if (!addSat(vals, lineNo))
113  {
114  rv = false;
115  continue;
116  }
117  }
118  else if (key == "SIG")
119  {
120  if (!addSignal(vals, lineNo))
121  {
122  rv = false;
123  continue;
124  }
125  }
126  else if (key == "CLOCK")
127  {
128  if (!addClock(vals, lineNo))
129  {
130  rv = false;
131  continue;
132  }
133  }
134  else if (key == "LAUNCH")
135  {
136  if (!addLaunch(vals, lineNo))
137  {
138  rv = false;
139  continue;
140  }
141  }
142  else if (key == "NORAD")
143  {
144  if (!addNORAD(vals, lineNo))
145  {
146  rv = false;
147  continue;
148  }
149  }
150  else
151  {
152  cerr << "Invalid record type: " << vals[0] << " on line "
153  << lineNo << endl;
154  rv = false;
155  continue;
156  }
157  }
158  catch (gnsstk::Exception& exc)
159  {
160  cerr << "Exception while processing line " << lineNo << ":" << endl
161  << exc << endl;
162  rv = false;
163  }
164  catch (std::exception& exc)
165  {
166  cerr << "Exception while processing line " << lineNo << ": "
167  << exc.what() << endl;
168  rv = false;
169  }
170  catch (...)
171  {
172  cerr << "Unknown exception processing line " << lineNo << endl;
173  rv = false;
174  }
175  }
176  return rv;
177  }
178 
179 
181  addSat(const std::vector<std::string>& vals, unsigned long lineNo)
182  {
183  // simple way to index the columns without having to change
184  // all the numbers with every little change.
185  unsigned i = 1;
186  if (vals.size() != 17)
187  {
188  cerr << "Invalid SAT record on line " << lineNo << " size!=17" << endl;
189  return false;
190  }
191  SatMetaData sat;
192  sat.sys = convertStringToSatelliteSystem(vals[i++]);
193  sat.svn = vals[i++];
194  if (StringUtils::isDigitString(vals[i]))
195  {
196  sat.prn = StringUtils::asUnsigned(vals[i]);
197  }
198  else
199  {
200  cerr << "Invalid PRN on line " << lineNo << endl;
201  return false;
202  }
203  i++;
204  if (StringUtils::isDigitString(vals[i]))
205  {
206  sat.chl = StringUtils::asInt(vals[i]);
207  }
208  else
209  {
210  cerr << "Invalid FDMA channel on line " << lineNo << endl;
211  return false;
212  }
213  i++;
214  if (StringUtils::isDigitString(vals[i]))
215  {
216  sat.slotID = StringUtils::asUnsigned(vals[i]);
217  }
218  else
219  {
220  cerr << "Invalid FDMA slot on line " << lineNo << endl;
221  return false;
222  }
223  i++;
224  unsigned long y,doy;
225  double sod;
226  // Set all time systems to any for now, the dozen or so
227  // seconds offset between time systems really isn't
228  // likely to amount to anything in this context.
229  y = StringUtils::asUnsigned(vals[i++]);
230  doy = StringUtils::asUnsigned(vals[i++]);
231  sod = StringUtils::asDouble(vals[i++]);
232  try
233  {
235  }
236  catch (gnsstk::Exception& exc)
237  {
238  exc.addText("Processing startTime");
239  GNSSTK_RETHROW(exc);
240  }
241  y = StringUtils::asUnsigned(vals[i++]);
242  doy = StringUtils::asUnsigned(vals[i++]);
243  sod = StringUtils::asDouble(vals[i++]);
244  try
245  {
247  }
248  catch (gnsstk::Exception& exc)
249  {
250  exc.addText("Processing endTime");
251  GNSSTK_RETHROW(exc);
252  }
253  sat.plane = vals[i++];
254  sat.slot = vals[i++];
255  sat.signals = vals[i++];
256  sat.status = SatMetaData::asStatus(vals[i++]);
257  sat.activeClock = StringUtils::asUnsigned(vals[i]);
258  // cross-reference check and fill
259  SVNID svn(sat.sys, sat.svn);
260  if (noradMap.find(svn) == noradMap.end())
261  {
262  cerr << "Missing NORAD mapping for SVN " << svn << " on line "
263  << lineNo << endl;
264  return false;
265  }
266  sat.norad = noradMap[svn];
267  if (launchMap.find(svn) == launchMap.end())
268  {
269  cerr << "Missing LAUNCH record for SVN " << svn << " on line "
270  << lineNo << endl;
271  return false;
272  }
273  sat.launchTime = launchMap[svn].launchTime;
274  sat.type = launchMap[svn].type;
275  sat.mission = launchMap[svn].mission;
276  SystemBlock sysBlock;
277  sysBlock.sys = sat.sys;
278  sysBlock.blk = launchMap[svn].type;
279  if (clkMap.find(sysBlock) == clkMap.end())
280  {
281  cerr << "Missing CLOCK record for " << sysBlock << " on line "
282  << lineNo << endl;
283  return false;
284  }
285  // note: no checks for clock vector size!
286  const ClockVec& cv(clkMap[sysBlock]);
287  for (unsigned cn = 0; cn < SatMetaData::NUMCLOCKS; cn++)
288  {
289  sat.clocks[cn] = cv[cn];
290  }
291  // add the complete record
292  satMap[sat.sys].insert(sat);
293  return true;
294  }
295 
296 
298  addSignal(const std::vector<std::string>& vals, unsigned long lineNo)
299  {
300  // simple way to index the columns without having to change
301  // all the numbers with every little change.
302  unsigned i = 1;
303  if (vals.size() != 5)
304  {
305  cerr << "Invalid SIG record on line " << lineNo << " size!=5" << endl;
306  return false;
307  }
308  Signal sig;
309  std::string name = vals[i++];
310  std::string carrier = vals[i++];
311  std::string code = vals[i++];
312  std::string nav = vals[i++];
313  sig.carrier = StringUtils::asCarrierBand(carrier);
314  if ((sig.carrier == CarrierBand::Unknown) ||
315  (sig.carrier == CarrierBand::Any) ||
316  (sig.carrier == CarrierBand::Undefined) ||
317  (sig.carrier == CarrierBand::Last))
318  {
319  cerr << "Invalid carrier \"" << carrier << "\" on line " << lineNo
320  << endl;
321  return false;
322  }
323  sig.code = StringUtils::asTrackingCode(code);
324  if ((sig.code == TrackingCode::Unknown) ||
325  (sig.code == TrackingCode::Any) ||
326  (sig.code == TrackingCode::Undefined) ||
327  (sig.code == TrackingCode::Last))
328  {
329  cerr << "Invalid code \"" << code << "\" on line " << lineNo
330  << endl;
331  return false;
332  }
333  sig.nav = StringUtils::asNavType(nav);
334  if ((sig.nav == NavType::Unknown) ||
335  (sig.nav == NavType::Any) ||
336  (sig.nav == NavType::Last))
337  {
338  cerr << "Invalid nav \"" << nav << "\" on line " << lineNo
339  << endl;
340  return false;
341  }
342  sigMap[name].insert(sig);
343  return true;
344  }
345 
346 
348  addClock(const std::vector<std::string>& vals, unsigned long lineNo)
349  {
350  // simple way to index the columns without having to change
351  // all the numbers with every little change.
352  unsigned i = 1;
353  if (vals.size() != 7)
354  {
355  cerr << "Invalid CLOCK record on line " << lineNo << " size!=7"
356  << endl;
357  return false;
358  }
359  SystemBlock key;
360  key.sys = convertStringToSatelliteSystem(vals[i++]);
361  key.blk = vals[i++];
362  if (clkMap.find(key) != clkMap.end())
363  {
364  // enforce no duplicates
365  cerr << "Duplicate CLOCK " << StringUtils::asString(key.sys) << " "
366  << key.blk << " on line " << lineNo << endl;
367  return false;
368  }
369  // currently support up to four clocks.
370  clkMap[key].resize(SatMetaData::NUMCLOCKS);
371  for (unsigned j = 0; j < SatMetaData::NUMCLOCKS; j++)
372  {
373  clkMap[key][j] = SatMetaData::asClockType(vals[i++]);
374  }
375  return true;
376  }
377 
378 
380  addLaunch(const std::vector<std::string>& vals, unsigned long lineNo)
381  {
382  // simple way to index the columns without having to change
383  // all the numbers with every little change.
384  unsigned i = 1;
385  if (vals.size() != 8)
386  {
387  cerr << "Invalid LAUNCH record on line " << lineNo << " size!=8"
388  << endl;
389  return false;
390  }
391  SVNID svn;
392  svn.system = convertStringToSatelliteSystem(vals[i++]);
393  svn.id = vals[i++];
394  if (launchMap.find(svn) != launchMap.end())
395  {
396  // enforce no duplicates
397  cerr << "Duplicate LAUNCH " << svn << " on line " << lineNo << endl;
398  return false;
399  }
400  launchMap[svn].svn = svn;
401  unsigned y = StringUtils::asUnsigned(vals[i++]);
402  unsigned doy = StringUtils::asUnsigned(vals[i++]);
403  double sod = StringUtils::asDouble(vals[i++]);
404  try
405  {
406  launchMap[svn].launchTime = YDSTime(y,doy,sod,gnsstk::TimeSystem::Any);
407  }
408  catch (gnsstk::Exception& exc)
409  {
410  exc.addText("Processing launchTime");
411  GNSSTK_RETHROW(exc);
412  }
413  launchMap[svn].type = vals[i++];
414  launchMap[svn].mission = vals[i++];
415  return true;
416  }
417 
418 
420  addNORAD(const std::vector<std::string>& vals, unsigned long lineNo)
421  {
422  // simple way to index the columns without having to change
423  // all the numbers with every little change.
424  unsigned i = 1;
425  if (vals.size() != 4)
426  {
427  cerr << "Invalid NORAD record on line " << lineNo << " size!=4"
428  << endl;
429  return false;
430  }
431  SVNID svn;
432  svn.system = convertStringToSatelliteSystem(vals[i++]);
433  svn.id = vals[i++];
434  if (noradMap.find(svn) != noradMap.end())
435  {
436  // enforce no duplicates
437  cerr << "Duplicate NORAD " << svn << " on line " << lineNo << endl;
438  return false;
439  }
440  unsigned long noradID = StringUtils::asUnsigned(vals[i++]);
441  noradMap[svn] = noradID;
442  return true;
443  }
444 
445 
447  findSat(SatelliteSystem sys, uint32_t prn,
448  const gnsstk::CommonTime& when,
449  SatMetaData& sat)
450  const
451  {
452  SatMetaMap::const_iterator sysIt = satMap.find(sys);
453  if (sysIt == satMap.end())
454  {
455  // std::cerr << "no system" << std::endl;
456  return false;
457  }
458  // Unfortunately we have to do a linear search because
459  // different systems have different methods of
460  // identification.
461  for (SatSet::const_iterator rv = sysIt->second.begin();
462  rv != sysIt->second.end();
463  rv++)
464  {
465  if (rv->prn < prn)
466  {
467  // cerr << "< prn" << endl;
468  continue;
469  }
470  if (rv->prn > prn)
471  {
472  // cerr << "> prn" << endl;
473  return false;
474  }
475  // cerr << "= prn" << endl;
476  // same prn at this point
477  if (when < rv->startTime)
478  {
479  // cerr << "< startTime" << endl;
480  continue;
481  }
482  if (when < rv->endTime)
483  {
484  // std::cerr << "found it" << std::endl;
485  // cerr << *rv << endl;
486  sat = *rv;
487  return true;
488  }
489  } // for (SatSet::const_iterator rv = sysIt->second.begin();
490  // cerr << "giving up" << endl;
491  return false;
492  } // findSat()
493 
494 
496  findSatBySVN(SatelliteSystem sys, const std::string& svn,
497  const gnsstk::CommonTime& when,
498  SatMetaData& sat)
499  const
500  {
501  SatMetaMap::const_iterator sysIt = satMap.find(sys);
502  if (sysIt == satMap.end())
503  {
504  // std::cerr << "no system" << std::endl;
505  return false;
506  }
507  // This is a bit different than the PRN search because the
508  // map is sorted by PRN and not SVN, so we have to search
509  // until we either hit the end of the map or we find a match,
510  // there's no short-cut failures.
511  for (SatSet::const_iterator rv = sysIt->second.begin();
512  rv != sysIt->second.end();
513  rv++)
514  {
515  if ((rv->svn == svn) &&
516  (when >= rv->startTime) &&
517  (when < rv->endTime))
518  {
519  // std::cerr << "found it" << std::endl;
520  // cerr << *rv << endl;
521  sat = *rv;
522  return true;
523  }
524  } // for (SatSet::const_iterator rv = sysIt->second.begin();
525  // cerr << "giving up" << endl;
526  return false;
527  } // findSat()
528 
529 
530  bool SatMetaDataStore::
531  findSatBySlotFdma(uint32_t slotID,
532  int32_t channel,
533  const gnsstk::CommonTime& when,
534  SatMetaData& sat)
535  const
536  {
538  SatMetaMap::const_iterator sysIt = satMap.find(sys);
539  if (sysIt == satMap.end())
540  {
541  // std::cerr << "no system" << std::endl;
542  return false;
543  }
544  // This is a bit different than the PRN search because the
545  // map is sorted by PRN and not slotID, so we have to search
546  // until we either hit the end of the map or we find a match,
547  // there's no short-cut failures.
548  for (SatSet::const_iterator rv = sysIt->second.begin();
549  rv != sysIt->second.end();
550  rv++)
551  {
552  if ((rv->slotID == slotID) &&
553  (rv->chl == channel) &&
554  (when >= rv->startTime) &&
555  (when < rv->endTime))
556  {
557  // std::cerr << "found it" << std::endl;
558  // cerr << *rv << endl;
559  sat = *rv;
560  return true;
561  }
562  } // for (SatSet::const_iterator rv = sysIt->second.begin();
563  // cerr << "giving up" << endl;
564  return false;
565  } // findSatByFdmaSlot()
566 
567 
569  getSVN(SatelliteSystem sys, uint32_t prn,
570  const gnsstk::CommonTime& when,
571  std::string& svn)
572  const
573  {
574  SatMetaData sat;
575  if (findSat(sys, prn, when, sat))
576  {
577  svn = sat.svn;
578  return true;
579  }
580  return false;
581  }
582 
583 
585  getPRN(SatelliteSystem sys, const std::string& svn,
586  const gnsstk::CommonTime& when,
587  uint32_t& prn)
588  const
589  {
590  SatMetaData sat;
591  if (findSatBySVN(sys, svn, when, sat))
592  {
593  prn = sat.prn;
594  return true;
595  }
596  return false;
597  }
598 
599 
600  std::set<std::string> SatMetaDataStore ::
602  const
603  {
604  std::set<std::string> rv;
605  for (const auto& smi : sigMap)
606  {
607  for (const auto& ssi : smi.second)
608  {
609  if (ssi == sig)
610  {
611  rv.insert(smi.first);
612  // Break the inner loop since we've already matched
613  // the signal and can move on to the next signal.
614  break;
615  }
616  }
617  }
618  return rv;
619  }
620 
621 
622  std::set<std::string> SatMetaDataStore ::
623  getSignalSet(const SignalSet& signals)
624  const
625  {
626  std::set<std::string> rv;
627  for (const auto& smi : sigMap)
628  {
629  bool completeMatch = true;
630  // set_intersection does not use operator== and neither
631  // does count, but we want operator== to support
632  // wildcards, but not operator<. So we have to roll this
633  // by hand.
634  for (const auto& si : signals)
635  {
636  bool matched = false;
637  for (const auto& smsi : smi.second)
638  {
639  if (si == smsi)
640  {
641  matched = true;
642  break;
643  }
644  }
645  if (!matched)
646  {
647  completeMatch = false;
648  break;
649  }
650  }
651  if (completeMatch)
652  {
653  rv.insert(smi.first);
654  }
655  }
656  return rv;
657  }
658 
659 
662  {
663  SatSet rv;
664  std::set<std::string> groups = getSignalSet(signals);
665  for (const auto& smmi : satMap)
666  {
667  for (const auto& ssi : smmi.second)
668  {
669  if (groups.count(ssi.signals) > 0)
670  {
671  rv.insert(ssi);
672  }
673  }
674  }
675  return rv;
676  }
677 
678 
680  getSatsBySignal(const SignalSet& signals, const CommonTime& when)
681  {
682  SatSet intermediate = getSatsBySignal(signals);
683  SatSet rv;
684  for (const auto& ii : intermediate)
685  {
686  if ((when >= ii.startTime) && (when < ii.endTime))
687  {
688  rv.insert(ii);
689  }
690  }
691  return rv;
692  }
693 
694 
697  const CommonTime& beginTime,
698  const CommonTime& endTime,
699  const std::set<SatMetaData::Status>& status)
700  {
701  SatSet intermediate = getSatsBySignal(signals);
702  SatSet rv;
703  for (const auto& ii : intermediate)
704  {
705  if ((ii.startTime <= endTime) &&
706  (ii.endTime >= beginTime) &&
707  (status.count(ii.status) > 0))
708  {
709  rv.insert(ii);
710  }
711  }
712  return rv;
713  }
714 }
gnsstk::SatMetaDataStore::Signal::code
TrackingCode code
Tracking code.
Definition: SatMetaDataStore.hpp:161
gnsstk::SatMetaData::endTime
gnsstk::CommonTime endTime
When the satellite ceased operation.
Definition: SatMetaData.hpp:99
gnsstk::NavType::Unknown
@ Unknown
Uninitialized value.
gnsstk::StringUtils::upperCase
std::string & upperCase(std::string &s)
Definition: StringUtils.hpp:2117
gnsstk::StringUtils::asCarrierBand
CarrierBand asCarrierBand(const std::string &s) noexcept
Convert a string name to an CarrierBand.
Definition: CarrierBand.cpp:80
gnsstk::StringUtils::asInt
long asInt(const std::string &s)
Definition: StringUtils.hpp:713
YDSTime.hpp
gnsstk::SatMetaDataStore::addNORAD
bool addNORAD(const std::vector< std::string > &vals, unsigned long lineNo)
Definition: SatMetaDataStore.cpp:420
gnsstk::SatMetaDataStore::SystemBlock::blk
std::string blk
Definition: SatMetaDataStore.hpp:170
gnsstk::StringUtils::asNavType
NavType asNavType(const std::string &s) noexcept
Convert a string name to an NavType.
Definition: NavType.cpp:75
gnsstk::TrackingCode::Last
@ Last
Used to verify that all items are described at compile time.
gnsstk::SatMetaData
Definition: SatMetaData.hpp:56
StringUtils.hpp
gnsstk::SatMetaData::slot
std::string slot
Slot within the plane.
Definition: SatMetaData.hpp:101
gnsstk::SatMetaData::type
std::string type
Typically block number.
Definition: SatMetaData.hpp:102
gnsstk::YDSTime
Definition: YDSTime.hpp:58
gnsstk::SatMetaDataStore::findSatBySlotFdma
bool findSatBySlotFdma(uint32_t slotID, int32_t channel, const gnsstk::CommonTime &when, SatMetaData &sat) const
Definition: SatMetaDataStore.cpp:531
gnsstk::SatMetaData::plane
std::string plane
Satellite plane identifier.
Definition: SatMetaData.hpp:100
gnsstk::StringUtils::asTrackingCode
TrackingCode asTrackingCode(const std::string &s) noexcept
Convert a string name to an TrackingCode.
Definition: TrackingCode.cpp:182
gnsstk::SatMetaDataStore::Signal::nav
NavType nav
Navigation code.
Definition: SatMetaDataStore.hpp:162
gnsstk::SatMetaDataStore::getSignalSet
std::set< std::string > getSignalSet(const Signal &sig) const
Definition: SatMetaDataStore.cpp:601
gnsstk::SatMetaData::sys
SatelliteSystem sys
Which GNSS this satellite is from.
Definition: SatMetaData.hpp:96
gnsstk::SatelliteSystem
SatelliteSystem
Supported satellite systems.
Definition: SatelliteSystem.hpp:55
gnsstk::NavType::Last
@ Last
Used to verify that all items are described at compile time.
gnsstk::Exception::what
std::string what() const
Dump to a string.
Definition: Exception.cpp:193
gnsstk::CarrierBand::Any
@ Any
Used to match any carrier band.
gnsstk::TimeSystem::Any
@ Any
wildcard; allows comparison with any other type
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::SatMetaDataStore::satMap
SatMetaMap satMap
Storage of all the satellite metadata.
Definition: SatMetaDataStore.hpp:383
gnsstk::SatMetaDataStore::SystemBlock
Key of GNSS and satellite block.
Definition: SatMetaDataStore.hpp:165
gnsstk::SatMetaDataStore::Signal::carrier
CarrierBand carrier
Carrier frequency.
Definition: SatMetaDataStore.hpp:160
gnsstk::SatMetaData::signals
std::string signals
Name of broadcast signal set.
Definition: SatMetaData.hpp:103
gnsstk::SatMetaData::norad
int32_t norad
NORAD-assigned ID for this satellite.
Definition: SatMetaData.hpp:93
gnsstk::SatMetaDataStore::Signal
Specifies a single GNSS signal.
Definition: SatMetaDataStore.hpp:142
gnsstk::CarrierBand::Unknown
@ Unknown
Uninitialized value.
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::SatMetaDataStore::addClock
bool addClock(const std::vector< std::string > &vals, unsigned long lineNo)
Definition: SatMetaDataStore.cpp:348
gnsstk::IonexStoreStrategy::Unknown
@ Unknown
Unknown or uninitialized stategy value.
gnsstk::SatMetaDataStore::getSVN
bool getSVN(SatelliteSystem sys, uint32_t prn, const gnsstk::CommonTime &when, std::string &svn) const
Definition: SatMetaDataStore.cpp:569
gnsstk::SatMetaDataStore::SVNID::system
SatelliteSystem system
Definition: SatMetaDataStore.hpp:178
gnsstk::StringUtils::split
std::vector< std::string > split(const std::string &str, const char delimiter=' ')
Definition: StringUtils.hpp:2275
gnsstk::SatMetaData::svn
std::string svn
Space vehicle number, a unique GNSS satellite ID.
Definition: SatMetaData.hpp:92
gnsstk::SatMetaData::status
Status status
Current satellite state.
Definition: SatMetaData.hpp:105
gnsstk::convertStringToSatelliteSystem
SatelliteSystem convertStringToSatelliteSystem(const std::string &s)
Definition: SatelliteSystem.hpp:107
gnsstk::Exception
Definition: Exception.hpp:151
gnsstk::SatMetaDataStore::clkMap
ClockConfigMap clkMap
Map satellite block to clock types.
Definition: SatMetaDataStore.hpp:387
gnsstk::NavType::Any
@ Any
Used to match any nav code.
gnsstk::SatMetaData::prn
uint32_t prn
Pseudo-Random Number, identifies CDMA satellites.
Definition: SatMetaData.hpp:91
gnsstk::SatMetaDataStore::noradMap
NORADMap noradMap
Map SVN to NORAD ID.
Definition: SatMetaDataStore.hpp:391
y
page HOWTO subpage DoxygenGuide Documenting Your Code page DoxygenGuide Documenting Your Code todo Flesh out this document section doctips Tips for Documenting When defining make sure that the prototype is identical between the cpp and hpp including both the namespaces and the parameter names for you have std::string as the return type in the hpp file and string as the return type in the cpp Doxygen may get confused and autolink to the cpp version with no documentation If you don t use the same parameter names between the cpp and hpp that will also confuse Doxygen Don t put type information in return or param documentation It doesn t really add anything and will often cause Doxygen to complain and not produce the documentation< br > use note Do not put a comma after a param name unless you mean to document multiple parameters< br/> the output stream</code >< br/> y
Definition: DOCUMENTING.dox:15
gnsstk::SatMetaData::clocks
ClockType clocks[NUMCLOCKS]
Types of frequency standards available.
Definition: SatMetaData.hpp:106
gnsstk::SatMetaDataStore::loadData
virtual bool loadData(const std::string &sourceName)
Definition: SatMetaDataStore.cpp:79
gnsstk::SatMetaDataStore::findSat
bool findSat(SatelliteSystem sys, uint32_t prn, const gnsstk::CommonTime &when, SatMetaData &sat) const
Definition: SatMetaDataStore.cpp:447
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::SatMetaData::slotID
uint32_t slotID
Slot ID for FDMA satellites.
Definition: SatMetaData.hpp:95
gnsstk::SatMetaDataStore::SignalSet
std::set< Signal > SignalSet
Set of signals that may be transmitted by a satellite.
Definition: SatMetaDataStore.hpp:192
gnsstk::SatMetaDataStore::SystemBlock::sys
SatelliteSystem sys
Definition: SatMetaDataStore.hpp:169
gnsstk::SatMetaData::asClockType
static ClockType asClockType(const std::string &s)
Convert string to ClockType.
Definition: SatMetaData.cpp:125
gnsstk::StringUtils::asDouble
double asDouble(const std::string &s)
Definition: StringUtils.hpp:705
GNSSTK_RETHROW
#define GNSSTK_RETHROW(exc)
Definition: Exception.hpp:369
gnsstk::SatMetaDataStore::SVNID
Like SatID but for SVN which is a string.
Definition: SatMetaDataStore.hpp:173
gnsstk::SatMetaData::NUMCLOCKS
static const unsigned NUMCLOCKS
Maximum number of clocks on a satellite.
Definition: SatMetaData.hpp:60
gnsstk::SatMetaDataStore::addLaunch
bool addLaunch(const std::vector< std::string > &vals, unsigned long lineNo)
Definition: SatMetaDataStore.cpp:380
gnsstk::SatMetaDataStore::SVNID::id
std::string id
Definition: SatMetaDataStore.hpp:179
gnsstk::SatMetaData::startTime
gnsstk::CommonTime startTime
When the satellite became operational.
Definition: SatMetaData.hpp:98
gnsstk::SatMetaDataStore::addSat
bool addSat(const std::vector< std::string > &vals, unsigned long lineNo)
Definition: SatMetaDataStore.cpp:181
gnsstk::SatMetaDataStore::getPRN
bool getPRN(SatelliteSystem sys, const std::string &svn, const gnsstk::CommonTime &when, uint32_t &prn) const
Definition: SatMetaDataStore.cpp:585
example6.ssi
ssi
Definition: example6.py:124
gnsstk::SatMetaDataStore::SVNID::operator<
bool operator<(const SVNID &right) const
Definition: SatMetaDataStore.cpp:64
gnsstk::SatMetaDataStore::launchMap
LaunchMap launchMap
Launch time of satellites.
Definition: SatMetaDataStore.hpp:389
example6.sod
sod
Definition: example6.py:103
gnsstk::SatMetaData::launchTime
gnsstk::CommonTime launchTime
When the satellite was launched.
Definition: SatMetaData.hpp:97
gnsstk::SatMetaData::chl
int32_t chl
Channel ID for FDMA satellites.
Definition: SatMetaData.hpp:94
gnsstk::StringUtils::asUnsigned
unsigned long asUnsigned(const std::string &s)
Definition: StringUtils.hpp:721
gnsstk::SatMetaDataStore::SatSet
std::multiset< SatMetaData, SatMetaDataSort > SatSet
Set of satellites ordered by PRN or channel/slotID.
Definition: SatMetaDataStore.hpp:196
std
Definition: Angle.hpp:142
gnsstk::SatMetaDataStore::SVNID::SVNID
SVNID()
Definition: SatMetaDataStore.cpp:50
gnsstk::SatMetaDataStore::addSignal
bool addSignal(const std::vector< std::string > &vals, unsigned long lineNo)
Definition: SatMetaDataStore.cpp:298
gnsstk::SatMetaDataStore::findSatBySVN
bool findSatBySVN(SatelliteSystem sys, const std::string &svn, const gnsstk::CommonTime &when, SatMetaData &sat) const
Definition: SatMetaDataStore.cpp:496
gnsstk::CarrierBand::Undefined
@ Undefined
Code is known to be undefined (as opposed to unknown)
gnsstk::SatMetaData::mission
std::string mission
Mission number.
Definition: SatMetaData.hpp:104
gnsstk::StringUtils::strip
std::string & strip(std::string &s, const std::string &aString, std::string::size_type num=std::string::npos)
Definition: StringUtils.hpp:1482
gnsstk::Exception::addText
Exception & addText(const std::string &errorText)
Definition: Exception.cpp:133
gnsstk::SatMetaDataStore::ClockVec
std::vector< SatMetaData::ClockType > ClockVec
Types of clocks on a satellite (hardware-specific positional idx).
Definition: SatMetaDataStore.hpp:200
gnsstk::SatelliteSystem::Glonass
@ Glonass
gnsstk::SatMetaDataStore::sigMap
SignalMap sigMap
Map signal set name to the actual signals.
Definition: SatMetaDataStore.hpp:385
gnsstk::SatMetaDataStore::getSatsBySignal
SatSet getSatsBySignal(const SignalSet &signals)
Definition: SatMetaDataStore.cpp:661
SatMetaDataStore.hpp
gnsstk::SatMetaData::asStatus
static Status asStatus(const std::string &s)
Convert string to Status.
Definition: SatMetaData.cpp:89
gnsstk::SatMetaData::activeClock
uint8_t activeClock
Which of the above 4 clocks is active.
Definition: SatMetaData.hpp:107
gnsstk::CarrierBand::Last
@ Last
Used to verify that all items are described at compile time.
gnsstk::TrackingCode::Undefined
@ Undefined
Code is known to be undefined (as opposed to unknown)
gnsstk::StringUtils::isDigitString
bool isDigitString(const std::string &s)
Definition: StringUtils.hpp:1871
gnsstk::TrackingCode::Any
@ Any
Used to match any tracking code.
gnsstk::TrackingCode::Unknown
@ Unknown
Uninitialized value.


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