SP3Header.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: SP3Header.hpp 114 2006-09-13 03:15:34Z ocibu $"
00002 
00008 #ifndef GPSTK_SP3HEADER_HPP
00009 #define GPSTK_SP3HEADER_HPP
00010 
00011 //============================================================================
00012 //
00013 //  This file is part of GPSTk, the GPS Toolkit.
00014 //
00015 //  The GPSTk is free software; you can redistribute it and/or modify
00016 //  it under the terms of the GNU Lesser General Public License as published
00017 //  by the Free Software Foundation; either version 2.1 of the License, or
00018 //  any later version.
00019 //
00020 //  The GPSTk is distributed in the hope that it will be useful,
00021 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 //  GNU Lesser General Public License for more details.
00024 //
00025 //  You should have received a copy of the GNU Lesser General Public
00026 //  License along with GPSTk; if not, write to the Free Software Foundation,
00027 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //  
00029 //  Copyright 2004, The University of Texas at Austin
00030 //
00031 //============================================================================
00032 
00033 //============================================================================
00034 //
00035 //This software developed by Applied Research Laboratories at the University of
00036 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00037 //Department of Defense. The U.S. Government retains all rights to use,
00038 //duplicate, distribute, disclose, or release this software. 
00039 //
00040 //Pursuant to DoD Directive 523024 
00041 //
00042 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00043 //                           release, distribution is unlimited.
00044 //
00045 //=============================================================================
00046 
00047 #include <string>
00048 #include <map>
00049 #include <vector>
00050 #include "DayTime.hpp"
00051 #include "SP3Base.hpp"
00052 #include "SP3SatID.hpp"
00053 
00054 namespace gpstk
00055 {
00058 
00069    class SP3Header : public SP3Base
00070    {
00071    public:
00072 
00074       enum TimeSystem
00075       {
00076          timeGPS=1,
00077          timeUTC
00078       };
00079 
00081       SP3Header() : version('a'), numberOfEpochs(0),
00082                     system(1, SP3SatID::systemGPS), timeSystem(timeGPS),
00083                     basePV(0.0), baseClk(0.0)
00084                     {}
00085 
00087       virtual ~SP3Header() {}
00088 
00090       std::string timeSystemString() const
00091       {
00092          switch(timeSystem) {
00093             case timeGPS: return "GPS";
00094             case timeUTC: return "UTC";
00095             default: return "??";
00096          }
00097       };
00098 
00099          // The next four lines is our common interface
00101       virtual bool isHeader() const {return true;}
00102      
00104       virtual void dump(std::ostream& s) const;
00105 
00106       char version;             
00107       char pvFlag;              
00108 
00109       DayTime time;             
00110       double epochInterval;     
00111       int numberOfEpochs;       
00112       std::string dataUsed;     
00113       std::string coordSystem;  
00114       std::string orbitType;    
00115       std::string agency;       
00116       // the following four are specific to version 'c'
00117       SP3SatID system;          
00118       TimeSystem timeSystem;    
00119       double basePV;            
00120       double baseClk;           
00121 
00122       std::map<SatID, short> satList;  
00123       std::vector<std::string> comments; 
00124 
00125       friend class SP3Data;
00126 
00127    protected:
00130       virtual void reallyPutRecord(FFStream& s) const 
00131          throw(std::exception, FFStreamError,
00132                StringUtils::StringException);
00133 
00143       virtual void reallyGetRecord(FFStream& s) 
00144          throw(std::exception, FFStreamError,
00145                StringUtils::StringException);
00146    };
00147 
00149 
00150 }  // namespace
00151 
00152 #endif
00153 

Generated on Tue May 22 03:31:01 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1