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 #ifndef GPSTK_SATELLITESYSTEM_HPP
47 #define GPSTK_SATELLITESYSTEM_HPP
48 
49 #include <string>
50 #include "EnumIterator.hpp"
51 
52 namespace gpstk
53 {
54       /// Supported satellite systems
55    enum class SatelliteSystem
56    {
57       Unknown,
58       GPS,
59       Galileo,
60       Glonass,
61       Geosync,
62       LEO,
63       Transit,
64       BeiDou,      ///< aka Compass
65       QZSS,
66       IRNSS,       ///< Official name changed from IRNSS to NavIC
67       Mixed,
68       UserDefined,
69       Last,        ///< Used to verify that all items are described at compile time
70    }; // enum class SatelliteSystem
71 
72       /** Define an iterator so C++11 can do things like
73        * for (SatelliteSystem i : SatelliteSystemIterator()) */
74    typedef EnumIterator<SatelliteSystem, SatelliteSystem::Unknown, SatelliteSystem::Last> SatelliteSystemIterator;
75 
76    namespace StringUtils
77    {
78          /// Convert a SatelliteSystem to a whitespace-free string name.
79       std::string asString(SatelliteSystem e) throw();
80          /// Convert a string name to an SatelliteSystem
81       SatelliteSystem asSatelliteSystem(const std::string& s) throw();
82    }
83 
84       /** Translate system enumeration to its string representation.
85        * @note The string representation is being used in file
86        *   formats, e.g. RawNavCSVHeader.  The string values should
87        *   not be changed if at all possible, as that would break
88        *   the ability to read older files.
89        * @note Any new systems should not contain spaces in the
90        *   string values.
91        * @note The translations here should precisely match those
92        *   in convertStringToSatelliteSystem.
93        * @param[in] s The system to get the string name of.
94        * @return A space-free string containing the name of the GNSS.
95        */
convertSatelliteSystemToString(SatelliteSystem s)96    inline std::string convertSatelliteSystemToString(SatelliteSystem s)
97    { return StringUtils::asString(s); }
98 
99       /** Translate GNSS names as strings into system enumeration
100        * equivalents.
101        * @see convertSatelliteSystemToString
102        * @param[in] s The GNSS name to convert to enumeration.
103        * @return An enumeration equivalent of the given string.
104        *   Unknown is returned for any names that do not
105        *   exactly match known values.
106        */
convertStringToSatelliteSystem(const std::string & s)107    inline SatelliteSystem convertStringToSatelliteSystem(
108       const std::string& s)
109    { return StringUtils::asSatelliteSystem(s); }
110 
111 } // namespace gpstk
112 
113 #endif // GPSTK_SATELLITESYSTEM_HPP
114