miscenum.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: miscenum.hpp 2168 2009-11-12 20:03:08Z ocibu $"
00002 
00003 //============================================================================
00004 //
00005 //  This file is part of GPSTk, the GPS Toolkit.
00006 //
00007 //  The GPSTk is free software; you can redistribute it and/or modify
00008 //  it under the terms of the GNU Lesser General Public License as published
00009 //  by the Free Software Foundation; either version 2.1 of the License, or
00010 //  any later version.
00011 //
00012 //  The GPSTk is distributed in the hope that it will be useful,
00013 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 //  GNU Lesser General Public License for more details.
00016 //
00017 //  You should have received a copy of the GNU Lesser General Public
00018 //  License along with GPSTk; if not, write to the Free Software Foundation,
00019 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //
00021 //  Copyright 2007, The University of Texas at Austin
00022 //
00023 //============================================================================
00024 
00031 #ifndef MISCENUM_HPP
00032 #define MISCENUM_HPP
00033 
00034 #include <string>
00035 
00036 namespace gpstk
00037 {
00039    enum CarrierCode
00040    {
00041       ccUnknown = 0,
00042       ccL1 = 1,
00043       ccL2 = 2,
00044       ccL5 = 5,
00045       ccMax
00046    };
00047 
00049    enum RangeCode 
00050    {
00051       rcUnknown  = 0,
00052       rcCA       = 1,
00053       rcPcode    = 2,
00054       rcYcode    = 3,
00055       rcCodeless = 4,
00056       rcCM       = 5,
00057       rcCL       = 6,
00058       rcMcode1   = 7,
00059       rcMcode2   = 8, // This should not be used
00060       rcCMCL     = 9,
00061       rcMax
00062    };
00063 
00065    enum NavCode
00066    {
00067       ncUnknown    = 0, 
00068       ncICD_200_2  = 1, 
00069       ncICD_200_4  = 2, 
00070       ncICD_700_M  = 3, 
00071       ncICD_705_L5 = 4, 
00072       ncMax
00073    };
00074 
00077    enum ExternalFrequencyStatus
00078    {
00079       efsUnknown   = -1,
00080       efsNotLocked = 0,
00081       efsLocked    = 1
00082    };
00083 
00084    namespace StringUtils
00085    {
00090       inline std::string asString(const CarrierCode& cc) throw()
00091       {
00092          switch(cc)
00093          {
00094             case ccL1: return "L1";
00095             case ccL2: return "L2";
00096             case ccL5: return "L5";
00097          }
00098          return "BadCarrierCode";
00099       }
00100 
00105       inline std::string asString(const RangeCode& rc) throw()
00106       {
00107          switch(rc)
00108          {
00109             case rcCA:       return "CA";
00110             case rcPcode:    return "P";
00111             case rcYcode:    return "Y";
00112             case rcCodeless: return "Z";
00113             case rcCM:       return "CM";
00114             case rcCL:       return "CL";
00115             case rcMcode1:   return "M1";
00116             case rcMcode2:   return "M2";
00117             case rcCMCL:     return "CMCL";
00118          }
00119          return "BadRangeCode";
00120       }
00121 
00126       inline std::string asString(const NavCode& nc) throw()
00127       {
00128          switch(nc)
00129          {
00130             case ncICD_200_2:  return "ICD-GPS-200 Data ID No. 2";
00131             case ncICD_700_M:  return "ICD-GPS-700 M-code";
00132             case ncICD_705_L5: return "ICD-GPS-705 L5 nav";
00133             case ncICD_200_4:  return "ICD-GPS-200 Data ID No. 4";
00134          }
00135          return "BadNavCode";
00136       }
00137 
00142       inline std::string asString(const ExternalFrequencyStatus& e)
00143          throw()
00144       {
00145          switch(e)
00146          {
00147             case efsNotLocked: return "NotLocked";
00148             case efsLocked:    return "Locked";
00149          }
00150          return "BadEFS";
00151       }
00152    } // namespace StringUtils
00153 
00154 }
00155 #endif // MISCENUM_HPP

Generated on Wed Feb 8 03:31:00 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1