00001 #pragma ident "$Id: FICData.hpp 2432 2010-05-26 18:16:40Z afarris $"
00002
00003
00004
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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #ifndef FICDATA_HPP
00052 #define FICDATA_HPP
00053
00054 #include <vector>
00055 #include <map>
00056
00057 #include "FFStream.hpp"
00058 #include "FICBase.hpp"
00059 #include "EngEphemeris.hpp"
00060 #include "AlmOrbit.hpp"
00061 #include "DayTime.hpp"
00062
00063 namespace gpstk
00064 {
00067 NEW_EXCEPTION_CLASS(WrongBlockNumber, gpstk::Exception);
00068
00071 NEW_EXCEPTION_CLASS(WrongBlockFormat, gpstk::Exception);
00072
00081 class FICData : public FICBase
00082 {
00083 public:
00085 FICData() : blockNum(0) {}
00086
00087
00088
00089
00090
00091
00092
00093
00095 virtual ~FICData() {}
00102 bool isValid() const;
00103
00105 virtual bool isData() const {return true;}
00106
00112 virtual void dump(std::ostream& s) const;
00113
00118 void prettyDump(std::ostream& os) const;
00119
00125 bool getTransmitTime(DayTime& dt) const;
00126
00131 operator EngEphemeris() const throw(WrongBlockNumber);
00132
00137 operator AlmOrbit() const throw(WrongBlockNumber);
00138
00145 std::string generateUniqueKey() const throw(WrongBlockNumber,
00146 WrongBlockFormat);
00147
00148
00149
00150
00151 bool operator==(const FICData& rhs);
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161 std::string getElementLabel(char type, size_t indx) const;
00162
00163
00165
00166 static const std::string blockString;
00167 long blockNum;
00168 std::vector<double> f;
00169 std::vector<long> i;
00170 std::vector<char> c;
00171
00172
00173 protected:
00175 virtual void reallyPutRecord(FFStream& s) const
00176 throw(std::exception, gpstk::StringUtils::StringException,
00177 gpstk::FFStreamError);
00186 virtual void reallyGetRecord(FFStream& s)
00187 throw(std::exception, gpstk::StringUtils::StringException,
00188 gpstk::FFStreamError);
00189
00190 private:
00192 void prettyDump9(std::ostream& o) const;
00194 void prettyDump109(std::ostream& o) const;
00196 void prettyDump62(std::ostream& o) const;
00198 void prettyDump162(std::ostream& o) const;
00199
00201 void timeDisplay( std::ostream & os, const char * legend,
00202 const short week, const double SOW,
00203 const short headerFlag ) const;
00204
00207 void shortcut(std::ostream & os, const double HOW ) const;
00208 };
00209
00210 }
00211
00212 #endif
00213