core
lib
GNSSEph
NavType.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 "
NavType.hpp
"
47
48
namespace
gnsstk
49
{
50
namespace
StringUtils
51
{
52
std::string
asString
(
NavType
e) noexcept
53
{
54
switch
(e)
55
{
56
case
NavType::Unknown
:
return
"Unknown"
;
57
case
NavType::Any
:
return
"Any"
;
58
case
NavType::GPSLNAV
:
return
"GPS_LNAV"
;
59
case
NavType::GPSCNAVL2
:
return
"GPS_CNAV_L2"
;
60
case
NavType::GPSCNAVL5
:
return
"GPS_CNAV_L5"
;
61
case
NavType::GPSCNAV2
:
return
"GPS_CNAV2"
;
62
case
NavType::GPSMNAV
:
return
"GPS_MNAV"
;
63
case
NavType::BeiDou_D1
:
return
"Beidou_D1"
;
64
case
NavType::BeiDou_D2
:
return
"Beidou_D2"
;
65
case
NavType::GloCivilF
:
return
"GloCivilF"
;
66
case
NavType::GloCivilC
:
return
"GloCivilC"
;
67
case
NavType::GalFNAV
:
return
"GalFNAV"
;
68
case
NavType::GalINAV
:
return
"GalINAV"
;
69
case
NavType::IRNSS_SPS
:
return
"IRNSS_SPS"
;
70
default
:
return
"???"
;
71
}
// switch (e)
72
}
// asString(NavType)
73
74
75
NavType
asNavType
(
const
std::string& s) noexcept
76
{
77
if
(s ==
"Unknown"
)
78
return
NavType::Unknown
;
79
if
(s ==
"Any"
)
80
return
NavType::Any
;
81
if
(s ==
"GPS_LNAV"
)
82
return
NavType::GPSLNAV
;
83
if
(s ==
"GPS_CNAV_L2"
)
84
return
NavType::GPSCNAVL2
;
85
if
(s ==
"GPS_CNAV_L5"
)
86
return
NavType::GPSCNAVL5
;
87
if
(s ==
"GPS_CNAV2"
)
88
return
NavType::GPSCNAV2
;
89
if
(s ==
"GPS_MNAV"
)
90
return
NavType::GPSMNAV
;
91
if
(s ==
"Beidou_D1"
)
92
return
NavType::BeiDou_D1
;
93
if
(s ==
"Beidou_D2"
)
94
return
NavType::BeiDou_D2
;
95
if
(s ==
"GloCivilF"
)
96
return
NavType::GloCivilF
;
97
if
(s ==
"GloCivilC"
)
98
return
NavType::GloCivilC
;
99
if
(s ==
"GalFNAV"
)
100
return
NavType::GalFNAV
;
101
if
(s ==
"GalINAV"
)
102
return
NavType::GalINAV
;
103
if
(s ==
"IRNSS_SPS"
)
104
return
NavType::IRNSS_SPS
;
105
return
NavType::Unknown
;
106
}
// asNavType(string)
107
}
// namespace StringUtils
108
}
// namespace gnsstk
gnsstk::NavType::Unknown
@ Unknown
Uninitialized value.
gnsstk::StringUtils::asNavType
NavType asNavType(const std::string &s) noexcept
Convert a string name to an NavType.
Definition:
NavType.cpp:75
gnsstk::NavType::GPSMNAV
@ GPSMNAV
gnsstk::NavType::BeiDou_D1
@ BeiDou_D1
gnsstk::NavType::GalINAV
@ GalINAV
NavType.hpp
gnsstk::NavType::IRNSS_SPS
@ IRNSS_SPS
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition:
IonexStoreStrategy.cpp:46
gnsstk::NavType::GloCivilF
@ GloCivilF
gnsstk
For Sinex::InputHistory.
Definition:
BasicFramework.cpp:50
gnsstk::NavType::GPSLNAV
@ GPSLNAV
gnsstk::NavType::Any
@ Any
Used to match any nav code.
gnsstk::NavType::GloCivilC
@ GloCivilC
gnsstk::NavType::GPSCNAVL2
@ GPSCNAVL2
gnsstk::NavType::BeiDou_D2
@ BeiDou_D2
gnsstk::NavType
NavType
Supported navigation types.
Definition:
NavType.hpp:58
gnsstk::NavType::GPSCNAVL5
@ GPSCNAVL5
gnsstk::NavType::GPSCNAV2
@ GPSCNAV2
gnsstk::NavType::GalFNAV
@ GalFNAV
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40