RinexObsData.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: RinexObsData.hpp 3319 2012-09-19 16:58:10Z prestonherrmann $"
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
00020 //
00021 //  Copyright 2004, The University of Texas at Austin
00022 //
00023 //============================================================================
00024 
00025 //============================================================================
00026 //
00027 //This software developed by Applied Research Laboratories at the University of
00028 //Texas at Austin, under contract to an agency or agencies within the U.S.
00029 //Department of Defense. The U.S. Government retains all rights to use,
00030 //duplicate, distribute, disclose, or release this software.
00031 //
00032 //Pursuant to DoD Directive 523024
00033 //
00034 // DISTRIBUTION STATEMENT A: This software has been approved for public
00035 //                           release, distribution is unlimited.
00036 //
00037 //=============================================================================
00038 
00044 #ifndef RINEXOBSDATA_HPP
00045 #define RINEXOBSDATA_HPP
00046 
00047 #include <vector>
00048 #include <list>
00049 #include <map>
00050 
00051 #include "CommonTime.hpp"
00052 #include "FFStream.hpp"
00053 #include "RinexObsBase.hpp"
00054 #include "RinexObsHeader.hpp"
00055 
00056 namespace gpstk
00057 {
00060 
00067    class RinexObsData : public RinexObsBase
00068    {
00069    public:
00070 
00072       struct RinexDatum
00073       {
00074          RinexDatum() : data(0), lli(0), ssi(0) {}
00075          double data;  
00076          short lli;    
00077          short ssi;    
00078       };
00079 
00081       typedef std::map<RinexObsHeader::RinexObsType, RinexDatum> RinexObsTypeMap;
00083       typedef std::map<SatID, RinexObsTypeMap> RinexSatMap;
00084 
00085       gpstk::CommonTime time;    
00086 
00097       short epochFlag;
00101       short numSvs;
00102       double clockOffset;      
00103       RinexSatMap obs;         
00104       RinexObsHeader auxHeader;
00105 
00107       RinexObsData() : time(gpstk::CommonTime::BEGINNING_OF_TIME){}
00108 
00110       virtual ~RinexObsData() {}
00111 
00112          // The next four lines is our common interface
00114       virtual bool isData() const {return true;}
00115 
00121       virtual void dump(std::ostream& s) const;
00122 
00123    protected:
00132       virtual void reallyPutRecord(FFStream& s) const
00133          throw(std::exception, FFStreamError,
00134                gpstk::StringUtils::StringException);
00135 
00149       virtual void reallyGetRecord(FFStream& s)
00150          throw(std::exception, FFStreamError,
00151                gpstk::StringUtils::StringException);
00152 
00153    private:
00156       static gpstk::CommonTime previousTime;
00157 
00160       std::string writeTime(const CommonTime& dt) const
00161          throw(gpstk::StringUtils::StringException);
00162 
00168       CommonTime parseTime(const std::string& line, const RinexObsHeader& hdr) const
00169          throw(FFStreamError);
00170    }; // class RinexObsData
00171 
00173 
00174 } // namespace
00175 
00176 #endif

Generated on Thu May 23 03:31:12 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1