00001 #pragma ident "$Id: DCBDataReader.hpp 2551 2011-04-11 14:29:33Z yanweignss $"
00002
00008 #ifndef GPSTK_DCBDATAREADER_HPP
00009 #define GPSTK_DCBDATAREADER_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #include <string>
00035 #include <map>
00036
00037 #include "Exception.hpp"
00038 #include "FFTextStream.hpp"
00039 #include "StringUtils.hpp"
00040 #include "DayTime.hpp"
00041 #include "SatID.hpp"
00042
00043 using namespace std;
00044
00045 namespace gpstk
00046 {
00047
00050
00077 class DCBDataReader : public FFTextStream
00078 {
00079 public:
00081 DCBDataReader()
00082 {};
00083
00090 DCBDataReader(const char* fn)
00091 : FFTextStream(fn, std::ios::in)
00092 { loadData(); };
00093
00094
00101 DCBDataReader(const string& fn)
00102 : FFTextStream(fn.c_str(), std::ios::in)
00103 { loadData(); };
00104
00105
00107 virtual void open(const char* fn);
00108
00109
00112 virtual void open(const string& fn);
00113
00114
00118 double getDCB( const SatID& sat);
00119
00124 double getDCB(const int& prn,
00125 const SatID::SatelliteSystem& system = SatID::systemGPS);
00126
00127
00132 double getDCB(const string& station,
00133 const SatID::SatelliteSystem& system = SatID::systemGPS);
00134
00135
00137 virtual ~DCBDataReader() {};
00138
00139
00140 private:
00141
00142
00143 typedef std::map< SatID, double > SatDCBData;
00144
00145
00146 typedef std::map< string, double > ReceiverDCBData;
00147
00149 struct DailyDCBData
00150 {
00151 SatDCBData satDCB;
00152
00153 ReceiverDCBData gpsDCB;
00154
00155 ReceiverDCBData glonassDCB;
00156 };
00157
00159 DailyDCBData allDCB;
00160
00161
00163 virtual void loadData()
00164 throw( FFStreamError, gpstk::StringUtils::StringException );
00165
00166
00167 };
00168
00170
00171 }
00172
00173 #endif
00174
00175
00176
00177