NavMessageID.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 //
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 #ifndef GNSSTK_NAVMESSAGEID_HPP
40 #define GNSSTK_NAVMESSAGEID_HPP
41 
42 #include <iostream>
43 #include "NavSatelliteID.hpp"
44 #include "NavMessageType.hpp"
45 
46 namespace gnsstk
47 {
49 
50 
53  {
54  public:
58  {}
62  {}
64  bool operator<(const NavMessageID& right) const
65  {
66  if (messageType < right.messageType)
67  return true;
68  if (messageType > right.messageType)
69  return false;
70  return NavSatelliteID::operator<(right);
71  }
73  bool operator>(const NavMessageID& right) const
74  {
75  if (messageType > right.messageType)
76  return true;
77  if (messageType < right.messageType)
78  return false;
79  return (!NavSatelliteID::operator<(right) &&
80  NavSatelliteID::operator!=(right));
81  }
83  bool operator==(const NavMessageID& right) const
84  {
85  // std::cerr << __PRETTY_FUNCTION__ << std::endl;
86  return ((messageType == right.messageType) &&
87  NavSatelliteID::operator==(right));
88  }
90  bool operator!=(const NavMessageID& right) const
91  {
92  return ((messageType != right.messageType) ||
93  NavSatelliteID::operator!=(right));
94  }
98  };
99 
100 
101  typedef std::set<NavMessageID> NavMessageIDSet;
102 
103  inline std::ostream& operator<<(std::ostream& s, const NavMessageID& nmid)
104  {
105  s << StringUtils::asString(nmid.messageType) << " "
106  << static_cast<NavSatelliteID>(nmid);
107  return s;
108  }
109 
111 
112 }
113 
114 #endif // GNSSTK_NAVMESSAGEID_HPP
gnsstk::NavMessageID
Class used to identify/categorize navigation message data.
Definition: NavMessageID.hpp:52
gnsstk::NavMessageID::operator>
bool operator>(const NavMessageID &right) const
Other ordering operator.
Definition: NavMessageID.hpp:73
gnsstk::NavSatelliteID::operator<
bool operator<(const NavSatelliteID &right) const
Sorting so we can use this class as a map key.
Definition: NavSatelliteID.cpp:140
gnsstk::NavMessageID::NavMessageID
NavMessageID()
Initialize message type to Unknown.
Definition: NavMessageID.hpp:56
gnsstk::NavMessageID::NavMessageID
NavMessageID(const NavSatelliteID &sat, NavMessageType nmt)
Convenience constructor from NavSatelliteID.
Definition: NavMessageID.hpp:60
gnsstk::NavMessageID::operator<
bool operator<(const NavMessageID &right) const
Ordering operator.
Definition: NavMessageID.hpp:64
gnsstk::NavMessageID::messageType
NavMessageType messageType
Definition: NavMessageID.hpp:97
gnsstk::NavSatelliteID
Definition: NavSatelliteID.hpp:57
NavSatelliteID.hpp
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::NavMessageID::operator!=
bool operator!=(const NavMessageID &right) const
Implicit != not available.
Definition: NavMessageID.hpp:90
NavMessageType.hpp
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexStoreStrategy::Unknown
@ Unknown
Unknown or uninitialized stategy value.
gnsstk::NavSatelliteID::sat
SatID sat
ID of satellite to which the nav data applies.
Definition: NavSatelliteID.hpp:169
gnsstk::operator<<
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
Definition: ObsEpochMap.cpp:54
gnsstk::NavMessageType
NavMessageType
Identify different types of navigation message data.
Definition: NavMessageType.hpp:59
gnsstk::NavMessageID::operator==
bool operator==(const NavMessageID &right) const
Comparison operator, obv.
Definition: NavMessageID.hpp:83
gnsstk::NavMessageIDSet
std::set< NavMessageID > NavMessageIDSet
Definition: NavMessageID.hpp:101


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