NavSignalID.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 "NavSignalID.hpp"
40 
41 namespace gnsstk
42 {
45  : system(SatelliteSystem::Unknown),
46  nav(NavType::Unknown)
47  {
48  }
49 
50 
53  NavType nmt, uint32_t mcode, uint32_t mcodeMask)
54  : system(sys),
55  obs(gnsstk::ObservationType::NavMsg, car, track),
56  nav(nmt)
57  {
58  obs.setMcodeBits(mcode, mcodeMask);
59  }
60 
61 
64  : system(sys),
65  obs(oid),
66  nav(nmt)
67  {
68  }
69 
70 
71 // Use this macro in operator<< to figure out why things fail
72 #if 0
73 #define ORDERRET(RV) { \
74  std::cerr << "order() returning " << RV << " @ " << __LINE__ \
75  << std::endl; \
76  return RV; \
77  }
78 #else
79 #define ORDERRET(RV) return RV;
80 #endif
81 
82  int NavSignalID ::
83  order(const NavSignalID& right) const
84  {
85  // std::cerr << __PRETTY_FUNCTION__ << std::endl;
86  if (system < right.system) ORDERRET(-1);
87  if (system > right.system) ORDERRET(1);
88  if (obs < right.obs) ORDERRET(-1);
89  if (right.obs < obs) ORDERRET(1);
90  if ((nav != NavType::Any) && (right.nav != NavType::Any))
91  {
92  if (nav < right.nav) ORDERRET(-1);
93  if (nav > right.nav) ORDERRET(1);
94  }
95  ORDERRET(0);
96  }
97 
98 
99  bool NavSignalID ::
100  isWild() const
101  {
102  return (obs.isWild() || (nav == NavType::Any));
103  }
104 }
gnsstk::NavSignalID::nav
NavType nav
Navigation message structure of this signal.
Definition: NavSignalID.hpp:96
gnsstk::ObsID::isWild
bool isWild() const
Return true if any of the data are wildcard values.
Definition: ObsID.cpp:159
gnsstk::CarrierBand
CarrierBand
Definition: CarrierBand.hpp:54
gnsstk::SatelliteSystem
SatelliteSystem
Supported satellite systems.
Definition: SatelliteSystem.hpp:55
example5.oid
oid
Definition: example5.py:29
gnsstk::NavSignalID::isWild
virtual bool isWild() const
return true if any of the fields are set to match wildcards.
Definition: NavSignalID.cpp:100
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexStoreStrategy::Unknown
@ Unknown
Unknown or uninitialized stategy value.
gnsstk::ObservationType::NavMsg
@ NavMsg
Navigation Message data.
gnsstk::NavSignalID::order
int order(const NavSignalID &right) const
Definition: NavSignalID.cpp:83
gnsstk::NavType::Any
@ Any
Used to match any nav code.
gnsstk::NavSignalID::obs
ObsID obs
Carrier, tracking code, etc.
Definition: NavSignalID.hpp:95
gnsstk::NavSignalID::system
SatelliteSystem system
GNSS for this signal.
Definition: NavSignalID.hpp:94
gnsstk::ObsID::setMcodeBits
void setMcodeBits(uint32_t newval, uint32_t newmask=-1)
Set the value of mcode while simultaneously setting the mask.
Definition: ObsID.hpp:170
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::NavSignalID
Class used to identify navigation data signal types.
Definition: NavSignalID.hpp:54
gnsstk::TrackingCode
TrackingCode
Definition: TrackingCode.hpp:64
gnsstk::NavType
NavType
Supported navigation types.
Definition: NavType.hpp:58
ORDERRET
#define ORDERRET(RV)
Definition: NavSignalID.cpp:79
NavSignalID.hpp
gnsstk::NavSignalID::NavSignalID
NavSignalID()
Set all data members to "Unknown".
Definition: NavSignalID.cpp:44
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:40