SatID.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_SATID_HPP
40 #define GNSSTK_SATID_HPP
41 
42 #include <iostream>
43 #include <iomanip>
44 #include <sstream>
45 #include "gps_constants.hpp"
46 #include "SatelliteSystem.hpp"
47 
53 namespace gnsstk
54 {
55  // forward declarations
56  class SatID;
57 // std::istream& operator<<(std::istream& s, SatID& p);
58 
60 
61 
89  class SatID
90  {
91  public:
93  SatID();
94 
98  SatID(int p, SatelliteSystem s);
104  explicit SatID(int p);
110  explicit SatID(SatelliteSystem s);
111 
116  void makeWild();
118  bool isWild() const;
119 
120  // operator=, copy constructor and destructor built by compiler
121 
122 
124  void dump(std::ostream& s) const;
125 
127  bool operator==(const SatID& right) const;
128 
130  bool operator!=(const SatID& right) const
131  { return !(operator==(right)); }
132 
134  bool operator<(const SatID& right) const;
135 
137  bool operator>(const SatID& right) const
138  { return (!operator<(right) && !operator==(right)); }
139 
141  bool operator<=(const SatID& right) const
142  { return (operator<(right) || operator==(right)); }
143 
145  bool operator>=(const SatID& right) const
146  { return !(operator<(right)); }
147 
152  bool isValid() const;
153 
154  int id;
155  bool wildId;
157  bool wildSys;
158  }; // class SatID
159 
161  inline std::ostream& operator<<(std::ostream& s, const SatID& p)
162  {
163  p.dump(s);
164  return s;
165  }
166 
168 
169  namespace StringUtils
170  {
172 
173 
175  inline std::string asString(const SatID& p)
176  {
177  std::ostringstream oss;
178  p.dump(oss);
179  return oss.str();
180  }
181  }
182 
183 } // namespace gnsstk
184 
185 #endif
gnsstk::SatID::isValid
bool isValid() const
Definition: SatID.cpp:135
gnsstk::SatID::id
int id
Satellite identifier, e.g. PRN.
Definition: SatID.hpp:154
gnsstk::SatID::makeWild
void makeWild()
Definition: SatID.cpp:74
gnsstk::SatID::operator==
bool operator==(const SatID &right) const
operator == for SatID
Definition: SatID.cpp:103
SatelliteSystem.hpp
gnsstk::SatID::dump
void dump(std::ostream &s) const
Convenience output method.
Definition: SatID.cpp:88
gnsstk::SatelliteSystem
SatelliteSystem
Supported satellite systems.
Definition: SatelliteSystem.hpp:55
gps_constants.hpp
gnsstk::SatID
Definition: SatID.hpp:89
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::SatID::wildId
bool wildId
If true, any satellite matches.
Definition: SatID.hpp:155
gnsstk::SatID::operator>
bool operator>(const SatID &right) const
operator > for SatID
Definition: SatID.hpp:137
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::SatID::operator>=
bool operator>=(const SatID &right) const
operator >= for SatID
Definition: SatID.hpp:145
gnsstk::SatID::operator<=
bool operator<=(const SatID &right) const
operator <= for SatID
Definition: SatID.hpp:141
gnsstk::SatID::wildSys
bool wildSys
If true, any system matches.
Definition: SatID.hpp:157
gnsstk::SatID::isWild
bool isWild() const
return true if any of the fields are set to match wildcards.
Definition: SatID.cpp:81
gnsstk::operator<<
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
Definition: ObsEpochMap.cpp:54
gnsstk::SatID::system
SatelliteSystem system
System for this satellite.
Definition: SatID.hpp:156
gnsstk::SatID::operator<
bool operator<(const SatID &right) const
operator < for SatID : order by system, id
Definition: SatID.cpp:113
gnsstk::SatID::operator!=
bool operator!=(const SatID &right) const
operator != for SatID
Definition: SatID.hpp:130
gnsstk::SatID::SatID
SatID()
Initialize with invalid data with no wildcards.
Definition: SatID.cpp:44


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