Go to the documentation of this file.
70 #define CONTEST(RINEXCODE, CARRIERBAND, TRACKINGCODE) \
73 TUCSM("RinexObsID(\"" RINEXCODE "\")"); \
74 gnsstk::RinexObsID obs(RINEXCODE, \
75 gnsstk::Rinex3ObsBase::currentVersion); \
76 TUASSERTE(gnsstk::ObservationType, \
77 gnsstk::ObservationType::Phase, \
79 TUASSERTE(gnsstk::CarrierBand, \
80 CARRIERBAND, obs.band); \
81 TUASSERTE(gnsstk::TrackingCode, \
82 TRACKINGCODE, obs.code); \
83 gnsstk::RinexObsID obs2(gnsstk::ObservationType::Phase, \
84 CARRIERBAND, TRACKINGCODE); \
85 TUASSERTE(std::string, std::string(RINEXCODE).substr(1), \
87 gnsstk::RinexObsID wildcard("****", \
88 gnsstk::Rinex3ObsBase::currentVersion); \
89 TUASSERTE(gnsstk::RinexObsID, wildcard, obs); \
91 catch (gnsstk::Exception& exc) \
93 cerr << exc << endl; \
94 TUFAIL("Unexpected exception"); \
96 catch (std::exception& exc) \
98 TUFAIL("Unexpected exception " + std::string(exc.what())); \
102 TUFAIL("Unknown exception"); \
111 unsigned decodeTest();
115 unsigned fromStringConstructorTest();
116 unsigned newIDTest();
127 const std::string& bandCode,
bool prValid =
true);
134 TUDEF(
"RinexObsID",
"RinexObsID(string)");
136 std::string codes(
"CSLXPWYM");
137 for (
unsigned i = 0; i < codes.length(); i++)
139 testCodes(testFramework,
"G", std::string(
"1") + codes[i]);
141 testCodes(testFramework,
"G",
"1N",
false);
144 for (
unsigned i = 0; i < codes.length(); i++)
146 testCodes(testFramework,
"G", std::string(
"2") + codes[i]);
148 testCodes(testFramework,
"G",
"2N",
false);
151 for (
unsigned i = 0; i < codes.length(); i++)
153 testCodes(testFramework,
"G", std::string(
"5") + codes[i]);
157 for (
unsigned i = 0; i < codes.length(); i++)
159 testCodes(testFramework,
"R", std::string(
"1") + codes[i]);
163 for (
unsigned i = 0; i < codes.length(); i++)
165 testCodes(testFramework,
"R", std::string(
"4") + codes[i]);
169 for (
unsigned i = 0; i < codes.length(); i++)
171 testCodes(testFramework,
"R", std::string(
"2") + codes[i]);
175 for (
unsigned i = 0; i < codes.length(); i++)
177 testCodes(testFramework,
"R", std::string(
"6") + codes[i]);
181 for (
unsigned i = 0; i < codes.length(); i++)
183 testCodes(testFramework,
"R", std::string(
"3") + codes[i]);
187 for (
unsigned i = 0; i < codes.length(); i++)
189 testCodes(testFramework,
"E", std::string(
"1") + codes[i]);
193 for (
unsigned i = 0; i < codes.length(); i++)
195 testCodes(testFramework,
"E", std::string(
"5") + codes[i]);
199 for (
unsigned i = 0; i < codes.length(); i++)
201 testCodes(testFramework,
"E", std::string(
"7") + codes[i]);
205 for (
unsigned i = 0; i < codes.length(); i++)
207 testCodes(testFramework,
"E", std::string(
"8") + codes[i]);
211 for (
unsigned i = 0; i < codes.length(); i++)
213 testCodes(testFramework,
"E", std::string(
"6") + codes[i]);
216 testCodes(testFramework,
"S",
"1C");
219 for (
unsigned i = 0; i < codes.length(); i++)
221 testCodes(testFramework,
"S", std::string(
"5") + codes[i]);
225 TUCSM(
"RinexObsID(\"GX1 \")");
235 TUCSM(
"RinexObsID(\"GI1 \")");
240 TUCSM(
"RinexObsID(\"GI2 \")");
245 TUCSM(
"RinexObsID(\"RI3 \")");
250 TUCSM(
"RinexObsID(\"RI4 \")");
255 TUCSM(
"RinexObsID(\"GI5 \")");
260 TUCSM(
"RinexObsID(\"EI6 \")");
265 TUCSM(
"RinexObsID(\"CI7 \")");
274 TUCSM(
"RinexObsID(\"EI8 \")");
279 TUCSM(
"RinexObsID(\"II9 \")");
286 TUCSM(
"RinexObsID() 3.02");
315 TUCSM(
"RinexObsID() 3.03");
322 TUCSM(
"RinexObsID() 3.04");
367 const std::string& system,
368 const std::string& bandCode,
371 std::string invalidCodes(
"ABEFGHIJKMNOPQRTUVWXYZabcdefghijklmnopqrstuvwxyz"),
377 for (
unsigned i = 0; i < invalidCodes.length(); i++)
379 std::string rin3code = system + invalidCodes[i] + bandCode;
383 TUCSM(
"::isValidRinexObsID("+rin3code+
")");
386 for (
unsigned i = 0; i < validCodes.length(); i++)
388 std::string rin3code = system + validCodes[i] + bandCode;
389 TUCSM(
"RinexObsID("+rin3code+
")");
392 TUCSM(
"::isValidRinexObsID("+rin3code+
")");
401 TUDEF(
"RinexObsID",
"RinexObsID(string)");
402 std::string failMesg;
405 failMesg =
"[testing] RinexObsID constructor from invalid string, [expected]"
406 " exception gnsstk::Exception, [actual] threw no exception";
578 TUDEF(
"RinexObsID",
"newID");
579 std::string failMesg;
581 failMesg =
"[testing] RinexObsID::newID to redefine existing ID, [expected]"
582 " exception gnsstk::Exception, [actual] threw no exception";
605 failMesg =
"[testing] RinexObsID::newID to redefine existing ID, [expected]"
606 " exception gnsstk::Exception, [actual] threw no exception";
623 unsigned errorTotal = 0;
629 cout <<
"Total Failures for " << __FILE__ <<
": " << errorTotal << endl;
@ B3AIQ
BeiDou B3A I+Q code.
@ E5abIQ
Galileo E5 I+Q combined tracking.
@ L5IQ
Modernized GPS L5 civil I+Q combined tracking.
std::string asString() const
@ YCodeless
Encrypted legacy GPS precise code, squaring codeless tracking.
@ L1CD
Modernized GPS L1C civil code tracking (data)
@ E6ABC
Galileo E6 A+B+C combined tracking.
@ L5Q
Modernized GPS L5 civil quadrature.
#define TUCATCH(STATEMENT)
@ B2bIQ
BeiDou B2b I+Q code.
@ L1CP
Modernized GPS L1C civil code tracking (pilot)
@ E5bQ
Galileo E5b Q code.
static GNSSTK_EXPORT std::map< char, ObservationType > char2ot
@ L5SQ
QZSS L5S I+Q combined tracking.
@ L1OCD
GLONASS L1 OCd code.
@ E1A
Galileo L1 PRS code.
@ E6A
Galileo E6 PRS code.
@ L2CL
Modernized GPS L2 civil L code.
bool isValidRinexObsID(const std::string &strID)
@ E1B
Galileo E1-B signal, supporting OS/HAS/SoL.
@ L2OCP
GLONASS L2 OCp code.
@ L6E
QZSS L6 Block II E code.
@ Phase
accumulated phase, in cycles
#define TUASSERTE(TYPE, EXP, GOT)
@ Y
Encrypted legacy GPS precise code.
@ Any
Used to match any carrier band.
@ L5I
Modernized GPS L5 civil in-phase.
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
static const GNSSTK_EXPORT double currentVersion
@ E6BC
Galileo E6 B+C combined tracking.
@ L1OCP
GLONASS L1 OCp code.
@ Range
pseudorange, in meters
@ B2abIQ
BeiDou B2a+B I+Q code.
@ MDP
Modernized GPS military unique code.
@ E5abI
Galileo E5 I code.
@ L2CSI
GLONASS L2 CSI code.
@ E5aIQ
Galileo E5a I+Q combined tracking.
@ Standard
Legacy Glonass civil signal.
@ E5aI
Galileo E5a I code.
@ CA
Legacy GPS civil code.
@ Any
Used to match any observation type.
@ B1CDP
BeiDou B1C D+P code.
@ B2abI
BeiDou B2a+b I code.
@ L2CSIL2OCp
GLONASS L2 CSI+OCp combined tracking.
@ B2aIQ
BeiDou B2a I+Q code.
@ L2CML
Modernized GPS L2 civil M+L combined tracking.
@ Ztracking
Encrypted legacy GPS precise code, codeless Z tracking.
@ B3IQ
BeiDou B3 I+Q code.
@ E5ab
Galileo E5, BeiDou B2.
@ L6DE
QZSS L6 Block II D+E combined tracking.
@ L3OCD
Glonass L3 I code.
@ L1
GPS L1, Galileo E1, SBAS L1, QZSS L1, BeiDou L1.
@ B1IQ
BeiDou B1 I+Q code.
@ E1BC
Galileo E1 B+C combined tracking.
@ BCodeless
BeiDou codeless tracking.
@ E5abQ
Galileo E5 Q code.
#define TUDEF(CLASS, METHOD)
static GNSSTK_EXPORT std::map< char, TrackingCode > char2tc
@ P
Legacy GPS precise code.
@ E5bIQ
Galileo E5b I+Q combined tracking.
@ B2abQ
BeiDou B2a+B Q code.
@ B2IQ
BeiDou B2 I+Q code.
@ L1OCDP
GLONASS L1 OCd+OCp combined tracking.
std::ostream & operator<<(std::ostream &s, gnsstk::StringUtils::FFLead v)
#define CONTEST(RINEXCODE, CARRIERBAND, TRACKINGCODE)
@ E6B
Galileo E6-b signal.
@ L5SIQ
QZSS L5S quadrature.
static GNSSTK_EXPORT std::map< char, CarrierBand > char2cb
@ L2CM
Modernized GPS L2 civil M code.
@ Semicodeless
Encrypted legacy GPS precise code, other codeless tracking.
@ E5bI
Galileo E5b I code.
@ L3OCP
Glonass L3 Q code.
@ E5aQ
Galileo E5a Q code.
@ E6C
Galileo E6 Dataless code.
#define TUASSERTFE(EXP, GOT)
@ Precise
Legacy Glonass precise signal.
unsigned decodeTest()
Make sure RinexObsID can decode all valid observation codes.
@ L1CDP
Modernized GPS L1C civil code tracking (pilot + data)
@ E1ABC
Galileo E1 A+B+C combined tracking.
static RinexObsID newID(const std::string &id, const std::string &desc="")
@ L3OCDP
Glonass L3 I+Q combined tracking.
@ E1C
Galileo E1 Dataless code.
@ Undefined
Code is known to be undefined (as opposed to unknown)
@ Any
Used to match any tracking code.
@ LEXSL
QZSS LEX(6) combined tracking.
void testCodes(gnsstk::TestUtil &testFramework, const std::string &system, const std::string &bandCode, bool prValid=true)
unsigned fromStringConstructorTest()
@ L5
GPS L5, Galileo E5a, SBAS L5, QZSS L5, BeiDou B2a, NavIC L5.
ObservationType
The type of observation, mostly used by ObsID.
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:41