NovatelData.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: NovatelData.hpp 2429 2010-05-20 15:30:18Z schatzm $"
00002 
00003 
00009 #ifndef GPSTK_NOVATEL_DATA_HPP
00010 #define GPSTK_NOVATEL_DATA_HPP
00011 
00012 //============================================================================
00013 //
00014 //  This file is part of GPSTk, the GPS Toolkit.
00015 //
00016 //  The GPSTk is free software; you can redistribute it and/or modify
00017 //  it under the terms of the GNU Lesser General Public License as published
00018 //  by the Free Software Foundation; either version 2.1 of the License, or
00019 //  any later version.
00020 //
00021 //  The GPSTk is distributed in the hope that it will be useful,
00022 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00023 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024 //  GNU Lesser General Public License for more details.
00025 //
00026 //  You should have received a copy of the GNU Lesser General Public
00027 //  License along with GPSTk; if not, write to the Free Software Foundation,
00028 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029 //  
00030 //  Copyright 2004, The University of Texas at Austin
00031 //
00032 //============================================================================
00033 
00034 //============================================================================
00035 //
00036 //This software developed by Applied Research Laboratories at the University of
00037 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00038 //Department of Defense. The U.S. Government retains all rights to use,
00039 //duplicate, distribute, disclose, or release this software. 
00040 //
00041 //Pursuant to DoD Directive 523024 
00042 //
00043 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00044 //                           release, distribution is unlimited.
00045 //
00046 //=============================================================================
00047 
00048 
00049 
00050 
00051 
00052 
00053 #include <ostream>
00054 #include "Exception.hpp"
00055 #include "FFStream.hpp"
00056 #include "RinexNavData.hpp"
00057 #include "RinexObsData.hpp"
00058 #include "NovatelStream.hpp"
00059 
00060 namespace gpstk
00061 {
00064 
00070    class NovatelData : public FFData
00071    {
00072    public:
00074       enum RecType
00075       {
00076          Unknown=0,  
00077             // OEM2 records
00078          RGEB,       
00079          RGEC,       
00080          POSB,       
00081          REPB,       
00082          RCSB,       
00083             // OEM4 records
00084          RANGE,      
00085          RANGECMP,   
00086          RAWEPHEM    
00087       };
00088 
00090       static const std::string RecNames[];
00091 
00093       NovatelData(void) : rectype(Unknown), datasize(0), headersize(0), gpsWeek(-1)
00094          {}
00095 
00097       virtual ~NovatelData(void) {}
00098 
00101       bool isValid(void) const;
00102 
00104       virtual bool isHeader(void) const { return false; }
00105 
00107       virtual bool isData(void) const { return true; }
00108 
00111       bool isNav(void) const;
00112 
00115       bool isObs(void) const;
00116 
00119       bool isAux(void) const;
00120 
00122       bool isOEM2(void) const;
00123 
00125       bool isOEM4(void) const;
00126 
00128       virtual void dump(std::ostream& str) const;
00129 
00132       void setWeek(long& gpsweek) { gpsWeek = gpsweek; }
00133 
00136       operator RinexNavData() throw(gpstk::Exception);
00137 
00140       operator RinexObsData() throw(gpstk::Exception);
00141 
00143       RecType rectype;              
00144       int recnum;                   
00145       long datasize;                
00146       int headersize;               
00147 
00148    protected:
00150       virtual void reallyPutRecord(FFStream& s) const 
00151          throw(std::exception, gpstk::StringUtils::StringException, 
00152                gpstk::FFStreamError);
00153 
00162       virtual void reallyGetRecord(FFStream& s)
00163          throw(std::exception, gpstk::StringUtils::StringException, 
00164                gpstk::FFStreamError);
00165 
00166    private:
00169       unsigned char buffer[65564];   
00170 
00177       long gpsWeek;
00178       
00179    }; // end class NovatelData
00180 
00182 
00183 }  // end namespace gpstk
00184 
00185 #endif

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