ATSData.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: ATSData.hpp 994 2007-12-17 15:20:49Z 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 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 
00039 #ifndef ATSData_HPP
00040 #define ATSData_HPP
00041 
00047 #include <map>
00048 #include <iostream>
00049 
00050 #include <Exception.hpp>
00051 #include <DayTime.hpp>
00052 #include <StringUtils.hpp>
00053 #include <BinUtils.hpp>
00054 
00055 #include <FFData.hpp>
00056 #include <FFStream.hpp>
00057 #include <DataStatus.hpp>
00058 
00059 #include <RinexObsData.hpp>
00060 
00061 #if !defined( __SUNPRO_CC ) && !defined( _MSC_VER )
00062 #include <stdint.h>
00063 #endif
00064 
00065 
00066 namespace gpstk
00067 {
00068 
00069    class ATSStream;
00070 
00073    class ATSData : public FFData
00074    {
00075    public:
00076       ATSData() throw()
00077         {}
00078 
00079       // Returns whether or not this MDPData is valid.
00080       bool isValid() const {return true;}
00081 
00083       virtual bool isData() const {return true;}
00084 
00086       virtual std::string getName() const {return "ats";}
00087 
00091       void dump(std::ostream& out, int detail=0) const throw();
00092 
00093       struct SubChannelBlock 
00094       {
00095          double pseudorange;
00096          double phase;
00097          double rangeRate;
00098          double cn0;
00099          // bit0: loss of lock, bit1: code tracking, bit2 carrier tracking
00100          // bit3: gps time, bit4: tbd, bits5-7: Data rate
00101          uint8_t flags;
00102          uint32_t navMSB[4], navLSB[4];
00103       };
00104 
00105       struct ChannelBlock
00106       {
00107          gpstk::SatID svid;
00108          double absTime; // seconds since the GPS epoch
00109          std::vector<SubChannelBlock> subChannels;
00110       };
00111 
00112       uint8_t numChan;
00113       uint8_t numSubChan;
00114       static const uint8_t MaxNumChan;
00115       static const uint8_t MaxNumSubChan;
00116 
00117       std::vector<ChannelBlock> channels;
00118          
00119       static int debugLevel;
00120       static bool hexDump;
00121 
00122    protected:
00123       virtual void reallyPutRecord(FFStream& s) const 
00124          throw(std::exception, StringUtils::StringException, 
00125                FFStreamError);
00126 
00127       virtual void reallyGetRecord(FFStream& s)
00128          throw(std::exception, StringUtils::StringException, 
00129                FFStreamError, EndOfFile);
00130    }; // class ATSData
00131 
00132 } // namespace gpstk
00133 
00134 #endif // ATSData_HPP

Generated on Thu Jul 29 03:30:51 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1