ObservationType.cpp
Go to the documentation of this file.
1 
8 //==============================================================================
9 //
10 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
11 //
12 // The GNSSTk is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU Lesser General Public License as published
14 // by the Free Software Foundation; either version 3.0 of the License, or
15 // any later version.
16 //
17 // The GNSSTk is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU Lesser General Public License for more details.
21 //
22 // You should have received a copy of the GNU Lesser General Public
23 // License along with GNSSTk; if not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
25 //
26 // This software was developed by Applied Research Laboratories at the
27 // University of Texas at Austin.
28 // Copyright 2004-2022, The Board of Regents of The University of Texas System
29 //
30 //==============================================================================
31 
32 //==============================================================================
33 //
34 // This software was developed by Applied Research Laboratories at the
35 // University of Texas at Austin, under contract to an agency or agencies
36 // within the U.S. Department of Defense. The U.S. Government retains all
37 // rights to use, duplicate, distribute, disclose, or release this software.
38 //
39 // Pursuant to DoD Directive 523024
40 //
41 // DISTRIBUTION STATEMENT A: This software has been approved for public
42 // release, distribution is unlimited.
43 //
44 //==============================================================================
45 
46 #include "ObservationType.hpp"
47 
48 namespace gnsstk
49 {
50  namespace StringUtils
51  {
52  std::string asString(ObservationType e) noexcept
53  {
54  switch (e)
55  {
56  case ObservationType::Unknown: return "Unknown";
57  case ObservationType::Any: return "Any";
58  case ObservationType::Range: return "Range";
59  case ObservationType::Phase: return "Phase";
60  case ObservationType::Doppler: return "Doppler";
61  case ObservationType::SNR: return "SNR";
62  case ObservationType::Channel: return "Channel";
63  case ObservationType::DemodStat: return "DemodStat";
64  case ObservationType::Iono: return "Iono";
65  case ObservationType::SSI: return "SSI";
66  case ObservationType::LLI: return "LLI";
67  case ObservationType::TrackLen: return "TrackLen";
68  case ObservationType::NavMsg: return "NavMsg";
69  case ObservationType::RngStdDev: return "RngStdDev";
70  case ObservationType::PhsStdDev: return "PhsStdDev";
71  case ObservationType::FreqIndx: return "FreqIndx";
72  case ObservationType::Undefined: return "Undefined";
73  default: return "???";
74  } // switch (e)
75  } // asString(ObservationType)
76 
77 
78  ObservationType asObservationType(const std::string& s) noexcept
79  {
80  if (s == "Unknown")
82  if (s == "Any")
83  return ObservationType::Any;
84  if (s == "Range")
86  if (s == "Phase")
88  if (s == "Doppler")
90  if (s == "SNR")
91  return ObservationType::SNR;
92  if (s == "Channel")
94  if (s == "DemodStat")
96  if (s == "Iono")
97  return ObservationType::Iono;
98  if (s == "SSI")
99  return ObservationType::SSI;
100  if (s == "LLI")
101  return ObservationType::LLI;
102  if (s == "TrackLen")
104  if (s == "NavMsg")
106  if (s == "RngStdDev")
108  if (s == "PhsStdDev")
110  if (s == "FreqIndx")
112  if (s == "Undefined")
115  } // asObservationType(string)
116  } // namespace StringUtils
117 } // namespace gnsstk
gnsstk::ObservationType::Undefined
@ Undefined
Observation type is known to be undefined (as opposed to unknown)
gnsstk::ObservationType::TrackLen
@ TrackLen
Number of continuous epochs of 'good' tracking.
gnsstk::ObservationType::RngStdDev
@ RngStdDev
pseudorange standard deviation, in meters
gnsstk::ObservationType::Phase
@ Phase
accumulated phase, in cycles
gnsstk::ObservationType::DemodStat
@ DemodStat
Demodulator status.
gnsstk::ObservationType::LLI
@ LLI
Loss of Lock Indicator (RINEX)
gnsstk::ObservationType::Channel
@ Channel
Channel number.
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::ObservationType::SNR
@ SNR
Signal strength, in dB-Hz.
gnsstk::ObservationType::Range
@ Range
pseudorange, in meters
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::ObservationType::NavMsg
@ NavMsg
Navigation Message data.
ObservationType.hpp
gnsstk::ObservationType::Any
@ Any
Used to match any observation type.
gnsstk::ObservationType::PhsStdDev
@ PhsStdDev
phase standard deviation, in cycles
gnsstk::ObservationType::Doppler
@ Doppler
Doppler, in Hz.
gnsstk::ObservationType::Unknown
@ Unknown
gnsstk::ObservationType::Iono
@ Iono
Ionospheric delay.
gnsstk::ObservationType::SSI
@ SSI
Signal Strength Indicator (RINEX)
gnsstk::ObservationType::FreqIndx
@ FreqIndx
GLONASS frequency offset index.
gnsstk::StringUtils::asObservationType
ObservationType asObservationType(const std::string &s) noexcept
Convert a string name to an ObservationType.
Definition: ObservationType.cpp:78
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