NavMessageID_T.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 "NavMessageID.hpp"
40 #include "TestUtil.hpp"
41 
42 namespace gnsstk
43 {
44  std::ostream& operator<<(std::ostream& s, gnsstk::NavMessageType e)
45  {
46  s << StringUtils::asString(e);
47  return s;
48  }
49 
50  std::ostream& operator<<(std::ostream& s, gnsstk::SatelliteSystem e)
51  {
52  s << StringUtils::asString(e);
53  return s;
54  }
55 }
56 
57 
59 {
60 public:
61  unsigned constructorTest();
62 };
63 
64 
65 unsigned NavMessageID_T ::
67 {
68  TUDEF("NavMessageID", "NavMessageID");
69  // default constructor test
72  uut1.messageType);
73  // constructor 2 test
79  obsID.freqOffs = -7;
80  obsID.freqOffsWild = false;
81  obsID.setMcodeBits(0x12345678, 0xffffffff);
82  gnsstk::NavSatelliteID sat(3, satID, obsID, navID);
85  uut2.messageType);
86  TUASSERTE(gnsstk::SatID, satID3, uut2.sat);
87  TUASSERTE(gnsstk::SatID, satID, uut2.xmitSat);
89  TUASSERTE(gnsstk::ObsID, obsID, uut2.obs);
91  TURETURN();
92 }
93 
94 
95 int main()
96 {
97  NavMessageID_T testClass;
98  unsigned errorTotal = 0;
99 
100  // make sure we can see the details in the event of miscompare
101  gnsstk::ObsID::verbose = true;
102  errorTotal += testClass.constructorTest();
103 
104  std::cout << "Total Failures for " << __FILE__ << ": " << errorTotal
105  << std::endl;
106 
107  return errorTotal;
108 }
gnsstk::NavSignalID::nav
NavType nav
Navigation message structure of this signal.
Definition: NavSignalID.hpp:96
gnsstk::NavMessageID
Class used to identify/categorize navigation message data.
Definition: NavMessageID.hpp:52
TUASSERTE
#define TUASSERTE(TYPE, EXP, GOT)
Definition: TestUtil.hpp:81
gnsstk::NavMessageID::messageType
NavMessageType messageType
Definition: NavMessageID.hpp:97
gnsstk::NavSatelliteID
Definition: NavSatelliteID.hpp:57
gnsstk::SatelliteSystem
SatelliteSystem
Supported satellite systems.
Definition: SatelliteSystem.hpp:55
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
NavMessageID_T
Definition: NavMessageID_T.cpp:58
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::NavType::GPSLNAV
@ GPSLNAV
gnsstk::ObservationType::NavMsg
@ NavMsg
Navigation Message data.
gnsstk::SatelliteSystem::GPS
@ GPS
gnsstk::TrackingCode::CA
@ CA
Legacy GPS civil 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
TestUtil.hpp
NavMessageID.hpp
gnsstk::NavMessageType::Unknown
@ Unknown
Message type is not known or is uninitialized.
TURETURN
#define TURETURN()
Definition: TestUtil.hpp:232
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
NavMessageID_T::constructorTest
unsigned constructorTest()
Definition: NavMessageID_T.cpp:66
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::CarrierBand::L1
@ L1
GPS L1, Galileo E1, SBAS L1, QZSS L1, BeiDou L1.
TUDEF
#define TUDEF(CLASS, METHOD)
Definition: TestUtil.hpp:56
gnsstk::ObsID::freqOffsWild
bool freqOffsWild
True=Treat freqOffs as a wildcard when matching.
Definition: ObsID.hpp:204
main
int main()
Definition: NavMessageID_T.cpp:95
gnsstk::ObsID::freqOffs
int freqOffs
GLONASS frequency offset.
Definition: ObsID.hpp:203
gnsstk::NavMessageType
NavMessageType
Identify different types of navigation message data.
Definition: NavMessageType.hpp:59
gnsstk::NavID
Definition: NavID.hpp:61
gnsstk::NavType
NavType
Supported navigation types.
Definition: NavType.hpp:58
gnsstk::NavSatelliteID::xmitSat
SatID xmitSat
ID of the satellite transmitting the nav data.
Definition: NavSatelliteID.hpp:170
gnsstk::ObsID::verbose
static GNSSTK_EXPORT bool verbose
Definition: ObsID.hpp:223
gnsstk::NavMessageType::Almanac
@ Almanac
Low-precision orbits for other than the transmitting SV.


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