1 /** @warning This code is automatically generated.
2  *
3  *  DO NOT EDIT THIS CODE BY HAND.
4  *
5  *  Refer to the documenation in the toolkit_docs gitlab project.
6  */
7 
8 //==============================================================================
9 //
10 //  This file is part of GPSTk, the GPS Toolkit.
11 //
12 //  The GPSTk 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 GPSTk 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 GPSTk; 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-2020, 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 gpstk
49 {
50    namespace StringUtils
51    {
asString(NavType e)52       std::string asString(NavType e) throw()
53       {
54          switch (e)
55          {
56             case NavType::GPSLNAV:   return "GPS_LNAV";
57             case NavType::GPSCNAVL2: return "GPS_CNAV_L2";
58             case NavType::GPSCNAVL5: return "GPS_CNAV_L5";
59             case NavType::GPSCNAV2:  return "GPS_CNAV2";
60             case NavType::GPSMNAV:   return "GPS_MNAV";
61             case NavType::BeiDou_D1: return "Beidou_D1";
62             case NavType::BeiDou_D2: return "Beidou_D2";
63             case NavType::GloCivilF: return "GloCivilF";
64             case NavType::GloCivilC: return "GloCivilC";
65             case NavType::GalFNAV:   return "GalFNAV";
66             case NavType::GalINAV:   return "GalINAV";
67             case NavType::IRNSS_SPS: return "IRNSS_SPS";
68             case NavType::Unknown:   return "Unknown";
69             default:                 return "???";
70          } // switch (e)
71       } // asString(NavType)
72 
73 
asNavType(const std::string & s)74       NavType asNavType(const std::string& s) throw()
75       {
76          if (s == "GPS_LNAV")
77             return NavType::GPSLNAV;
78          if (s == "GPS_CNAV_L2")
79             return NavType::GPSCNAVL2;
80          if (s == "GPS_CNAV_L5")
81             return NavType::GPSCNAVL5;
82          if (s == "GPS_CNAV2")
83             return NavType::GPSCNAV2;
84          if (s == "GPS_MNAV")
85             return NavType::GPSMNAV;
86          if (s == "Beidou_D1")
87             return NavType::BeiDou_D1;
88          if (s == "Beidou_D2")
89             return NavType::BeiDou_D2;
90          if (s == "GloCivilF")
91             return NavType::GloCivilF;
92          if (s == "GloCivilC")
93             return NavType::GloCivilC;
94          if (s == "GalFNAV")
95             return NavType::GalFNAV;
96          if (s == "GalINAV")
97             return NavType::GalINAV;
98          if (s == "IRNSS_SPS")
99             return NavType::IRNSS_SPS;
100          if (s == "Unknown")
101             return NavType::Unknown;
102          return NavType::Unknown;
103       } // asNavType(string)
104    } // namespace StringUtils
105 } // namespace gpstk
106