RinexObsID.hpp
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 #ifndef GNSSTK_RINEXOBSID_HPP
40 #define GNSSTK_RINEXOBSID_HPP
41 
48 #include "gnsstk_export.h"
49 #include "ObsID.hpp"
50 #include "RinexObsHeader.hpp"
51 
52 namespace gnsstk
53 {
55 
57 
58 
64  bool isValidRinexObsID(const std::string& id);
65 
67  bool isValidRinexObsID(const std::string& id, const char syschar);
68 
102  class RinexObsID : public ObsID
103  {
104  public:
107  : ObsID(),
108  rinexVersion(Rinex3ObsBase::currentVersion)
109  {}
110 
114  : ObsID(ot, cb, tc),
116  {}
117 
134  explicit RinexObsID(const std::string& strID, double version);
135 
152  explicit RinexObsID(const char* id, double version)
153  : RinexObsID(std::string(id), version)
154  {}
155 
162  {
163  type=oid.type; band=oid.band; code=oid.code;
164  std::string str(this->asString());
165  if(!isValidRinexObsID(str))
166  {
167  InvalidParameter ip("Invalid RinexObsID: " + str);
168  GNSSTK_THROW(ip);
169  }
170  }
171 
178  RinexObsID(const RinexObsType& rot);
179 
190  std::string asString() const
191  { return asString(rinexVersion); }
192 
201  std::string asString(double version) const;
202 
210  bool equalIndex(const RinexObsID& right) const;
211 
219  static RinexObsID newID(const std::string& id,
220  const std::string& desc="");
221 
225  static std::ostream& dumpCheck(std::ostream& s);
226 
259  double rinexVersion;
260 
262  GNSSTK_EXPORT static std::string validRinexSystems;
263 
266  GNSSTK_EXPORT static std::map<std::string, std::string> map1to3sys;
267  GNSSTK_EXPORT static std::map<std::string, std::string> map3to1sys;
268 
271  GNSSTK_EXPORT static std::string validRinexFrequencies;
272 
281  GNSSTK_EXPORT static std::map<char, std::map<char, std::string> > validRinexTrackingCodes;
282 
285  GNSSTK_EXPORT static std::map< char, ObservationType> char2ot;
286  GNSSTK_EXPORT static std::map< char, CarrierBand> char2cb;
287  GNSSTK_EXPORT static std::map< char, TrackingCode> char2tc;
288  GNSSTK_EXPORT static std::map< ObservationType, char > ot2char;
289  GNSSTK_EXPORT static std::map< CarrierBand, char > cb2char;
290  GNSSTK_EXPORT static std::map< TrackingCode, char> tc2char;
291 
296  static std::string getOTChars();
302  static std::string getOTDescFromChar(char c)
303  { return otDesc[char2ot[c]]; }
308  static std::string getCBChars();
314  static std::string getCBDescFromChar(char c)
315  { return cbDesc[char2cb[c]]; }
320  static std::string getTCChars();
326  static std::string getTCDescFromChar(char c)
327  { return tcDesc[char2tc[c]]; }
328 
329  private:
330  static RinexObsID idCreator(const std::string& id,
331  const std::string& desc="");
332 
333  }; // end class RinexObsID
334 
336 
337 } // namespace gnsstk
338 
339 #endif
gnsstk::RinexObsID::rinexVersion
double rinexVersion
Definition: RinexObsID.hpp:259
gnsstk::RinexObsID::asString
std::string asString() const
Definition: RinexObsID.hpp:190
gnsstk::RinexObsID::RinexObsID
RinexObsID()
empty constructor, creates an invalid object
Definition: RinexObsID.hpp:106
gnsstk::RinexObsID::dumpCheck
static std::ostream & dumpCheck(std::ostream &s)
Definition: RinexObsID.cpp:302
gnsstk::RinexObsID::getOTDescFromChar
static std::string getOTDescFromChar(char c)
Definition: RinexObsID.hpp:302
gnsstk::RinexObsID::char2ot
static GNSSTK_EXPORT std::map< char, ObservationType > char2ot
Definition: RinexObsID.hpp:285
gnsstk::isValidRinexObsID
bool isValidRinexObsID(const std::string &strID)
Definition: RinexObsID.cpp:223
gnsstk::CarrierBand
CarrierBand
Definition: CarrierBand.hpp:54
gnsstk::RinexObsID::getCBDescFromChar
static std::string getCBDescFromChar(char c)
Definition: RinexObsID.hpp:314
example5.oid
oid
Definition: example5.py:29
gnsstk::RinexObsID::getTCChars
static std::string getTCChars()
Definition: RinexObsID.cpp:462
gnsstk::ObsID::tcDesc
static GNSSTK_EXPORT std::map< TrackingCode, std::string > tcDesc
These strings are for forming a somewhat verbose description.
Definition: ObsID.hpp:216
gnsstk::ObsID::band
CarrierBand band
Definition: ObsID.hpp:200
gnsstk::Rinex3ObsBase::currentVersion
static const GNSSTK_EXPORT double currentVersion
Definition: Rinex3ObsBase.hpp:72
gnsstk::RinexObsID::RinexObsID
RinexObsID(const char *id, double version)
Definition: RinexObsID.hpp:152
gnsstk::RinexObsID::map3to1sys
static GNSSTK_EXPORT std::map< std::string, std::string > map3to1sys
Definition: RinexObsID.hpp:267
gnsstk::RinexObsID::getCBChars
static std::string getCBChars()
Definition: RinexObsID.cpp:450
gnsstk::RinexObsID::map1to3sys
static GNSSTK_EXPORT std::map< std::string, std::string > map1to3sys
Definition: RinexObsID.hpp:266
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::RinexObsID::validRinexSystems
static GNSSTK_EXPORT std::string validRinexSystems
This string contains the system characters for all RINEX systems.
Definition: RinexObsID.hpp:262
gnsstk::RinexObsID::validRinexTrackingCodes
static GNSSTK_EXPORT std::map< char, std::map< char, std::string > > validRinexTrackingCodes
Definition: RinexObsID.hpp:281
gnsstk::RinexObsID::validRinexFrequencies
static GNSSTK_EXPORT std::string validRinexFrequencies
Definition: RinexObsID.hpp:271
gnsstk::RinexObsID::RinexObsID
RinexObsID(const ObsID &oid, double version=Rinex3ObsBase::currentVersion)
Definition: RinexObsID.hpp:159
gnsstk::RinexObsID::RinexObsID
RinexObsID(ObservationType ot, CarrierBand cb, TrackingCode tc, double version=Rinex3ObsBase::currentVersion)
Explicit constructior.
Definition: RinexObsID.hpp:112
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::RinexObsType
RINEX Observation Types.
Definition: RinexObsHeader.hpp:67
gnsstk::RinexObsID::equalIndex
bool equalIndex(const RinexObsID &right) const
Definition: RinexObsID.cpp:356
version
string version(string("2.4 9/23/15 rev"))
gnsstk::ObsID::code
TrackingCode code
Definition: ObsID.hpp:201
gnsstk::RinexObsID
Definition: RinexObsID.hpp:102
gnsstk::RinexObsID::getTCDescFromChar
static std::string getTCDescFromChar(char c)
Definition: RinexObsID.hpp:326
gnsstk::RinexObsID::getOTChars
static std::string getOTChars()
Definition: RinexObsID.cpp:438
gnsstk::RinexObsID::char2tc
static GNSSTK_EXPORT std::map< char, TrackingCode > char2tc
Definition: RinexObsID.hpp:287
gnsstk::ObsID::otDesc
static GNSSTK_EXPORT std::map< ObservationType, std::string > otDesc
Definition: ObsID.hpp:218
RinexObsHeader.hpp
gnsstk::RinexObsID::idCreator
static RinexObsID idCreator(const std::string &id, const std::string &desc="")
Definition: RinexObsID.cpp:395
gnsstk::RinexObsID::tc2char
static GNSSTK_EXPORT std::map< TrackingCode, char > tc2char
Definition: RinexObsID.hpp:290
gnsstk::RinexObsID::char2cb
static GNSSTK_EXPORT std::map< char, CarrierBand > char2cb
Definition: RinexObsID.hpp:286
ObsID.hpp
gnsstk::RinexObsID::cb2char
static GNSSTK_EXPORT std::map< CarrierBand, char > cb2char
Definition: RinexObsID.hpp:289
gnsstk::ObsID::type
ObservationType type
Definition: ObsID.hpp:199
gnsstk::TrackingCode
TrackingCode
Definition: TrackingCode.hpp:64
std
Definition: Angle.hpp:142
gnsstk::RinexObsID::ot2char
static GNSSTK_EXPORT std::map< ObservationType, char > ot2char
Definition: RinexObsID.hpp:288
GNSSTK_THROW
#define GNSSTK_THROW(exc)
Definition: Exception.hpp:366
gnsstk::Rinex3ObsBase
Definition: Rinex3ObsBase.hpp:59
gnsstk::RinexObsID::newID
static RinexObsID newID(const std::string &id, const std::string &desc="")
Definition: RinexObsID.cpp:380
gnsstk::ObsID::cbDesc
static GNSSTK_EXPORT std::map< CarrierBand, std::string > cbDesc
Definition: ObsID.hpp:217
gnsstk::ObservationType
ObservationType
The type of observation, mostly used by ObsID.
Definition: ObservationType.hpp:55


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